OSDN Git Service

android-x86/external-bluetooth-bluez.git
10 years agodoc: Add management command to get clock information
Marcel Holtmann [Fri, 27 Jun 2014 10:48:23 +0000 (12:48 +0200)]
doc: Add management command to get clock information

10 years agounit/test-queue: Fix memory leak
Luiz Augusto von Dentz [Fri, 27 Jun 2014 10:51:46 +0000 (13:51 +0300)]
unit/test-queue: Fix memory leak

This fixes the following memory leak:

32 bytes in 1 blocks are definitely lost in loss record 20 of 35
   at 0x4C291D4: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x400DC2: queue_new (queue.c:65)
   by 0x400AA5: test_foreach_remove_all (test-queue.c:92)
   by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x40083E: main (test-queue.c:109)

10 years agoshared/queue: Fix invalid read
Luiz Augusto von Dentz [Fri, 27 Jun 2014 10:27:22 +0000 (13:27 +0300)]
shared/queue: Fix invalid read

If the queue elements are destroyed by queue_destroy the head will point
to freed memory causing the following error when unit/test-queue is run:

Invalid read of size 8
   at 0x401040: queue_foreach (queue.c:194)
   by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x40083E: main (test-queue.c:109)
 Address 0x7f65738 is 8 bytes inside a block of size 16 free'd
   at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x400E29: queue_destroy (queue.c:93)
   by 0x40102C: queue_foreach (queue.c:219)
   by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
   by 0x40083E: main (test-queue.c:109)

10 years agodoc: Add address type information to get connection info command
Marcel Holtmann [Fri, 27 Jun 2014 09:44:39 +0000 (11:44 +0200)]
doc: Add address type information to get connection info command

10 years agoandroid/pts: Update MCAP results
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:11 +0000 (15:09 +0200)]
android/pts: Update MCAP results

10 years agoandroid/mcaptest: Support MDL reconnection if MCL reconnected
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:10 +0000 (15:09 +0200)]
android/mcaptest: Support MDL reconnection if MCL reconnected

This is needed in some PTS test cases.

10 years agoandroid/mcaptest: Support MDL and MCL disconnection
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:09 +0000 (15:09 +0200)]
android/mcaptest: Support MDL and MCL disconnection

This adds support for MDL disconnection triggered with timeout after the
MDL is connected. It also adds MCL disconnection timeout after the MDL
has been disconnected. If less than 0 is passed as '-e' or '-f' option
parameter, disconnection is not triggered. This is needed to pass some
PTS test cases.

10 years agoandroid/mcaptest: Support incoming connections
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:08 +0000 (15:09 +0200)]
android/mcaptest: Support incoming connections

This adds support for handling incoming Control Link (MCL) and Data
Link (MDL) connections.

10 years agoandroid/mcaptest: Support connect
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:07 +0000 (15:09 +0200)]
android/mcaptest: Support connect

This initiates the connection

10 years agoandroid/mcaptest: Add skeleton for mcap test tool
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:06 +0000 (15:09 +0200)]
android/mcaptest: Add skeleton for mcap test tool

This adds skeleton for simple tool for testing mcap library. As mcap-lib
uses bt_io, this tool works in daemon-like mode, by utilizing Glib's main
loop.

10 years agoandroid/pts: Change MCAP PIXIT value
Jakub Tyszkowski [Thu, 26 Jun 2014 13:09:05 +0000 (15:09 +0200)]
android/pts: Change MCAP PIXIT value

Handling single data channel will simplify mcaptest tool.
This can be changed later when mcaptest will be improved.

10 years agocore: Fix bogus check to resume pending authorizations
Luiz Augusto von Dentz [Thu, 26 Jun 2014 10:14:07 +0000 (13:14 +0300)]
core: Fix bogus check to resume pending authorizations

After incoming pairing the code will attempt reverse service discovery
and queue any authorization request until the services are resolved, once
this process was completed the code should resume the authorization
process no matter how many are queued.

10 years agoandroid/gatt: Fix not sending notification on get included service
Szymon Janc [Thu, 26 Jun 2014 09:12:28 +0000 (11:12 +0200)]
android/gatt: Fix not sending notification on get included service

If there was and error notification with GATT error status should be
send.

