OSDN Git Service

android-x86/external-bluetooth-bluez.git
8 years agoandroid: include hciattach kitkat-x86 android-x86-4.4-r3
Chih-Wei Huang [Fri, 17 Jul 2015 03:56:17 +0000 (11:56 +0800)]
android: include hciattach

It may be used by HCI UART devices.

8 years agoandroid: tools: add brcm_patchram_plus
Chih-Wei Huang [Mon, 6 Jul 2015 17:28:24 +0000 (01:28 +0800)]
android: tools: add brcm_patchram_plus

8 years agoandroid: remove bluetooth-headers
Chih-Wei Huang [Mon, 6 Jul 2015 17:26:55 +0000 (01:26 +0800)]
android: remove bluetooth-headers

It's unnecessary to copy headers and incorrect to do actions
in make shell functions.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
8 years agoemulator: Add support for scanning on different channels
Marcel Holtmann [Tue, 14 Jul 2015 21:25:45 +0000 (23:25 +0200)]
emulator: Add support for scanning on different channels

8 years agoemulator: Add support for scan window and scan interval handling
Marcel Holtmann [Tue, 14 Jul 2015 20:44:47 +0000 (22:44 +0200)]
emulator: Add support for scan window and scan interval handling

8 years agoemulator: Add support for using advertising delay values
Marcel Holtmann [Tue, 14 Jul 2015 20:19:39 +0000 (22:19 +0200)]
emulator: Add support for using advertising delay values

8 years agoaudio: Fix possible crash when removing device
Luiz Augusto von Dentz [Wed, 8 Jul 2015 09:47:59 +0000 (12:47 +0300)]
audio: Fix possible crash when removing device

Currently it is not possible to cancel avdtp_discover procedure leading
to crashe if the device is removed while avdtp_discover is pending since
its callback is still reachable.

8 years agodoc/test-runner: Mention useful locking kernel config options
Johan Hedberg [Thu, 9 Jul 2015 10:42:44 +0000 (13:42 +0300)]
doc/test-runner: Mention useful locking kernel config options

8 years agogobex: Minor coding style (whitespace) fix
Johan Hedberg [Wed, 8 Jul 2015 09:38:01 +0000 (12:38 +0300)]
gobex: Minor coding style (whitespace) fix

8 years agocore: gatt-database: Remove unnecessary typecast
Johan Hedberg [Tue, 7 Jul 2015 19:31:50 +0000 (22:31 +0300)]
core: gatt-database: Remove unnecessary typecast

8 years agocore: gatt-database: Fix potential memory leak
Johan Hedberg [Tue, 7 Jul 2015 19:30:53 +0000 (22:30 +0300)]
core: gatt-database: Fix potential memory leak

8 years agoclient: Fix potential array overflow
Johan Hedberg [Tue, 7 Jul 2015 19:20:33 +0000 (22:20 +0300)]
client: Fix potential array overflow

8 years agoRelease 5.32
Marcel Holtmann [Tue, 7 Jul 2015 17:18:35 +0000 (19:18 +0200)]
Release 5.32

8 years agobuild: Update library version
Marcel Holtmann [Tue, 7 Jul 2015 17:17:47 +0000 (19:17 +0200)]
build: Update library version

8 years agolib: Update company identifiers
Marcel Holtmann [Tue, 7 Jul 2015 17:16:35 +0000 (19:16 +0200)]
lib: Update company identifiers

8 years agocore/profiles: Fix not handling disconnections properly
Luiz Augusto von Dentz [Tue, 7 Jul 2015 10:31:44 +0000 (13:31 +0300)]
core/profiles: Fix not handling disconnections properly

If a profiles disconnects while in connecting state but ext_connect has
already been called the state is never updated since ext_io_disconnected
always calls btd_service_disconnecting_complete.

8 years agocore/advertising: Fix using wrong instance id
Luiz Augusto von Dentz [Fri, 26 Jun 2015 11:52:22 +0000 (14:52 +0300)]
core/advertising: Fix using wrong instance id

The instance id shall be limited to the number of instance the kernel
support, and since this will probably be quite small the ids should be
reused once the client unregistered.

8 years agocore: Fix accepting connections while disconnecting
Luiz Augusto von Dentz [Wed, 24 Jun 2015 10:03:36 +0000 (13:03 +0300)]
core: Fix accepting connections while disconnecting

If the device is being disconnected locally any profile connection shall
be rejected since the ACL link will be dropped.

