| b3094407 |
core/device: Fix not always storing SDP records
The records shall always be stored persistently since the device
temporary flag can be clear at some later point and the cache is
always cleared once the device is removed. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +10, -12 |
| 6ca8be71 |
core/device: Don't overwrite SDP record cache
btd_device_get_record should not overwrite existing cache if record
cannot be found since the cache should alway be up to date as it is
reloaded from file if the cache is empty. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +5, -14 |
| a5583ffc |
core: Print store_hint in new_link_key_callback
This is useful information when debugging because that indicates
no-bonding was used so device will remain temporary even though it is
paired. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +3, -2 |
| c9a87056 |
core/advertising: Fix double free
This fixes the following trace introduced by
caa5835cd805e9771cddef35906a31cce0232dde:
Invalid read of size 8
at 0x4859E4: advertising_manager_destroy (advertising.c:721)
by 0x485D1D: btd_advertising_manager_destroy (advertising.c:822)
by 0x48B39E: adapter_remove (adapter.c:5191)
by 0x49A812: adapter_cleanup (adapter.c:8184)
by 0x40BE2A: main (main.c:673)
Address 0x5ed5bb8 is 8 bytes inside a block of size 32 free'd
at 0x4C2ACE9: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4C85D9: remove_interface (object.c:658)
by 0x4C91B1: g_dbus_unregister_interface (object.c:1382)
by 0x485D0D: btd_advertising_manager_destroy (advertising.c:818)
by 0x48B39E: adapter_remove (adapter.c:5191)
by 0x49A812: adapter_cleanup (adapter.c:8184)
by 0x40BE2A: main (main.c:673)
This happens because AdvertisingManager is only registered if the kernel
support at least one advertising instance so it has be freed directly. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +1, -2 |
| c142f072 |
unit/test-gatt: Add /TP/GAW/CL/BI-23-C/auto test
/TP/GAW/CL/BI-23-C/auto is similar to /TP/GAW/CL/BI-23-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| 0af2139a |
unit/test-gatt: Add /TP/GAW/CL/BI-18-C/auto test
/TP/GAW/CL/BI-18-C/auto is similar to /TP/GAW/CL/BI-18-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +10, -0 |
| ebf6040d |
unit/test-gatt: Add /TP/GAW/CL/BI-05-C/auto test
/TP/GAW/CL/BI-05-C/auto is similar to /TP/GAW/CL/BI-05-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| 791b5210 |
unit/test-gatt: Add /TP/GAR/CL/BI-32-C/auto test
/TP/GAR/CL/BI-32-C/auto is similar to /TP/GAR/CL/BI-32-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| 27a7b267 |
unit/test-gatt: Add /TP/GAR/CL/BI-26-C/auto test
/TP/GAR/CL/BI-26-C/auto is similar to /TP/GAR/CL/BI-26-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| f379e991 |
unit/test-gatt: Add /TP/GAR/CL/BI-21-C/auto test
/TP/GAR/CL/BI-21-C/auto is similar to /TP/GAR/CL/BI-21-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| 06d78ce0 |
unit/test-gatt: Add /TP/GAR/CL/BI-16-C/auto test
/TP/GAR/CL/BI-16-C/auto is similar to /TP/GAR/CL/BI-16-C but
automatically elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| 68474c8e |
unit/test-gatt: Add /TP/GAR/CL/BI-04-C/auto test
/TP/GAR/CL/BI-04-C/auto is similar to TP/GAR/CL/BI-04-C but automatically
elevates the security level and retry. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +8, -0 |
| ec0e3b17 |
unit/test-gatt: Use auto security
If the test don't expect any errors to happen use set security to auto so
bt_att will take care of elevating the security whenever needed. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +4, -0 |
| c6fa51cc |
shared/att: Add BT_ATT_SECURITY_AUTO
This security level enables auto elevation (on by default), this would be
useful for unit tests since it can now control this behavior (default for
non L2CAP transport is BT_ATT_SECURITY_LOW). |
Luiz Augusto von Dentz |
10 years ago |
2 files, +6, -6 |
| 2c863603 |
shared/att: Auto retry if request fails
This adds auto retry logic to requests when a security error happen,
it will first attempt to elevate the security to match the requirement
and then retry sending the request once again. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +54, -4 |
| 01e8a8b8 |
client: Display address if calling 'disconnect' without arguments
Before:
[PHILIPS BTM2180]# disconnect
Attempting to disconnect from
Successful disconnected
After:
[PHILIPS BTM2180]# disconnect
Attempting to disconnect from XX:XX:XX:XX:XX:XX
Successful disconnected |
Mateusz Lemusisk |
10 years ago |
1 file, +5, -0 |
| fd524d73 |
obexd/opp: Fix OPP GET request path
The default path is /etc/bluetooth/vcard.vcf which obexd
is not able to access.
obexd[11654]: obexd/src/obex.c:cmd_get() session 0x64edff0
obexd[11654]: GET(0x3), (null)(0xffffffff)
obexd[11654]: obexd/src/obex.c:parse_type() TYPE: text/x-vcard
obexd[11654]: open(/etc/bluetooth/vcard.vcf): Operation not permitted (1)
obexd[11654]: GET(0x3), NOT_FOUND(0x44)
After making this path as obex root folder,
it is able to succeed.
obexd[12246]: obexd/src/obex.c:cmd_get() session 0x64ed830
obexd[12246]: GET(0x3), (null)(0xffffffff)
obexd[12246]: obexd/src/obex.c:parse_type() TYPE: text/x-vcard
obexd[12246]: obexd/src/obex.c:driver_get_headers() name=(null) type=text/x-vcard object=0x8
obexd[12246]: GET(0x3), CONTINUE(0x10)
obexd[12246]: obexd/src/obex.c:send_data() name=(null) type=text/x-vcard file=0x8 size=3061
obexd[12246]: obexd/src/obex.c:driver_read() 73 read
obexd[12246]: obexd/src/obex.c:send_data() name=(null) type=text/x-vcard file=0x8 size=3066
obexd[12246]: obexd/src/obex.c:driver_read() 0 read
obexd[12246]: obexd/src/obex.c:transfer_complete() |
Gowtham Anandha Babu |
10 years ago |
1 file, +11, -5 |
| caa5835c |
core/advertising: Fix memory leak on btd_advertising_manager_destroy
When creating an adv_manager using advertising_manager_create(),
it should be properly freed using advertising_manager_destroy().
==19916== 64 (32 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 167 of 234
==19916== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19916== by 0x45B0D0: btd_advertising_manager_new (advertising.c:764)
==19916== by 0x468DF9: read_info_complete (adapter.c:7353)
==19916== by 0x48E3A5: request_complete (mgmt.c:242)
==19916== by 0x48ED1C: can_read_data (mgmt.c:321)
==19916== by 0x49A504: watch_callback (io-glib.c:170)
==19916== by 0x4E7FCE4: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==19916== by 0x4E80047: g_main_context_iterate.isra.24 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==19916== by 0x4E80309: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==19916== by 0x40B2AE: main (main.c:661) |
Gowtham Anandha Babu |
10 years ago |
1 file, +2, -0 |
| 1b4597c7 |
shared/ad: Fix adding same instance of service data
The code was checking the data in the wrong queue so it was unable to
detect the same instance was already discovered. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +1, -1 |
| ccafb0f4 |
unit/test-gatt: Fix /TP/GAR/CL/BV-07-C test
The response should be Read Blob Reponse 0x0d not 0x0b which is Read
Response. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +1, -1 |
| c2765efb |
unit/test-gatt: Fix /TP/GAR/CL/BV-04-C test
The response should be Read Blob Reponse 0x0d not 0x0b which is Read
Response. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +1, -1 |
| 75b6e79d |
monitor: Fix L2CAP config option parsing |
Johan Hedberg |
10 years ago |
1 file, +4, -2 |
| d2cf5eca |
doc: Mention the management version 1.10 API changes |
Marcel Holtmann |
10 years ago |
1 file, +3, -0 |
| 960e9d27 |
tools/mgmt-tester: test multi-adv
This patch adds tests and required test infrastructure for multi
advertising tests. |
Florian Grandel |
10 years ago |
2 files, +190, -29 |
| 4b14e99d |
tools/mgmt-tester: fix duplicate code
The definition of the test advertising instance was duplicated in
several places. This patch refactors the duplicate code into a
common subroutine. |
Florian Grandel |
10 years ago |
1 file, +19, -60 |
| b5ac7621 |
tools/mgmt-tester: test le off
Test that advertising instances will be removed when disabling the le
capability of a brle bluetooth device. |
Florian Grandel |
10 years ago |
2 files, +23, -2 |
| 716da011 |
tools/mgmt-tester: test advertising timeout
The change introduces an additional test that waits for an advertising
timeout to occur and checks whether the timed out advertising instance
is correctly being removed and - if it was the last instance -
advertising disabled. |
Florian Grandel |
10 years ago |
2 files, +21, -3 |
| efd0672d |
tools/mgmt-tester: allow for event-only tests
The generic test runner previously expected the test action to always be
a mgmt command. A "no-op" operation is introduced to support tests where
the test scenario is triggered by a timeout rather than a command. |
Florian Grandel |
10 years ago |
1 file, +7, -0 |
| 538e359b |
tools/mgmt-tester: make test timeout configurable
Currently tests have a hard coded timeout of two seconds. To prepare for
multi-advertising tests we need to be able to extend that timeout, so
that we can test whether instances are switching and expiring as
expected.
This patch therefore introduces a "full" version of the
test_bredrle() macro called test_bredrle_full() that takes an additional
timout parameter. |
Florian Grandel |
10 years ago |
1 file, +5, -2 |
| 8b82f187 |
tools/mgmt-tester: test adv inst override
This test covers a use case that had not been tested before: When an
advertising instance has already been added and is then added again with
different advertising data, the new advertising data should be
advertised. |
Florian Grandel |
10 years ago |
2 files, +22, -2 |
| d7415484 |
tools/mgmt-tester: keep instances on power cycle
Tests that instances that do not have a timeout will survive a power
cycle. |
Florian Grandel |
10 years ago |
2 files, +65, -6 |
| 8e12b46d |
tools/mgmt-tester: increase max adv inst
The kernel now allows for up to five concurrent advertising instances.
This patch adapts the tests to the new setting. |
Florian Grandel |
10 years ago |
1 file, +2, -2 |
| bd4d44bc |
tools/mgmt-tester: rename add adv tests
The add advertisement tests were named a bit inconsistently and the test
intent was not always clear from the naming of the test. This has been
improved by introducing a somewhat more consistent naming scheme and
adding additional hints wrt the test intent. |
Florian Grandel |
10 years ago |
1 file, +22, -22 |
| da2df073 |
tools/mgmt-tester: comment add adv test setup
The add advertising test setup data was just a number of arrays with
undocumented hex data. This sometimes made it difficult to understand
the test intent.
Comments have been added to the add advertising mgmt and hci parameter
data arrays to make them more readable and better document the test
intent. |
Florian Grandel |
10 years ago |
1 file, +268, -186 |
| dfe3787f |
tools/mgmt-tester: expect 0 rp when removing all adv inst
The kernel would previously return a hard coded instance value of 0x01
even when removing multiple advertising instances. The correct behavior,
though, would be to return zero when multiple instances have been
removed. This corresponds to the semantics of the mgmt API call made in
the first place.
A fix for this problem has been introduced in the kernel. Now the
corresponding test is updated to reflect that logic. |
Florian Grandel |
10 years ago |
1 file, +2, -2 |
| 4985b996 |
tools/mgmt-tester: error message when unexp params
The tester already issues debug messages for unexpected HCI commands but
not for unexpected mgmt command return values. To facilitate test
debugging this patch adds a debug message for unexpected mgmt command
return values, too. |
Florian Grandel |
10 years ago |
1 file, +2, -0 |
| 2fcb2c44 |
tools/btmgmt: make inst duration configurable
Now that the kernel actually does respect the instance's duration
parameter it should be accessible via btmgmt. An additional parameter
for the add-adv command is therefore being introduced. |
Florian Grandel |
10 years ago |
1 file, +17, -11 |
| 3c8ae263 |
doc/mgmt-api: fix typos
This patch fixes a few minor typos and grammar errors in the mgmt api
spec. |
Florian Grandel |
10 years ago |
1 file, +16, -16 |
| a1a6ec40 |
doc/mgmt-api: multi-adv implementation details
A few additional decisions have been made while implementing the
multi-advertising feature where the mgmt api spec was leaving room for
interpretation. These changes are being documented in this patch. |
Florian Grandel |
10 years ago |
1 file, +61, -12 |
| ef03539b |
doc: Update the details for mgmt version 1.9 |
Marcel Holtmann |
10 years ago |
1 file, +9, -5 |
| 471d55ea |
bccmd - add ability to read ADC
Some BlueCore devices are equipped with an 'Analogue In' pin which is
internally connected to a MUX and ADC. This patch adds the ability to
control the MUX and read the ADC.
The ADC is also connected internal to a temp sensor, which can also be
read via this method.
The (only) MUX values expected to be used are:
1 Internal 1V25 reference
16 BlueCore01b pin Test_A; BlueCore2-External pin AIO0
17 BlueCore01b pin Test_B; BlueCore2-External pin AIO1
36 Chip’s internal temperature (change) sensor. BlueCore2-ROM and later only.
The MUX can also select other (undocumented) test points.
Example usage
--
$ ./bccmd -t HCI -d hci1 adc 17
ADC value from Mux 0x11 : 0x0054 (valid)
$ ./bccmd -t HCI -d hci1 adc 1
ADC value from Mux 0x01 : 0x00b2 (valid) |
Simon Wood |
10 years ago |
2 files, +45, -0 |
| 893144c6 |
tools/obexctl: Add support for pull Vobjects
PullBusinessCard from remote push server.
[obex]# connect 00:1B:DC:07:33:4E 00001105-0000-1000-8000-00805f9b34fb
Attempting to connect to 00:1B:DC:07:33:4E
[NEW] Session /org/bluez/obex/client/session0 [default]
[NEW] ObjectPush /org/bluez/obex/client/session0
Connection successful
[00:1B:DC:07:33:4E]# pull /home/vcard.vcf
Attempting to pull /home/vcard.vcf from /org/bluez/obex/client/session0
[NEW] Transfer /org/bluez/obex/client/session0/transfer0
Transfer /org/bluez/obex/client/session0/transfer0
Status: queued
Size: 0
Filename: /home/vcard.vcf
Session: /org/bluez/obex/client/session0
[CHG] Transfer /org/bluez/obex/client/session0/transfer0 Status: complete
[DEL] Transfer /org/bluez/obex/client/session0/transfer0
[DEL] Session /org/bluez/obex/client/session0 [default]
[DEL] ObjectPush /org/bluez/obex/client/session0 |
Gowtham Anandha Babu |
10 years ago |
1 file, +36, -1 |
| 5f01e9c5 |
shared/gatt-client: Fix the "Find Information req" error
In a particular case where remote device has the characteristic
declaration b/w 0XFFFE and 0XFFFF. i.e characteristic handle at
0XFFFE and value_handle at 0XFFFF, which implies there is no
characteristic descriptors associated.
Since present design search the descriptors b/w the characteristic_value
declaration and characteristic end handle, In the above stated case,
descriptor search handle will be initialized to 0X0000 (i.e by
incrementing characteristic value handle (0xffff) ). 0X0000 handle
is reserved handle, and also intention of searching descriptors will
not be achieved.
Consequence: Below request will be sent,
ATT: Find Information req (0x04)
start 0x0000, end 0xffff
and below will be the proper response from the remote device
ATT: Error (0x01)
Error: Invalid handle (1)
Find Information req (0x04) on handle 0x0000 |
Nagaraj D R |
10 years ago |
1 file, +7, -3 |
| c9c7d4c5 |
Release 5.31 |
Marcel Holtmann |
10 years ago |
2 files, +19, -1 |
| 60f68ab8 |
build: Update library version |
Marcel Holtmann |
10 years ago |
1 file, +1, -1 |
| 0d9053c1 |
lib: Update company identifiers |
Marcel Holtmann |
10 years ago |
1 file, +26, -0 |
| 64448e3c |
android/handsfree: Fix invalid size of SCO_OP_GET_FD command |
Szymon Janc |
10 years ago |
1 file, +1, -1 |
| a92470e6 |
shared/gatt-db: Fix allocating characteristic at 0xffff
All caracteristics shall contain a value in the next handle so having
a declaration on 0xffff is invalid since there won't be any space for
the value descriptor. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +12, -0 |
| 67a4bda1 |
shared/gatt-client: Don't discovery secondaries if there is no primary
The spec state that a secondary needs to referenced by at least one
primary, Version 4.2 [Vol 1, Part A] page 101:
'A secondary service is a service that provides auxiliary
functionality of a device and is referenced from at least one
primary service on the device.' |
Luiz Augusto von Dentz |
10 years ago |
1 file, +9, -0 |
| 3eeab572 |
shared/gatt-client: Simplify ready flag
This makes notify_client_ready takes care of setting ready flag so the
caller code don't have to set it before calling notify_client_ready. |
Luiz Augusto von Dentz |
10 years ago |
1 file, +4, -8 |