10 years agoandroid/gatt: Fix not sending notification if no included services
Szymon Janc [Thu, 26 Jun 2014 08:19:27 +0000 (10:19 +0200)]
android/gatt: Fix not sending notification if no included services

10 years agoandroid/health: Provide a helper funtion to search channel by id
Ravi kumar Veeramally [Thu, 26 Jun 2014 09:04:48 +0000 (12:04 +0300)]
android/health: Provide a helper funtion to search channel by id

10 years agoandroid/hal-health: Return app_id and channel_id -1 in case of error
Ravi kumar Veeramally [Wed, 25 Jun 2014 16:30:15 +0000 (19:30 +0300)]
android/hal-health: Return app_id and channel_id -1 in case of error

Right now returning only status of request but java layer expecting
-1 for app_id and channel_id in failure case.

10 years agoandroid/health: Rename matching functions
Ravi kumar Veeramally [Wed, 25 Jun 2014 16:30:13 +0000 (19:30 +0300)]
android/health: Rename matching functions

10 years agocore: Fix adapter_connect_list_add()
Petri Gynther [Wed, 25 Jun 2014 17:38:29 +0000 (10:38 -0700)]
core: Fix adapter_connect_list_add()

adapter_connect_list_add() needs to ensure that trigger_passive_scanning() is
called even for existing devices on the connect list.

This issue can be seen with BLE HoG remotes trying to reconnect to BlueZ. If
the connection fails, att_error_cb() adds the failed device back to connect
list, but since the device is already on the list, no code ends up calling
trigger_passive_scanning(). After this point, passive scanning is disabled
and remains disabled for good, and BLE reconnects to BlueZ no longer work.

bluetoothd[931]: src/adapter.c:device_found_callback() hci0 addr ...
bluetoothd[931]: src/device.c:device_set_legacy() legacy 0
bluetoothd[931]: src/adapter.c:stop_passive_scanning()
bluetoothd[931]: src/adapter.c:stop_passive_scanning_complete() status 0x00 (Success)
bluetoothd[931]: src/device.c:device_connect_le() Connection attempt to: ...
bluetoothd[931]: src/adapter.c:discovering_callback() hci0 type 6 discovering 0
bluetoothd[931]: src/adapter.c:connect_failed_callback() hci0 ... status 2
bluetoothd[931]: plugins/policy.c:conn_fail_cb() status 2
bluetoothd[931]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr ... type 1 status 0x2
bluetoothd[931]: src/device.c:device_bonding_complete() bonding (nil) status 0x02
bluetoothd[931]: src/device.c:device_bonding_failed() status 2
bluetoothd[931]: src/adapter.c:resume_discovery()
bluetoothd[931]: src/device.c:att_connect_cb() connect error: Transport endpoint is not connected (134)
bluetoothd[931]: src/device.c:att_error_cb() Enabling automatic connections
bluetoothd[931]: src/adapter.c:adapter_connect_list_add() ignoring already added device ...
... passive scan is disabled and remains disabled for good ...

10 years agocore: Fix discovering_callback()
Petri Gynther [Wed, 25 Jun 2014 17:38:17 +0000 (10:38 -0700)]
core: Fix discovering_callback()

discovering_callback() should not call trigger_passive_scanning() when
outgoing BLE connection is pending.

This issue can be seen with BLE HoG devices trying to reconnect to BlueZ:
bluetoothd[931]: src/adapter.c:device_found_callback() hci0 addr ...
bluetoothd[931]: src/device.c:device_set_legacy() legacy 0
bluetoothd[931]: src/device.c:device_set_rssi() rssi -75
bluetoothd[931]: src/adapter.c:stop_passive_scanning()
bluetoothd[931]: src/adapter.c:discovering_callback() hci0 type 6 discovering 0
bluetoothd[931]: src/adapter.c:trigger_passive_scanning()
bluetoothd[931]: src/adapter.c:stop_passive_scanning_complete() status 0x0b (Rejected)
bluetoothd[931]: Stopping passive scanning failed: Rejected

10 years agocore: Fix stop_passive_scanning_complete()
Petri Gynther [Wed, 25 Jun 2014 17:38:03 +0000 (10:38 -0700)]
core: Fix stop_passive_scanning_complete()