8 years agocore/device: Fix not always storing SDP records
Luiz Augusto von Dentz [Fri, 26 Jun 2015 10:47:23 +0000 (13:47 +0300)]
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.

8 years agocore/device: Don't overwrite SDP record cache
Luiz Augusto von Dentz [Fri, 26 Jun 2015 10:31:34 +0000 (13:31 +0300)]
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.

8 years agocore: Print store_hint in new_link_key_callback
Luiz Augusto von Dentz [Fri, 26 Jun 2015 10:28:52 +0000 (13:28 +0300)]
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.

8 years agocore/advertising: Fix double free
Luiz Augusto von Dentz [Thu, 25 Jun 2015 07:42:27 +0000 (10:42 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAW/CL/BI-23-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 10:49:01 +0000 (13:49 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAW/CL/BI-18-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 10:45:53 +0000 (13:45 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAW/CL/BI-05-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 08:25:40 +0000 (11:25 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAR/CL/BI-32-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 08:21:55 +0000 (11:21 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAR/CL/BI-26-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 08:16:09 +0000 (11:16 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAR/CL/BI-21-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 08:11:51 +0000 (11:11 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAR/CL/BI-16-C/auto test
Luiz Augusto von Dentz [Tue, 23 Jun 2015 08:02:45 +0000 (11:02 +0300)]
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.

8 years agounit/test-gatt: Add /TP/GAR/CL/BI-04-C/auto test
Luiz Augusto von Dentz [Mon, 22 Jun 2015 12:51:56 +0000 (15:51 +0300)]
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.

8 years agounit/test-gatt: Use auto security
Luiz Augusto von Dentz [Mon, 22 Jun 2015 08:29:44 +0000 (11:29 +0300)]
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.

8 years agoshared/att: Add BT_ATT_SECURITY_AUTO
Luiz Augusto von Dentz [Mon, 22 Jun 2015 08:04:23 +0000 (11:04 +0300)]
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).

8 years agoshared/att: Auto retry if request fails
Luiz Augusto von Dentz [Thu, 18 Jun 2015 14:36:56 +0000 (17:36 +0300)]
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.

8 years agoclient: Display address if calling 'disconnect' without arguments
Mateusz Lemusisk [Sun, 21 Jun 2015 15:08:52 +0000 (17:08 +0200)]
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

8 years agoobexd/opp: Fix OPP GET request path
Gowtham Anandha Babu [Fri, 19 Jun 2015 06:58:50 +0000 (12:28 +0530)]
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()

8 years agocore/advertising: Fix memory leak on btd_advertising_manager_destroy
Gowtham Anandha Babu [Mon, 22 Jun 2015 13:51:06 +0000 (19:21 +0530)]
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)

8 years agoshared/ad: Fix adding same instance of service data
Luiz Augusto von Dentz [Tue, 23 Jun 2015 09:03:30 +0000 (12:03 +0300)]
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.

8 years agounit/test-gatt: Fix /TP/GAR/CL/BV-07-C test
Luiz Augusto von Dentz [Thu, 18 Jun 2015 11:19:42 +0000 (14:19 +0300)]
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.

8 years agounit/test-gatt: Fix /TP/GAR/CL/BV-04-C test
Luiz Augusto von Dentz [Thu, 18 Jun 2015 11:11:04 +0000 (14:11 +0300)]
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.

8 years agomonitor: Fix L2CAP config option parsing
Johan Hedberg [Mon, 22 Jun 2015 17:04:27 +0000 (20:04 +0300)]
monitor: Fix L2CAP config option parsing

8 years agodoc: Mention the management version 1.10 API changes
Marcel Holtmann [Mon, 22 Jun 2015 22:21:41 +0000 (15:21 -0700)]
doc: Mention the management version 1.10 API changes

8 years agotools/mgmt-tester: test multi-adv
Florian Grandel [Thu, 18 Jun 2015 01:17:46 +0000 (03:17 +0200)]
tools/mgmt-tester: test multi-adv

This patch adds tests and required test infrastructure for multi
advertising tests.

8 years agotools/mgmt-tester: fix duplicate code
Florian Grandel [Thu, 18 Jun 2015 01:17:45 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: test le off
Florian Grandel [Thu, 18 Jun 2015 01:17:44 +0000 (03:17 +0200)]
tools/mgmt-tester: test le off

Test that advertising instances will be removed when disabling the le
capability of a brle bluetooth device.

8 years agotools/mgmt-tester: test advertising timeout
Florian Grandel [Thu, 18 Jun 2015 01:17:43 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: allow for event-only tests
Florian Grandel [Thu, 18 Jun 2015 01:17:42 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: make test timeout configurable
Florian Grandel [Thu, 18 Jun 2015 01:17:41 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: test adv inst override
Florian Grandel [Thu, 18 Jun 2015 01:17:40 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: keep instances on power cycle
Florian Grandel [Thu, 18 Jun 2015 01:17:39 +0000 (03:17 +0200)]
tools/mgmt-tester: keep instances on power cycle

Tests that instances that do not have a timeout will survive a power
cycle.

8 years agotools/mgmt-tester: increase max adv inst
Florian Grandel [Thu, 18 Jun 2015 01:17:38 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: rename add adv tests
Florian Grandel [Thu, 18 Jun 2015 01:17:37 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: comment add adv test setup
Florian Grandel [Thu, 18 Jun 2015 01:17:36 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: expect 0 rp when removing all adv inst
Florian Grandel [Thu, 18 Jun 2015 01:17:35 +0000 (03:17 +0200)]
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.

8 years agotools/mgmt-tester: error message when unexp params
Florian Grandel [Thu, 18 Jun 2015 01:17:34 +0000 (03:17 +0200)]
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.

8 years agotools/btmgmt: make inst duration configurable
Florian Grandel [Thu, 18 Jun 2015 01:17:33 +0000 (03:17 +0200)]
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.

8 years agodoc/mgmt-api: fix typos
Florian Grandel [Thu, 18 Jun 2015 01:17:32 +0000 (03:17 +0200)]
doc/mgmt-api: fix typos

This patch fixes a few minor typos and grammar errors in the mgmt api
spec.

8 years agodoc/mgmt-api: multi-adv implementation details
Florian Grandel [Thu, 18 Jun 2015 01:17:31 +0000 (03:17 +0200)]
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.

8 years agodoc: Update the details for mgmt version 1.9
Marcel Holtmann [Thu, 18 Jun 2015 10:09:57 +0000 (03:09 -0700)]
doc: Update the details for mgmt version 1.9

8 years agobccmd - add ability to read ADC
Simon Wood [Wed, 17 Jun 2015 18:12:41 +0000 (12:12 -0600)]
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)

8 years agotools/obexctl: Add support for pull Vobjects
Gowtham Anandha Babu [Mon, 15 Jun 2015 12:12:45 +0000 (17:42 +0530)]
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

8 years agoshared/gatt-client: Fix the "Find Information req" error
Nagaraj D R [Fri, 12 Jun 2015 06:39:39 +0000 (12:09 +0530)]
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

8 years agoRelease 5.31
Marcel Holtmann [Mon, 15 Jun 2015 09:30:17 +0000 (11:30 +0200)]
Release 5.31

8 years agobuild: Update library version
Marcel Holtmann [Mon, 15 Jun 2015 09:21:43 +0000 (11:21 +0200)]
build: Update library version

8 years agolib: Update company identifiers
Marcel Holtmann [Mon, 15 Jun 2015 09:20:03 +0000 (11:20 +0200)]
lib: Update company identifiers

8 years agoandroid/handsfree: Fix invalid size of SCO_OP_GET_FD command
Szymon Janc [Fri, 12 Jun 2015 07:26:56 +0000 (09:26 +0200)]
android/handsfree: Fix invalid size of SCO_OP_GET_FD command

8 years agoshared/gatt-db: Fix allocating characteristic at 0xffff
Luiz Augusto von Dentz [Thu, 11 Jun 2015 13:01:58 +0000 (16:01 +0300)]
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.

8 years agoshared/gatt-client: Don't discovery secondaries if there is no primary
Luiz Augusto von Dentz [Mon, 8 Jun 2015 13:30:06 +0000 (16:30 +0300)]
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.'

8 years agoshared/gatt-client: Simplify ready flag
Luiz Augusto von Dentz [Mon, 8 Jun 2015 09:27:03 +0000 (12:27 +0300)]
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.

8 years agoshared/gatt-client: Consolidate service changed registration
Luiz Augusto von Dentz [Mon, 8 Jun 2015 07:44:46 +0000 (10:44 +0300)]
shared/gatt-client: Consolidate service changed registration

This rework the code using service changed registration so it becomes
reusable by different part of code.

8 years agoshared/gatt-client: Speed up discovery
Luiz Augusto von Dentz [Fri, 5 Jun 2015 13:36:27 +0000 (16:36 +0300)]
shared/gatt-client: Speed up discovery

This tune the discovery to take advantage of the cached database whenever
possible, so instead of clearing the whole db if the device is not paired
the code now make the remote services active once they are discovered
and with that bt_gatt_client can then skip discovering characteristics
and descriptors of services that have not changed since last connection
which improves the reconnecting speed for any device regardless if the
device was paired or not.

8 years agoemulator: Add support for Read Encryption Key Size command
Johan Hedberg [Thu, 11 Jun 2015 10:14:38 +0000 (13:14 +0300)]
emulator: Add support for Read Encryption Key Size command

8 years agotools/mgmt-tester: Fix expected version for 2.0 controllers
Johan Hedberg [Thu, 11 Jun 2015 10:14:22 +0000 (13:14 +0300)]
tools/mgmt-tester: Fix expected version for 2.0 controllers

8 years agoemulator: Fix 2.0 HCI version (it's 0x03 and not 0x04)
Johan Hedberg [Thu, 11 Jun 2015 10:14:06 +0000 (13:14 +0300)]
emulator: Fix 2.0 HCI version (it's 0x03 and not 0x04)

8 years agoshared/att: Fix boolean check in handle_notify()
Andrei Emeltchenko [Fri, 29 May 2015 08:53:26 +0000 (11:53 +0300)]
shared/att: Fix boolean check in handle_notify()

ext_signed is boolean and shall be checked with logical op.

8 years agoandroid: Fix btproxy build
Szymon Janc [Fri, 5 Jun 2015 13:09:16 +0000 (15:09 +0200)]
android: Fix btproxy build

target Executable: btproxy (out/target/product/mako/obj/EXECUTABLES/
    btproxy_intermediates/LINKED/btproxy)
external/bluetooth/bluez/tools/btproxy.c:197: error: undefined
    reference to 'ecc_make_key'
external/bluetooth/bluez/tools/btproxy.c:215: error: undefined reference to
    'ecdh_shared_secret'
collect2: error: ld returned 1 exit status

8 years agotools: Add support for ECC emulation to proxy utility
Marcel Holtmann [Wed, 3 Jun 2015 07:36:59 +0000 (09:36 +0200)]
tools: Add support for ECC emulation to proxy utility

8 years agotools/btmgmt: Fix quit behavior if stop-find fails
Johan Hedberg [Wed, 3 Jun 2015 03:20:18 +0000 (06:20 +0300)]
tools/btmgmt: Fix quit behavior if stop-find fails

8 years agomonitor: Add full key type decoding for New Link Key events
Johan Hedberg [Tue, 2 Jun 2015 15:38:11 +0000 (22:38 +0700)]
monitor: Add full key type decoding for New Link Key events

8 years agolib: Update company identifiers
Marcel Holtmann [Mon, 1 Jun 2015 19:07:54 +0000 (21:07 +0200)]
lib: Update company identifiers

8 years agoandroid/pts: Keep A2DP issue number in test's name line
Szymon Janc [Mon, 1 Jun 2015 12:54:12 +0000 (14:54 +0200)]
android/pts: Keep A2DP issue number in test's name line

8 years agoandroid/pts: Update MAP test results
Mariusz Skamra [Mon, 1 Jun 2015 10:52:50 +0000 (12:52 +0200)]
android/pts: Update MAP test results

PTS 6.1 and Android 5.1

8 years agoandroid/pts: Update L2CAP test results
Mariusz Skamra [Mon, 1 Jun 2015 10:12:02 +0000 (12:12 +0200)]
android/pts: Update L2CAP test results

PTS 6.1 and Android 5.1

8 years agotools/l2test: Add -g option
Szymon Janc [Mon, 1 Jun 2015 09:42:22 +0000 (11:42 +0200)]
tools/l2test: Add -g option

This option allow to sleep before disconnecting socket.

8 years agotools/l2test: Sort options alphabetically
Szymon Janc [Mon, 1 Jun 2015 09:27:06 +0000 (11:27 +0200)]
tools/l2test: Sort options alphabetically

l2test has many options and sorting them will make it easier to find
unused one.

8 years agotools/l2test: Allow to send zero frames before delay
Szymon Janc [Mon, 1 Jun 2015 09:27:05 +0000 (11:27 +0200)]
tools/l2test: Allow to send zero frames before delay

8 years agotools/l2test: Add -e option
Szymon Janc [Mon, 1 Jun 2015 09:27:04 +0000 (11:27 +0200)]
tools/l2test: Add -e option

This allows to specify initial value for sequence when sending frames.

8 years agobnep: Fix using uninitialized variable
Andrei Emeltchenko [Fri, 29 May 2015 10:04:19 +0000 (13:04 +0300)]
bnep: Fix using uninitialized variable

8 years agomonitor: Decode ATT Signed Write Command
Szymon Janc [Thu, 28 May 2015 22:13:44 +0000 (00:13 +0200)]
monitor: Decode ATT Signed Write Command

Signed Write Command data is as follow:
Attribute Handle (2 octets)
Data (0 or more octets)
Signature (12 octets).

> ACL Data RX: Handle 64 flags 0x02 dlen 20
      ATT: Signed Write Command (0xd2) len 15
        Handle: 0x001f
          Data: 00
          Signature: 00000000df559de6549e1757

8 years agomonitor: Use black font for white background
Szymon Janc [Thu, 28 May 2015 22:13:43 +0000 (00:13 +0200)]
monitor: Use black font for white background

Make sure that font is always visible on white background.

8 years agoprofiles/hog: Use no suspend support instead of the dummy FIFO
Marcel Holtmann [Fri, 29 May 2015 14:24:45 +0000 (16:24 +0200)]
profiles/hog: Use no suspend support instead of the dummy FIFO

8 years agoandroid/pts: Update PTS version
Szymon Janc [Tue, 26 May 2015 17:05:39 +0000 (19:05 +0200)]
android/pts: Update PTS version

GAP and OPP are already tested with PTS 6.1 but version updates were
missing.

8 years agoandroid/pts: Update HID test results
Mariusz Skamra [Fri, 22 May 2015 13:31:47 +0000 (15:31 +0200)]
android/pts: Update HID test results

PTS 6.1 and Android 5.1

8 years agoaudio/a2dp: Remove useless check_vendor_codec()
Chan-yeol Park [Wed, 20 May 2015 12:09:48 +0000 (21:09 +0900)]
audio/a2dp: Remove useless check_vendor_codec()

This function could be removed because A2DP vendor codec match is
already verified in avdtp_find_remote_sep().

8 years agoaudio/avdtp: Add a2dp vendor codec match callback
Chan-yeol Park [Wed, 20 May 2015 12:09:47 +0000 (21:09 +0900)]
audio/avdtp: Add a2dp vendor codec match callback

When matching remote SEP to local SEP avdtp does not compare vendor
codecs properly, i.e. neither vendor ID not codec ID are checked,
which may cause wrong endpoint to be selected in case there are more
that one endpoints using vendor codec on remote.

This patch fixes it by adding a2dp codec match call back.

8 years agomonitor: Improve decoding of ATT Read by Group Type Respose
Luiz Augusto von Dentz [Sun, 24 May 2015 13:15:11 +0000 (16:15 +0300)]
monitor: Improve decoding of ATT Read by Group Type Respose

The group data is as follow:

Attribute Handle (2 octets) End Group Handle (2 octets) Attribute Value
(Length - 4) octets

But since only primary and secondary can be used in ATT Read by Group
Type Request the value is garanteed to be a UUID:

< ACL Data TX: Handle 3585 flags 0x00 dlen 24
      ATT: Read By Group Type Response (0x11) len 19
        Attribute data length: 6
        Attribute group list: 3 entries
        Handle range: 0x0001-0x0005
        UUID: Generic Access Profile (0x1800)
        Handle range: 0x0006-0x000d
        UUID: Heart Rate (0x180d)
        Handle range: 0x000e-0x0011
        UUID: Battery Service (0x180f)

8 years agomonitor: Decode 3D broadcast message information
Marcel Holtmann [Sun, 24 May 2015 02:36:34 +0000 (04:36 +0200)]
monitor: Decode 3D broadcast message information

8 years agodoc: Add description for Start Limited Discovery command
Marcel Holtmann [Sun, 24 May 2015 02:28:14 +0000 (04:28 +0200)]
doc: Add description for Start Limited Discovery command

8 years agomonitor: Add another Broadcom firmware version
Marcel Holtmann [Sat, 23 May 2015 22:14:21 +0000 (00:14 +0200)]
monitor: Add another Broadcom firmware version

8 years agomonitor: Add Broadcom BCM4324B3 chip name information
Frederic Danis [Tue, 19 May 2015 14:20:30 +0000 (16:20 +0200)]
monitor: Add Broadcom BCM4324B3 chip name information

8 years agocore/gatt: Report if char. value exists properly
Marcin Kraglak [Thu, 14 May 2015 11:09:21 +0000 (13:09 +0200)]
core/gatt: Report if char. value exists properly

Return correct value in characteristic_value_exists().