OSDN Git Service
Luiz Augusto von Dentz [Tue, 26 Aug 2014 13:14:12 +0000 (16:14 +0300)]
obexd/client: Allow suspending transfer while they are queued
Transfer may be created by different processes so it make sense to allow
them to be suspended even if they are not active.
Arman Uguray [Thu, 28 Aug 2014 21:25:25 +0000 (14:25 -0700)]
TODO: shared/gatt-client has been defined and discovery implemented
Arman Uguray [Thu, 28 Aug 2014 21:25:24 +0000 (14:25 -0700)]
shared/gatt-client: Implement descriptor discovery.
This patch implements characteristic descriptor discovery as part of the client
initialization flow.
Arman Uguray [Thu, 28 Aug 2014 21:25:23 +0000 (14:25 -0700)]
shared/gatt-client: Implement characteristic discovery.
This patch implements characteristic discovery as part of the client
initialization flow. The characteristics of each service are discovered in
order.
Arman Uguray [Thu, 28 Aug 2014 21:25:22 +0000 (14:25 -0700)]
shared/gatt-client: Add service iterator functions.
This patch introduces high-level structures and functions for iterating through,
and storing, data about the discovered services.
Arman Uguray [Thu, 28 Aug 2014 21:25:21 +0000 (14:25 -0700)]
shared/gatt-client: Implement initial service discovery.
This code implements the following portion of attribute discovery:
- Initial MTU exchange.
- Primary service discovery.
Discovery results aren't stored yet.
Arman Uguray [Thu, 28 Aug 2014 21:25:20 +0000 (14:25 -0700)]
shared/gatt-client: Add bt_gatt_client_set_debug.
Added the bt_gatt_client_set_debug function, which sets up a callback to be used
internally by util_debug.
Arman Uguray [Thu, 28 Aug 2014 21:25:19 +0000 (14:25 -0700)]
shared/gatt-helpers: Fixed typo in callback args.
Fixed a small typo in one of the callback arguments.
Arman Uguray [Thu, 28 Aug 2014 21:25:18 +0000 (14:25 -0700)]
shared/att: Add BT_ATT_DEFAULT_LE_MTU macro.
Moved the ATT_DEFAULT_LE_MTU to att-types.h to make it public.
Arman Uguray [Thu, 28 Aug 2014 21:25:17 +0000 (14:25 -0700)]
shared/att: Support multiple disconnect handlers.
This patch adds support for registering multiple disconnect handlers with an
instance of struct bt_att. Unregistering is achieved via a new function AND
through bt_att_unregister_all and all disconnect callbacks get automatically
unregistered after a single disconnect event.
Arman Uguray [Thu, 28 Aug 2014 21:25:16 +0000 (14:25 -0700)]
shared/gatt-client: Added initial skeleton and simple functions.
This patch introduces shared/gatt-client, which provides a central/client side
implementation of the Generic Attribute Profile. An instance of bt_gatt_client
will provide a central database of all GATT services, characteristics, and
descriptors that have been discovered on a peripheral and will provide API
functions to obtain information about discovered attributes, registering
handlers for "Service Changed" indications, as well as providing
reference-counted access to "Client Characteristic Configuration" descriptors.
Arman Uguray [Thu, 28 Aug 2014 21:25:15 +0000 (14:25 -0700)]
shared/gatt-helpers: Added result count functions.
Added functions that return the number of services, characteristics, and
descriptors contained in a bt_gatt_result.
Arman Uguray [Thu, 28 Aug 2014 21:25:14 +0000 (14:25 -0700)]
shared/gatt-helpers: Remove service, characteristic, descriptor structures.
This patch removes the service, characteristic, and descriptor structures
declared in gatt-helpers.h. These aren't really necessary, especially since
there will be another higher-level version of these for shared/gatt-client.
Arman Uguray [Thu, 28 Aug 2014 21:25:13 +0000 (14:25 -0700)]
TODO: Add items for tasks involving the new shared ATT/GATT stack
Ravi kumar Veeramally [Wed, 27 Aug 2014 12:39:00 +0000 (15:39 +0300)]
android/tester: Add HDP Destroy Sink Streaming Channel test case
Ravi kumar Veeramally [Wed, 27 Aug 2014 12:38:59 +0000 (15:38 +0300)]
android/tester: Add HDP Connect Sink Streaming Channel test case
Ravi kumar Veeramally [Wed, 27 Aug 2014 12:38:58 +0000 (15:38 +0300)]
android/tester: Add HDP Destroy Source Reliable Channel test case
Ravi kumar Veeramally [Wed, 27 Aug 2014 12:38:57 +0000 (15:38 +0300)]
android/tester: Add HDP Connect Source Reliable Channel test case
Ravi kumar Veeramally [Wed, 27 Aug 2014 12:38:56 +0000 (15:38 +0300)]
android/health: Avoid multiple times of sdp search
First it searches for control and data PSMs and then search again
for remote mdep id. It would be better to search remote mdep id
and cache in first time itself. Patch avoids load of sdp search
request for second time.
Lukasz Rymanowski [Tue, 26 Aug 2014 20:41:52 +0000 (22:41 +0200)]
android/tester: Add test for incoming bonding
This patch add test for incoming just works bonding
Lukasz Rymanowski [Tue, 26 Aug 2014 20:41:51 +0000 (22:41 +0200)]
android/tester: Add function to set io cap to bthost
Some tests might need to change default io capabilities of bthost.
This patch adds means to do it.
Lukasz Rymanowski [Tue, 26 Aug 2014 20:41:50 +0000 (22:41 +0200)]
android/tester: Add parameter to remote connect function
This patch extends emu_remote_connect_hci_action function with address
type of device to be connected
Lukasz Rymanowski [Tue, 26 Aug 2014 20:41:49 +0000 (22:41 +0200)]
android/tester: Move emu related functions to tester main
Those function can be used by other tester modules
In addition function emu_remote_disconnect_hci_action has been changed a
bit so it take handle from step data now. It was needed as cid_data was
static in tester_gatt.c
Lukasz Rymanowski [Tue, 26 Aug 2014 20:41:48 +0000 (22:41 +0200)]
android/bluetooth: Fix incoming just works bonding
With this patch Android framework will be notified about bonded device
which initiated bonding and used just works association model.
Szymon Janc [Wed, 27 Aug 2014 12:11:00 +0000 (14:11 +0200)]
android/avdtp: Move PSM definition to AVDTP header
Szymon Janc [Wed, 27 Aug 2014 13:01:19 +0000 (15:01 +0200)]
android/avdtp: Constify data in avdtp_service_cap_new
Jakub Tyszkowski [Mon, 25 Aug 2014 12:54:19 +0000 (14:54 +0200)]
android/hid: Force encryption for keyboards
Encryption is mandatory for keyboards. Instead of using hardcoded security
level it's now set per device (with LOW as default) and raised for
keyboards (after the SDP query is done). This level is then used to
establish outgoing connections and raising the security level of the
incomming ones.
Jakub Tyszkowski [Mon, 25 Aug 2014 12:54:18 +0000 (14:54 +0200)]
android/hid: Reject connections from unknown devices
Don't accept input from not bonded devices.
Szymon Janc [Tue, 26 Aug 2014 12:47:36 +0000 (14:47 +0200)]
android/client: Factor out hex string verification
Use common macro for hex string verification and convertion.
Marcin Kraglak [Tue, 26 Aug 2014 10:20:54 +0000 (12:20 +0200)]
android/pts: Update PTS GATT test results
Marcin Kraglak [Tue, 26 Aug 2014 10:20:53 +0000 (12:20 +0200)]
android/client: Fix incorrect data parsing
Use fill_buffer function in processing write_characteristic
and send_indication functions.
Szymon Janc [Tue, 26 Aug 2014 10:49:26 +0000 (12:49 +0200)]
android/README: Update not implemented status
get_remote_service_record is now implemented. Despite not being used
by Android Framework it turned out to be usefull for qualification.
Luiz Augusto von Dentz [Mon, 25 Aug 2014 14:22:52 +0000 (17:22 +0300)]
monitor: Make l2cap_frame_get* function to return bool
Luiz Augusto von Dentz [Mon, 25 Aug 2014 14:14:09 +0000 (17:14 +0300)]
monitor/avctp: Fix parsing of Company ID capability
Luiz Augusto von Dentz [Mon, 25 Aug 2014 14:12:39 +0000 (17:12 +0300)]
monitor/avctp: Make use of l2cap_frame_get*
Vikrampal Yadav [Mon, 25 Aug 2014 11:16:22 +0000 (16:46 +0530)]
monitor: Add AVRCP ListPlayerApplicationSettingValues support
Support for decoding AVRCP ListPlayerApplicationSettingValues
added in Bluetooth monitor.
Marcin Kraglak [Tue, 26 Aug 2014 05:37:47 +0000 (07:37 +0200)]
android/pts: Update PICS/PIXIT for GATT
Sebastian Chlad [Tue, 26 Aug 2014 09:07:56 +0000 (11:07 +0200)]
android/pts: HDP regression tests
Regression round for HDP against PTS 5.2 and Android 4.4.4
Andrei Emeltchenko [Tue, 26 Aug 2014 07:43:10 +0000 (10:43 +0300)]
android/doc: Update repository for Intel device build
Use repositories from github/01org/
Szymon Janc [Mon, 25 Aug 2014 13:59:51 +0000 (15:59 +0200)]
android/health: Shutdown MDL socket when freeing channel
PTS expects to close all data channels before sending delete
confirmation to peer. FD is passed over IPC to Android Bluetooth
application so it needs to be shutdown while freeing channel to
avoid races.
Ravi kumar Veeramally [Fri, 22 Aug 2014 09:10:06 +0000 (12:10 +0300)]
android/health: Call MDL shutdown after mdl_deleted_cb callback
Shutdown_mdl shutdown io channels and unrefs it. After that related
callbacks will shutdown or close and free its data. Due to timing
issue process_md_delete_mdl_req send delete confirmation response to
peer before properly shutting down all opened data channels.
Ravi kumar Veeramally [Fri, 22 Aug 2014 09:10:05 +0000 (12:10 +0300)]
android/health: Remove mcl instance on mcl_disconnected call back
MCAP library is maintaining two sets of mcl list. On mcl_disconnected
call mcl instance is removed from regular mcl list and cached in
mcl_cache list. health.c doesn't maintain any cached mcls list. So
mcl_conn variable doesn't make any sense of not being connected on
mcl_disconnected call back. So unref mcl on mcl_disconnected and don't
do anything in mcl_unached callback.
Marcin Kraglak [Fri, 22 Aug 2014 12:40:48 +0000 (14:40 +0200)]
android/tester: Force remotes ACL disconnection
This is needed or else we would need to extend the timeout for a single
test case in tester framework and wait two more seconds for ACL to
disconnect.
Marcin Kraglak [Fri, 22 Aug 2014 12:40:47 +0000 (14:40 +0200)]
emulator/bthost: Add hci disconnect
Jakub Tyszkowski [Fri, 22 Aug 2014 12:40:46 +0000 (14:40 +0200)]
android/tester: Wait for ACL disconnection before reconnect
We need the remote to drop its ACL before it tries to connect again.
Luiz Augusto von Dentz [Mon, 25 Aug 2014 08:33:51 +0000 (11:33 +0300)]
monitor/sdp: Make use of l2cap_frame_get*
Luiz Augusto von Dentz [Fri, 22 Aug 2014 10:23:03 +0000 (13:23 +0300)]
monitor: Add helper functions to get data from L2CAP frames
Szymon Janc [Fri, 22 Aug 2014 09:56:39 +0000 (11:56 +0200)]
android: Don't depend on libcap when building for Linux
Those are used only when building for Android target.
Lukasz Rymanowski [Thu, 21 Aug 2014 13:10:19 +0000 (15:10 +0200)]
android/pts: Update MPS test result
Test TC_SRC_TG_HFAV_CLH_MD_BV_04_I pass when Music application triggers
music play/pause after it gets both: Button Pushed and Button
Released events.
Note that AOSP Music player triggers play/pause just after it gets
Button Pushed
Marcin Kraglak [Thu, 21 Aug 2014 10:23:15 +0000 (12:23 +0200)]
android/pts: Update GAP PTS test results
Andrei Emeltchenko [Wed, 20 Aug 2014 13:05:59 +0000 (16:05 +0300)]
android/handsfree: Fix alignment
Andrei Emeltchenko [Wed, 20 Aug 2014 13:06:47 +0000 (16:06 +0300)]
android: Fix header include
Since Android KitKat we can use sys/prctl.h and sys/capability.h
as specified in the manual page. Fixes also build warnings:
...
warning: implicit declaration of function 'prctl'
[-Wimplicit-function-declaration]
if (prctl(PR_SET_KEEPCAPS, 1) < 0) {
^
...
Vinicius Costa Gomes [Wed, 20 Aug 2014 14:06:52 +0000 (11:06 -0300)]
audio/avdtp: Fix invalid reference counting
If the AVDTP session is terminated via any other mean than
'connection_lost()' (the only place that btd_device_unref() was called),
there was a dangling reference to the device.
This can be easily reproduced by suspending the host while using an A2DP
speaker. It has the very misleading effect of being unable to create the
device when the system resumes.
Vikrampal Yadav [Wed, 20 Aug 2014 09:24:07 +0000 (14:54 +0530)]
monitor: Fix AVRCP rejected packet handling error
Rectified the handling of AVRCP rejected packets in btmon.
Luiz Augusto von Dentz [Wed, 20 Aug 2014 08:19:47 +0000 (11:19 +0300)]
android/avrcp: Register CT record
This fixes TC_SDAS_BV_03_I which requires CT record.
Natanael Copa [Wed, 20 Aug 2014 09:06:21 +0000 (11:06 +0200)]
tools: fix headers for bcm43xx
PATH_MAX is defined in limits.h so include it explicitly.
This fixes the following compile error on musl libc (Alpine Linux):
tools/hciattach_bcm43xx.c: In function 'bcm43xx_locate_patch':
tools/hciattach_bcm43xx.c:313:14: error: 'PATH_MAX' undeclared (first use in this function)
char path[PATH_MAX];
^
Natanael Copa [Wed, 20 Aug 2014 09:17:47 +0000 (11:17 +0200)]
shared: include limits.h for PATH_MAX
PATH_MAX is defined in limits.h so include it explicitly.
This fixes the following compile error on musl libc (Alpine Linux):
src/shared/util.c: In function 'util_get_dt':
src/shared/util.c:99:16: error: 'PATH_MAX' undeclared (first use in this function)
char filename[PATH_MAX];
^
Lukasz Rymanowski [Wed, 20 Aug 2014 08:10:24 +0000 (10:10 +0200)]
android/bluetooth: Add debug log to select_device_bearer
This patch refactor a bit select_device_bearer function so we can get
debug log out of it. This log might be very useful in dual mode devices
scenarios
Lukasz Rymanowski [Wed, 20 Aug 2014 08:10:23 +0000 (10:10 +0200)]
android/bluetooth: Fix bdaddr_type in pairing scenario
With this patch correct bdaddr type is used in ssp pairing scenario
Andrei Emeltchenko [Wed, 20 Aug 2014 07:02:03 +0000 (10:02 +0300)]
android/health: Fix NULL dereference
In a case get_app(), get_device(), get_channel() fail prevent
dereference of NULL pointer. Fixes clang warnings:
...
android/health.c:1980:15: warning: Access to field 'dev' results in a
dereference of a null pointer (loaded from variable 'channel')
queue_remove(channel->dev->channels, channel);
^~~~~~~~~~~~
1 warning generated.
...
Lukasz Rymanowski [Thu, 7 Aug 2014 08:39:00 +0000 (10:39 +0200)]
android/bluetooth: Update pairing status on pair complete event
So far BfA updates android bond state after link key(s) are
distributed. With LE pairing it might happen that no keys are
distributed e.g remote device has Initiator Key Distribution and
Responder Key Distribution set to 0. In such case link is encrypted
with STK and after its disconnected, pairing needs to be done again.
With this patch Android will get update about pairing complete just
after BfA gets pairing complete from the kernel. It solve issue withnot
updated Android settings application, which is hanging on "Pairing", in
case when no keys are distributed.
However, bacause Android does not see the difference between bonded /
paired devices and because Android does not allow to update its bond
state if FSM it is not in 'pending' state, BfA updates Android with
BONDED state on pair_complete with success. This is how we are doing
so far for bonding and non-bonding pairing.
Note: BfA will update its bonded state after link key(s) are
distribiuted.
Luiz Augusto von Dentz [Tue, 12 Aug 2014 12:31:24 +0000 (15:31 +0300)]
gdbus: Fix crash when watch is toggled or disconnected
This partially reverts
510b32b7156625b9df737c916b7a7a5c6fb285b9 since it
still necessary to take a reference before calling dbus_watch_handle
since internally it can call watch_info_free as in the following trace:
Invalid read of size 8
at 0x121085: watch_func (mainloop.c:105)
by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
by 0x120541: main (main.c:551)
Address 0x5bbcd90 is 16 bytes inside a block of size 24 free'd
at 0x4A079AE: free (vg_replace_malloc.c:427)
by 0x4C7837E: g_free (gmem.c:252)
by 0x4F708BF: dbus_watch_set_data (dbus-watch.c:614)
by 0x4F70938: _dbus_watch_unref (dbus-watch.c:132)
by 0x4F6E9A7: _dbus_transport_handle_watch (dbus-transport.c:884)
by 0x4F59AFB: _dbus_connection_handle_watch (dbus-connection.c:1497)
by 0x4F70AF9: dbus_watch_handle (dbus-watch.c:683)
by 0x121084: watch_func (mainloop.c:103)
by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
by 0x120541: main (main.c:551)
Luiz Augusto von Dentz [Tue, 12 Aug 2014 12:11:29 +0000 (15:11 +0300)]
gdbus: Fix crash when calling g_dbus_add_service_watch
If g_dbus_add_service_watch is called for service which bus name is
already known the following crash can happen:
invalid read of size 1
at 0x4C2A2F2: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E97722: g_strdup (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x405B0C: update_name_cache (watch.c:435)
by 0x405C37: update_service (watch.c:593)
by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4038EA: client_ready (test-gdbus-client.c:1014)
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 0x403614: main (test-gdbus-client.c:1058)
Address 0x5dbe5d0 is 0 bytes inside a block of size 7 free'd
at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
by 0x4E7FF7E: g_free (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x405B04: update_name_cache (watch.c:434)
by 0x405C37: update_service (watch.c:593)
by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4038EA: client_ready (test-gdbus-client.c:1014)
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 0x403614: main (test-gdbus-client.c:1058)
Luiz Augusto von Dentz [Mon, 18 Aug 2014 08:09:13 +0000 (11:09 +0300)]
input: Fix crash when receiving event from uHID
uHID device is created only once so it is possible that the kernel send
events when there is no connection causing the following crash:
Invalid read of size 4
at 0x4EBC650: g_io_channel_unix_get_fd (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x42C56A: hidp_send_message (device.c:160)
by 0x46EF1C: queue_foreach (queue.c:206)
by 0x42E3B0: uhid_read_handler (uhid.c:98)
by 0x46E82C: read_callback (io-glib.c:168)
by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x40A972: main (main.c:607)
Address 0x70 is not stack'd, malloc'd or (recently) free'd
Szymon Janc [Tue, 19 Aug 2014 17:38:37 +0000 (19:38 +0200)]
doc: Update Android tests coverage
Szymon Janc [Mon, 18 Aug 2014 12:21:13 +0000 (14:21 +0200)]
android/pts: Update PAN PICS and tests results
Specification Errata #3558 makes LLMNR support optional as LLMNR Draft
was never adopted by IETF. AOSP doesn't support LLMNR.
Lukasz Rymanowski [Tue, 19 Aug 2014 08:12:24 +0000 (10:12 +0200)]
android/pts: Updated GAP test result
Updated test result and instruction for TC_BOND_BON_BV_04_C
Jakub Tyszkowski [Tue, 19 Aug 2014 09:32:07 +0000 (11:32 +0200)]
android/pts: Update GAP result for handling directed advertising
Previously used connection procedure was to slow for remotes preforming
directed advertising. This issue is no longer valid on the latest kernel
and auto connection support added recently to the daemon.
Sebastian Chlad [Tue, 19 Aug 2014 08:32:34 +0000 (10:32 +0200)]
android/pts: Update PTS files for L2CAP
PICS and PIXITs checked against PTS 5.2. Regression round on PTS
5.2 against Android 4.4.4. Interim results.
Marcin Kraglak [Tue, 19 Aug 2014 07:50:55 +0000 (09:50 +0200)]
android/pts: Update GAP PTS test results
Lukasz Rymanowski [Tue, 19 Aug 2014 13:45:29 +0000 (15:45 +0200)]
android/bluetooth: Fix device found notification
If device is dual mode and can be seen on both LE and BREDR, then
bdaddr_type in device struct keeps LE address type of that device.
During discovery, we should take current bdaddr_type to decide about
passing that device up to application or not. Using dev->braddr_type might
be misleading
This patch fix scenario when remote device is known as LE device and
recently has been found on inquiry seesion as DUAL mode device. In such
case, based on braddr_type and eir flags we could incorectly skip
new device notification for Android framework.
Ravi kumar Veeramally [Mon, 18 Aug 2014 09:07:02 +0000 (12:07 +0300)]
android/health: Simplify search_cb failure case
Ravi kumar Veeramally [Mon, 18 Aug 2014 09:07:01 +0000 (12:07 +0300)]
android/health: Add some information messages
Ravi kumar Veeramally [Mon, 18 Aug 2014 09:06:59 +0000 (12:06 +0300)]
android/health: Fix connect channel failure case
There is a possibilty of created channel is being added to queue,
but on failure case it does channel free but not removed from queue.
Johan Hedberg [Mon, 18 Aug 2014 10:58:27 +0000 (13:58 +0300)]
smp-tester: Fix invalid data test to expect a disconnect
Johan Hedberg [Mon, 18 Aug 2014 10:49:08 +0000 (13:49 +0300)]
smp-tester: Add support for expecting specific HCI commands
Johan Hedberg [Mon, 18 Aug 2014 10:48:23 +0000 (13:48 +0300)]
smp-tester: Add support for multiple test completion conditions
Jakub Tyszkowski [Mon, 18 Aug 2014 11:13:34 +0000 (13:13 +0200)]
android/pts: Update PBAP results
Johan Hedberg [Fri, 15 Aug 2014 11:02:52 +0000 (14:02 +0300)]
android/bluetooth: Fix getting RFCOMM channel instead of L2CAP PSM
Andrei Emeltchenko [Fri, 15 Aug 2014 10:30:40 +0000 (13:30 +0300)]
android: Fix memory leak
protos gets allocated and needs to be freed
Johan Hedberg [Fri, 15 Aug 2014 09:39:57 +0000 (12:39 +0300)]
monitor: Fix L2CAP fragment tracking for duplex data streams
The fragmentation state is independent in each direction of the data
flow. We should therefore track outgoing and incoming fragmentation
state separately. This patch extends the state tracking table with a
second column to fix this.
Arman Uguray [Thu, 14 Aug 2014 02:27:56 +0000 (19:27 -0700)]
shared/att: Handle disconnects.
This patch adds disconnect handling to bt_att, in which
io_set_disconnect_handler is used to set up a handler which cancels all
pending and queued ATT operations, marks the bt_att structure as invalid
and notifies the user via a specialized callback which can be set using
bt_att_set_disconnect_cb.
Once the bt_att structure is invalidated, either due to a timed-out ATT
protocol request/indication or a disconnect, it now destroys the
underlying io structure.
Arman Uguray [Thu, 14 Aug 2014 02:27:55 +0000 (19:27 -0700)]
shared/att: Use io_set_close_on_destroy.
It's better to use io_set_close_on_destroy as opposed to keeping a
special "close_on_unref" flag in bt_att. This not only achieves the
exact same result, but also allows the code to automatically close the
file descriptor from several places by simply calling io_destroy.
Arman Uguray [Thu, 14 Aug 2014 02:27:54 +0000 (19:27 -0700)]
shared/io-mainloop: Increment the ref count inside io_callback.
Incrementing the reference count before invoking the event handlers and
decrementing it thereafter allows io_destroy to be safely called from within
the event callbacks. This patch achieves that.
Johan Hedberg [Fri, 15 Aug 2014 07:50:52 +0000 (10:50 +0300)]
android/bluetooth: Minor coding style fixes
Grzegorz Kolodziejczyk [Thu, 14 Aug 2014 12:58:53 +0000 (14:58 +0200)]
android/pts: Update IOPT test results
Grzegorz Kolodziejczyk [Thu, 14 Aug 2014 12:58:52 +0000 (14:58 +0200)]
android/bluetooth: Add support for get remote service record property cmd
This allows to get service record property by uuid of specified remote device.
Vikrampal Yadav [Wed, 13 Aug 2014 12:05:17 +0000 (17:35 +0530)]
monitor: Add AVRCP ListPlayerApplicationSettingAttributes support
Support for decoding AVRCP ListPlayerApplicationSettingAttributes
added in Bluetooth monitor.
Grzegorz Kolodziejczyk [Wed, 13 Aug 2014 13:44:35 +0000 (15:44 +0200)]
android/bluetooth: remove unused include
uuid-helper.h is no longer used in bluetooth.c
Lukasz Rymanowski [Mon, 11 Aug 2014 17:23:32 +0000 (19:23 +0200)]
android/health: Fix reconnect scenario
When trying to reconnect to HDP device, BfA tries to connect MDL even
MCL is not connected.
D/BlueZ ( 2218): external/bluetooth/bluez/android/hal-health.c:connect_channel()
I/bluetoothd( 2220): bluetoothd[2221]: external/bluetooth/bluez/android/health.c:bt_health_connect_channel()
I/bluetoothd( 2220): bluetoothd[2221]: external/bluetooth/bluez/android/health.c:create_channel() mdep 1
D/BlueZ ( 2218): external/bluetooth/bluez/android/hal-bluetooth.c:handle_acl_state_changed() state 0
I/bluetoothd( 2220): bluetoothd[2221]: external/bluetooth/bluez/android/mcap-lib.c:mcap_create_mdl()
I/bluetoothd( 2220): bluetoothd[2221]: health: error creating mdl MCL is not connected
This patch makes sure that MCL is connected before trying to connect
MDL.
Andrei Emeltchenko [Wed, 13 Aug 2014 12:08:45 +0000 (15:08 +0300)]
monitor: Fix use of uninitialized value
Fixes clang warnings below:
...
CC monitor/avctp.o
monitor/avctp.c:600:2: warning: Function call argument is an
uninitialized value
print_indent(indent, ctrl_pdu_data_color, "AVRCP: ",
pdu2str(pduid),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
monitor/display.h:47:2: note: expanded from macro 'print_indent'
printf("%*c%s%s%s%s" fmt "%s\n", (indent), ' ', \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
...
Andrei Emeltchenko [Wed, 13 Aug 2014 11:32:07 +0000 (14:32 +0300)]
monitor: Handle default switch case
Fixes issues with junk packets.
Vikrampal Yadav [Wed, 13 Aug 2014 09:43:35 +0000 (15:13 +0530)]
monitor: Add AVRCP GetCapabilities support
Support for decoding AVRCP GetCapabilities added in
Bluetooth monitor.
Vikrampal Yadav [Wed, 13 Aug 2014 09:43:34 +0000 (15:13 +0530)]
monitor: Add AV/C specific PDUs' error macros and functions
Added AV/C specific PDUs' error macros and functions in
Bluetooth monitor.
Vikrampal Yadav [Wed, 13 Aug 2014 09:43:33 +0000 (15:13 +0530)]
monitor: Add AVRCP specific AV/C PDUs' macros and helper functions
Added AVRCP specific AV/C PDUs related stuffs such as macros and
helper functions in Bluetooth monitor.
Vikrampal Yadav [Wed, 13 Aug 2014 09:43:32 +0000 (15:13 +0530)]
monitor: Handle AVRCP specific AV/C PDUs
Added handling of AVRCP specific AV/C PDUs.
Vikrampal Yadav [Wed, 13 Aug 2014 09:43:31 +0000 (15:13 +0530)]
monitor: Add AV/C commands related macros and helper functions
Added AV/C commands related stuffs such as macros and helper
functions in Bluetooth monitor.
Vikrampal Yadav [Wed, 13 Aug 2014 09:43:30 +0000 (15:13 +0530)]
monitor: Add AVRCP specific AV/C commands support
Support for decoding AVRCP specific AV/C commands added in
Bluetooth monitor.
Sebastian Chlad [Wed, 13 Aug 2014 09:02:16 +0000 (11:02 +0200)]
android/pts: Correct trivial typos
Andrei Emeltchenko [Tue, 12 Aug 2014 12:46:36 +0000 (15:46 +0300)]
obexd: Fix possible NULL dereference
Remove snprintf error check. Fixes clang warnings below:
...
obexd/client/map.c:471:9: warning: Access to field 'message' results in
a dereference of a null pointer (loaded from variable 'err')
err->message);
^~~~~~~~~~~~
obexd/client/map.c:772:9: warning: Access to field 'message' results in
a dereference of a null pointer (loaded from variable 'err')
err->message);
^~~~~~~~~~~~
...