Consider MGMT_STATUS_REJECTED as success for stop_passive_scanning().
MGMT_STATUS_REJECTED may be returned from kernel because the passive
scan timer had expired in kernel and passive scan was disabled just
around the time we called stop_passive_scanning().

This issue can be seen with BLE HoG devices trying to reconnect to BlueZ:
bluetoothd[931]: src/adapter.c:device_found_callback() hci0 addr ...
bluetoothd[931]: src/device.c:device_set_legacy() legacy 0
bluetoothd[931]: src/device.c:device_set_rssi() rssi -75
bluetoothd[931]: src/adapter.c:stop_passive_scanning()
bluetoothd[931]: src/adapter.c:discovering_callback() hci0 type 6 discovering 0
bluetoothd[931]: src/adapter.c:trigger_passive_scanning()
bluetoothd[931]: src/adapter.c:stop_passive_scanning_complete() status 0x0b (Rejected)
bluetoothd[931]: Stopping passive scanning failed: Rejected

10 years agoandroid/hog: Fix using invalid range for external report
Luiz Augusto von Dentz [Wed, 25 Jun 2014 11:49:07 +0000 (14:49 +0300)]
android/hog: Fix using invalid range for external report

10 years agoandroid/health: Fix setting wrong PSM for SDP record
Andrei Emeltchenko [Thu, 26 Jun 2014 07:14:52 +0000 (10:14 +0300)]
android/health: Fix setting wrong PSM for SDP record

10 years agoandroid/hog: Fix code style
Luiz Augusto von Dentz [Wed, 25 Jun 2014 09:09:26 +0000 (12:09 +0300)]
android/hog: Fix code style

10 years agoandroid/hidhost: Add hid_device_new helper function
Luiz Augusto von Dentz [Wed, 25 Jun 2014 09:09:25 +0000 (12:09 +0300)]
android/hidhost: Add hid_device_new helper function

10 years agoandroid/health: Add setting mcl callbacks for incoming connection
Andrei Emeltchenko [Tue, 24 Jun 2014 12:12:02 +0000 (15:12 +0300)]
android/health: Add setting mcl callbacks for incoming connection

For incoming connection NULL is passed as argument since application is
not known yet.

10 years agoandroid/health: Refactor create_device
Andrei Emeltchenko [Tue, 24 Jun 2014 12:12:01 +0000 (15:12 +0300)]
android/health: Refactor create_device

create_device() should not search for apps again since we have searched
already, and we do not have always app_id.

10 years agoandroid/health: Add actual error message to error print
Andrei Emeltchenko [Tue, 24 Jun 2014 12:12:00 +0000 (15:12 +0300)]
android/health: Add actual error message to error print

10 years agoandroid/health: Refactor setting mcl callbacks to function
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:59 +0000 (15:11 +0300)]
android/health: Refactor setting mcl callbacks to function

Function will be used in other places as well.

10 years agoandroid/health: trivial: Fix missing space
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:58 +0000 (15:11 +0300)]
android/health: trivial: Fix missing space

10 years agoandroid/health: Remove extra check
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:57 +0000 (15:11 +0300)]
android/health: Remove extra check

gerr is always set on error condition.

10 years agoandroid/health: trivial: Remove empty line
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:56 +0000 (15:11 +0300)]
android/health: trivial: Remove empty line

10 years agoandroid/health: Fix missing error check
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:55 +0000 (15:11 +0300)]
android/health: Fix missing error check

10 years agoandroid/health: Fix possible overflow
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:54 +0000 (15:11 +0300)]
android/health: Fix possible overflow

10 years agoandroid/health: Remove unneeded check
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:53 +0000 (15:11 +0300)]
android/health: Remove unneeded check

In case of error err is always set so the check is not needed.

10 years agoandroid/hal-health: trivial: Correct coding style
Andrei Emeltchenko [Tue, 24 Jun 2014 12:11:52 +0000 (15:11 +0300)]
android/hal-health: trivial: Correct coding style

10 years agoandroid/gatt: Remove dead code
Andrei Emeltchenko [Thu, 19 Jun 2014 10:28:21 +0000 (13:28 +0300)]
android/gatt: Remove dead code

The code apparently left after wrong rebase as it duplicates code
several lines above.

10 years agoandroid/gatt: Fix wrong size argument
Andrei Emeltchenko [Thu, 19 Jun 2014 10:36:19 +0000 (13:36 +0300)]
android/gatt: Fix wrong size argument

Instead of sizeof of (uint8_t *) pass real length, though for that
function it doesn't matter at this point.

10 years agoandroid/cts: Update tests results with CTS 4.4 R3
Szymon Janc [Wed, 25 Jun 2014 14:51:54 +0000 (16:51 +0200)]
android/cts: Update tests results with CTS 4.4 R3

No LE GATT tests were run yet.

10 years agoHDP: Fix NULL check
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:46 +0000 (15:07 +0300)]
HDP: Fix NULL check

Improves readability of the code using similar check for not NULL.

10 years agoHDP: trivial: Remove empty lines
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:45 +0000 (15:07 +0300)]
HDP: trivial: Remove empty lines

10 years agoHDP: Fix possible memory leak
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:44 +0000 (15:07 +0300)]
HDP: Fix possible memory leak

10 years agomcap: Fix possible overflow
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:43 +0000 (15:07 +0300)]
mcap: Fix possible overflow

10 years agoHDP: Fix checking always constant error code
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:42 +0000 (15:07 +0300)]
HDP: Fix checking always constant error code

Function sdp_set_add_access_protos() always returns 0, so there is no
sense to check for error code.

10 years agoHDP: Fix checking always constant error code
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:41 +0000 (15:07 +0300)]
HDP: Fix checking always constant error code

sdp_set_access_protos() always returns 0, there is no sense to check for
error code. Fixes compile warnings.

10 years agoHDP: Remove extra debug statements
Andrei Emeltchenko [Tue, 24 Jun 2014 12:07:40 +0000 (15:07 +0300)]
HDP: Remove extra debug statements

DBG() includes function name by default, so including it is not needed.

10 years agoandroid/bluetooth: Log error if loading LTKs or IRKs failed
Szymon Janc [Mon, 23 Jun 2014 14:28:34 +0000 (16:28 +0200)]
android/bluetooth: Log error if loading LTKs or IRKs failed

10 years agoandroid/gatt: Use proper address when connecting
Szymon Janc [Mon, 23 Jun 2014 14:28:33 +0000 (16:28 +0200)]
android/gatt: Use proper address when connecting

If device was using RPA but address was resolved IDA must be used.

10 years agoandroid/bluetooth: Map RPA to Identity address on New IRK event
Szymon Janc [Mon, 23 Jun 2014 14:28:32 +0000 (16:28 +0200)]
android/bluetooth: Map RPA to Identity address on New IRK event

This patch allows to pair with devices using RPA. There is no API
to notify HAL about new Identity Address. When New IRK event is
received ID address is stored in device and map to RPA is done.
This allows to use RPA after address was resolved making this
transparent to Android Framework. When daemon is restarted device
is advertised to Framework with ID address.

10 years agoandroid/bluetooth: Add get_device_android_addr helper
Szymon Janc [Mon, 23 Jun 2014 14:28:31 +0000 (16:28 +0200)]
android/bluetooth: Add get_device_android_addr helper

This will be used to fake address for Android Framework.

10 years agoandroid/bluetooth: Fix passing address type to SSP replies
Szymon Janc [Mon, 23 Jun 2014 14:28:30 +0000 (16:28 +0200)]
android/bluetooth: Fix passing address type to SSP replies

10 years agoandroid/bluetooth: Pass device to send_bond_state_change function
Szymon Janc [Mon, 23 Jun 2014 14:28:29 +0000 (16:28 +0200)]
android/bluetooth: Pass device to send_bond_state_change function

10 years agoandroid/bluetooth: Add helper for finding device with android address
Szymon Janc [Mon, 23 Jun 2014 14:28:28 +0000 (16:28 +0200)]
android/bluetooth: Add helper for finding device with android address

10 years agoandroid/hidhost: Fix adding hidhost device on devices list
Grzegorz Kolodziejczyk [Mon, 23 Jun 2014 14:18:17 +0000 (16:18 +0200)]
android/hidhost: Fix adding hidhost device on devices list

Create hog connection cb functionality tried to operate on stored on
list hidhost device. Adding hidhost device to list should be done
before operating on it.

It caused sending bogus connecting state change.

10 years agoandroid/health: Update PTS results
Ravi kumar Veeramally [Mon, 23 Jun 2014 15:06:04 +0000 (18:06 +0300)]
android/health: Update PTS results

Update test results for TC_SRC_CC_BV_03_C, TC_SRC_CC_BV_07_C,
TC_SNK_CC_BV_04_C, TC_SNK_HCT_BV_01_I, TC_SNK_CC_BV_08_C and
TC_SRC_HCT_BV_01_I.

10 years agoandroid/client: Write dummy data on fd on health source connect
Ravi kumar Veeramally [Mon, 23 Jun 2014 15:06:03 +0000 (18:06 +0300)]
android/client: Write dummy data on fd on health source connect

PTS expects dummy data on fd when it connects in source role.

10 years agoandroid/client: Fix coding style
Ravi kumar Veeramally [Mon, 23 Jun 2014 15:06:02 +0000 (18:06 +0300)]
android/client: Fix coding style

10 years agoandroid/health: Fix error messages
Ravi kumar Veeramally [Mon, 23 Jun 2014 15:06:01 +0000 (18:06 +0300)]
android/health: Fix error messages

10 years agoandroid/health: Fix wrong mdep config index
Ravi kumar Veeramally [Mon, 23 Jun 2014 15:06:00 +0000 (18:06 +0300)]
android/health: Fix wrong mdep config index

MDEP Id starts from 1, (0 value for Echo). HAL api sends mdep cfg index
which starts from 0.

10 years agoandroid/pics: Do not set Suspend feature in HOGP
Luiz Augusto von Dentz [Mon, 23 Jun 2014 12:46:17 +0000 (15:46 +0300)]
android/pics: Do not set Suspend feature in HOGP

This requires integration with Android power management so leave it out
for now.

10 years agoandroid/pics: Fix having both types of discover set in HOGP
Luiz Augusto von Dentz [Mon, 23 Jun 2014 12:46:16 +0000 (15:46 +0300)]
android/pics: Fix having both types of discover set in HOGP

Currently the code discover by service handle and not by UUID.

10 years agoandroid/client: Fix closing wrong FD in health HAL
Szymon Janc [Mon, 23 Jun 2014 13:24:09 +0000 (15:24 +0200)]
android/client: Fix closing wrong FD in health HAL

10 years agocore: Fix using address of array instead of size
Andrei Emeltchenko [Mon, 23 Jun 2014 11:19:35 +0000 (14:19 +0300)]
core: Fix using address of array instead of size

The dev->name variable is an array, so the address of it can never be
NULL.

10 years agoanrdroid/client/health: Cache fd and close on channel disconnection
Ravi kumar Veeramally [Sun, 22 Jun 2014 11:59:01 +0000 (14:59 +0300)]
anrdroid/client/health: Cache fd and close on channel disconnection

Cache fd and close them on channel disconnect or destroy notification.
When running PTS tests it is expecting to close all data channels before
exiting test case.

10 years agoandroid/health: Implement mcap_mdl_deleted_cb
Ravi kumar Veeramally [Sun, 22 Jun 2014 11:59:00 +0000 (14:59 +0300)]
android/health: Implement mcap_mdl_deleted_cb

mcap_mdl_deleted_cb will be called if remote device sends MDL_DELETE_REQ.
Free channel data and notify channel is destroyed.

10 years agoandroid/health: Create and connect MDL
Ravi kumar Veeramally [Sun, 22 Jun 2014 11:58:59 +0000 (14:58 +0300)]
android/health: Create and connect MDL

Request for md_create_mdl and on successful response
connect mdl and pass fd. First data channel should be reliable
data channel.

10 years agoandroid/health: Notify channel status on channel destroy call
Ravi kumar Veeramally [Sun, 22 Jun 2014 11:58:58 +0000 (14:58 +0300)]
android/health: Notify channel status on channel destroy call

10 years agoandroid/health: Cache remote mdep id on channel connect request
Ravi kumar Veeramally [Sun, 22 Jun 2014 11:58:57 +0000 (14:58 +0300)]
android/health: Cache remote mdep id on channel connect request

Remote mdep is required to initiate MD_CREATE_MDL_REQ request.

10 years agoandroid/health: Check if device and channel already exists or not
Ravi kumar Veeramally [Sun, 22 Jun 2014 11:58:56 +0000 (14:58 +0300)]
android/health: Check if device and channel already exists or not

On channel connect request, check if device is already exists or not.
Also check if channel is already created for remote device or not.

10 years agoAUTHORS: Mention Arman's contributions
Marcel Holtmann [Mon, 23 Jun 2014 08:37:11 +0000 (10:37 +0200)]
AUTHORS: Mention Arman's contributions

10 years agoshared/att: Fix a few compiler warnings
Marcel Holtmann [Mon, 23 Jun 2014 08:36:23 +0000 (10:36 +0200)]
shared/att: Fix a few compiler warnings

10 years agoshared/att: Handle incoming response PDUs
Arman Uguray [Wed, 18 Jun 2014 20:25:43 +0000 (13:25 -0700)]
shared/att: Handle incoming response PDUs

This patch adds handling for incoming ATT protocol response PDUs. Basic
incoming PDU handling logic added to the io read handler.

10 years agoshared/att: Implement write handler and bt_att_send.
Arman Uguray [Wed, 18 Jun 2014 20:25:42 +0000 (13:25 -0700)]
shared/att: Implement write handler and bt_att_send.

This patch implements the write handler logic, including the way send
operations are process from the various internal queues. Added PDU
encoding for the Exchange MTU request.

10 years agoshared/att: Implement basic boilerplate.
Arman Uguray [Wed, 18 Jun 2014 20:25:41 +0000 (13:25 -0700)]
shared/att: Implement basic boilerplate.

This patch implements the getters, setters, creation, ref, and unref
functions for struct bt_att. Also added is a simple table for
determining the ATT op type given an opcode and the io read handler that
currently does nothing.

10 years agoshared/att: Introduce struct bt_att.
Arman Uguray [Wed, 18 Jun 2014 20:25:40 +0000 (13:25 -0700)]
shared/att: Introduce struct bt_att.

This patch introduces struct bt_att, which handles the transport and
encoding/decoding for the ATT protocol. The structure of the code
follows that of src/shared/mgmt and lib/mgmt.h, where individual
parameter structures are defined for all ATT protocol requests, responses,
commands, indications, and notifications. The serialization and
endianness conversion for all parameters are handled by bt_att.

struct bt_att is based around struct io and operates on a raw file
descriptor.

10 years agohciconfig: Fix adding missing break
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:35 +0000 (16:55 +0300)]
hciconfig: Fix adding missing break

10 years agohcitool: Fix adding missing break
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:34 +0000 (16:55 +0300)]
hcitool: Fix adding missing break

10 years agobnep: Fix redundant check
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:33 +0000 (16:55 +0300)]
bnep: Fix redundant check

10 years agomonitor: Fix checking boolean return value
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:32 +0000 (16:55 +0300)]
monitor: Fix checking boolean return value

Since btsnoop_read_hci() is used from src/shared.

10 years agotools/csr: Fix wrong error check
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:31 +0000 (16:55 +0300)]
tools/csr: Fix wrong error check

10 years agoqueue: Fix unreachable code
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:30 +0000 (16:55 +0300)]
queue: Fix unreachable code

I assume passing function == NULL means using direct_match() so make it
reachable.

10 years agotools/mpris-player: Fix overflow before type widening
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:29 +0000 (16:55 +0300)]
tools/mpris-player: Fix overflow before type widening

Expression is evaluated using 32-bit arithmetic before conversion to
64-bit.

10 years agoandroid/ipc-tester: Fix possible double close
Andrei Emeltchenko [Thu, 19 Jun 2014 13:55:28 +0000 (16:55 +0300)]
android/ipc-tester: Fix possible double close

I case of error we may close fd and pipe twice.

10 years agodoc: Add comment for single mode controllers without public address
Marcel Holtmann [Mon, 23 Jun 2014 06:56:15 +0000 (08:56 +0200)]
doc: Add comment for single mode controllers without public address

10 years agodoc/mgmt-api: Fix a couple of typos
Johan Hedberg [Mon, 23 Jun 2014 05:05:13 +0000 (08:05 +0300)]
doc/mgmt-api: Fix a couple of typos

10 years agodoc: Add extra mode for a reduced LE privacy mode
Marcel Holtmann [Sun, 22 Jun 2014 20:05:51 +0000 (22:05 +0200)]
doc: Add extra mode for a reduced LE privacy mode

10 years agodoc: Add management support for handling connection parameters
Marcel Holtmann [Sun, 22 Jun 2014 20:00:42 +0000 (22:00 +0200)]
doc: Add management support for handling connection parameters

10 years agodoc: Add mode for enabling generation of debug keys
Marcel Holtmann [Sat, 21 Jun 2014 02:21:08 +0000 (04:21 +0200)]
doc: Add mode for enabling generation of debug keys

10 years agoclient: Wait for D-Bus before processing stdin
Johan Hedberg [Sun, 22 Jun 2014 07:22:05 +0000 (10:22 +0300)]
client: Wait for D-Bus before processing stdin

This should make it possible to do some scripting with bluetoothctl.
Otherwise stdin is processed before we're connected to D-Bus and most
commands will fail as a consequence.

10 years agoandroid/health: Fix queue creation for mdeps and devices
Ravi kumar Veeramally [Fri, 20 Jun 2014 12:23:30 +0000 (15:23 +0300)]
android/health: Fix queue creation for mdeps and devices

Create queue for mdeps, devices and channels when creating app
and device struct. It is simpler to read code than on demand
creation.

10 years agoRelease 5.20
Marcel Holtmann [Fri, 20 Jun 2014 18:32:08 +0000 (20:32 +0200)]
Release 5.20

10 years agobuild: Update library version
Marcel Holtmann [Fri, 20 Jun 2014 18:26:51 +0000 (20:26 +0200)]
build: Update library version

10 years agoandroid/pts: Update GAP PTS status
Lukasz Rymanowski [Thu, 19 Jun 2014 22:50:34 +0000 (00:50 +0200)]
android/pts: Update GAP PTS status

After enabling privacy for peripheral one more test gets enabled in PTS

10 years agoandroid/pics: Enable privacy for peripheral
Lukasz Rymanowski [Thu, 19 Jun 2014 22:50:33 +0000 (00:50 +0200)]
android/pics: Enable privacy for peripheral

10 years agoandroid/bluetooth: Fix loading device address type from storage
Szymon Janc [Fri, 20 Jun 2014 14:33:34 +0000 (16:33 +0200)]
android/bluetooth: Fix loading device address type from storage

Address type is stored as "AddressType" key. Also this is valid only
for LE capable devices.

10 years agoandroid/bluetooth: Pass device to send_device_property function
Szymon Janc [Fri, 20 Jun 2014 15:22:15 +0000 (17:22 +0200)]
android/bluetooth: Pass device to send_device_property function

10 years agoandroid/socket: Convert service UUID to 16 or 32 bits if possible
Szymon Janc [Wed, 18 Jun 2014 17:50:11 +0000 (19:50 +0200)]
android/socket: Convert service UUID to 16 or 32 bits if possible

10 years agoandroid/pts: Update GAP results
Jakub Tyszkowski [Wed, 18 Jun 2014 15:29:46 +0000 (17:29 +0200)]
android/pts: Update GAP results

10 years agoandroid/pts: Update GAP results
Jakub Tyszkowski [Wed, 18 Jun 2014 14:09:21 +0000 (16:09 +0200)]
android/pts: Update GAP results

10 years agoandroid/gatt: Minor coding style fix
Jakub Tyszkowski [Wed, 18 Jun 2014 12:58:54 +0000 (14:58 +0200)]
android/gatt: Minor coding style fix

10 years agoandroid/gatt: Fix not freeing discover_srvc_data
Jakub Tyszkowski [Wed, 18 Jun 2014 12:58:53 +0000 (14:58 +0200)]
android/gatt: Fix not freeing discover_srvc_data

This fixes the following issue:

32 bytes in 1 blocks are definitely lost in loss record 92 of 142
==19365==    at 0x4C29DB4: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19365==    by 0x43275A: search_dev_for_srvc (gatt.c:1302)
==19365==    by 0x4354C9: connect_cb (gatt.c:1424)
==19365==    by 0x448AD3: accept_cb (btio.c:203)
==19365==    by 0x4E79D12: g_main_context_dispatch (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==19365==    by 0x4E7A05F: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==19365==    by 0x4E7A459: g_main_loop_run (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==19365==    by 0x40459D: main (main.c:538)