Commit Graph

19586 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
6e9e2b2aa5 android/dis: Only cache the handle not all the characteristics 2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
6df02947eb android/dis: Add bt_dis_set_notification
Function bt_dis_set_notification can be used to set notify callback.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
2fe26ad5a0 android/dis: Strip dependencies from deviceinfo plugin
This strip any dependecy from deviceinfo plugin so the code can be reused
by HoG implementation.
2014-06-29 14:52:36 +02:00
Luiz Augusto von Dentz
46247817b7 android/dis: Add copy to Device Info implementation 2014-06-29 14:52:36 +02:00
Marcel Holtmann
6dac212ae3 doc: Update possible error codes for Add Device and Remove Device 2014-06-29 14:32:47 +02:00
Szymon Janc
fadaf6540e android/pts: Update L2CAP settings and tests results 2014-06-29 14:25:30 +02:00
Andrei Emeltchenko
9c9010a3f5 android/pts: Update HDP test results
Mark ECHO server tests passed.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
31cee75db5 android/health: Improve debug 2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
82a4700920 android/health: Add handling for ECHO service
Reply received buffer back for ECHO service.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
da667c204b android/health: Create mdep for ECHO channel 2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
6dafdbdf54 android/health: Assign channel to user_data
Assign channel for incoming connections when it is created.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
352a275e53 android/health: Add channel connect
Connect channel on incoming connection callback
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
3a7ee97b14 android/health: Refactor channel creation
Avoid using app_id when we shall use app structure itself. Otherwise we
end up with unnecessary searches for app and problems for incoming
connections.
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
ea49265918 android/health: Add handling MDL connection request
Handles MDL connection request for ECHO service
2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
9e4f42449c android/health: Add HDP definitions 2014-06-29 14:17:19 +02:00
Andrei Emeltchenko
e4f4e50353 android/health: Add error check when creating app 2014-06-29 14:17:19 +02:00
Marcel Holtmann
7f3adaeb6f lib: Remove not yet implemented management commands and events 2014-06-29 14:02:45 +02:00
Marcel Holtmann
718e7cfea3 lib: Update with the new mgmt command opcodes 2014-06-29 13:58:59 +02:00
Marcel Holtmann
2dbb42e525 doc: Update command opcode for Load Connection Parameters 2014-06-29 13:55:08 +02:00
Marcel Holtmann
9c76a0a483 doc: Add management commands for Add Device and Remove Device 2014-06-29 13:54:35 +02:00
Marcel Holtmann
8303897686 doc: Move get clock info command to the next available opcode 2014-06-29 13:53:10 +02:00
Marcel Holtmann
00fa756b5d tools: Don't try to read BD_ADDR manually for raw devices 2014-06-28 23:10:00 +02:00
Marcel Holtmann
73de6ea5fe lib: Add strings for connection parameter and clock info opcodes 2014-06-28 19:02:43 +02:00
Johan Hedberg
c863b07ea4 tools/btmgmt: Add basic support for Get Clock Info command 2014-06-28 17:51:47 +03:00
Johan Hedberg
17926da6e8 lib/mgmt: Add defines for Get Clock Information 2014-06-28 17:51:35 +03:00
Sebastian Chlad
7441f6c6a9 android/pts: Add test files for DIS 2014-06-27 19:15:03 +02:00
Szymon Janc
dcbf0593c7 android/gatt: Remove System ID from DIS
System ID is not just a string but has a specified format and
should be unique.

DIS specification p. 3.7:
"The System ID characteristic shall represent a structure containing
an Organizationally Unique Identifier (OUI) followed by a manufacturer-defined
identifier and is unique for each individual instance of the product."
2014-06-27 19:15:03 +02:00
Sebastian Chlad
76d93eab9a android/pts: Add test files for ScPP 2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
006e46b3e2 android/hog: Add support for Scan Parameter Service
If primary is not provided meaning primary should be auto discovered it
probably means other primary services such as Scan Parameter Profile
are not being handled either so just handle ScPP as well in such case.
2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
6c534e2f75 android/scpp: Check for cached handles on attach 2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
dbd31643a1 android/scpp: Add bt_scpp_set_interval and bt_scpp_set_window
These functions can be used to change the current values.
2014-06-27 18:09:44 +02:00
Luiz Augusto von Dentz
579a639f09 android/scpp: Strip dependencies from scan plugin
This strip any dependecy from scan plugin so the code can be reused
by HoG implementation.
2014-06-27 18:09:43 +02:00
Luiz Augusto von Dentz
5d5e9d5ba1 android/scpp: Add copy to Scan Parameter Profile implementation 2014-06-27 18:09:43 +02:00
Luiz Augusto von Dentz
0df04a3f3a lib/uuid: Add define for Scan Parameter UUID 2014-06-27 18:09:43 +02:00
Andrei Emeltchenko
bc29b7834e android/health: Fix NULL dereference 2014-06-27 16:12:18 +02:00
Andrei Emeltchenko
f9f6dd4c58 android/mcap: Fix using uninitialised value
Fixes clang warning:
...
android/mcap-lib.c:2366:20: warning: The left operand of '*' is a
garbage value
        return tv->tv_sec * 1000000ll + tv->tv_nsec / 1000ll;
               ~~~~~~~~~~ ^
1 warning generated.
...
2014-06-27 16:10:03 +02:00
Andrei Emeltchenko
12c8d6fdd4 android/health: Fix wrong callback return type 2014-06-27 15:43:31 +02:00
Ravi kumar Veeramally
58088e30b7 android/health: Implement destroy_channel call
Delete MDL channel with MDL_DELETE_REQ.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
8efc2021a2 android/health: Implement mdl reconnect
MDL reconnection can be called only when it is already created, connected
and closed not deleted.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
d411e3e012 android/health: Fix deleting channels queue
Channels queue is created only on device creation. So do not destroy
queue on all mdls deleted in mdl_deleted_cb, just remove all entries.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
424b25f164 android/health: Implement mdl_closed_cb callback
Callback will be called when data channel is disconnected/closed.
It does not mean that it is deleted. So only change connected status.
2014-06-27 15:30:24 +02:00
Ravi kumar Veeramally
71677f06b0 android/client: Introduce close_channel API in health
In order to run PTS MDL disconnect and reconnect, HAL api does
not support it. This close simply shutdown the fd, remote device
will be notified like data channel is closed not deleted. So ready
for reconnection.
2014-06-27 15:30:13 +02:00
Ravi kumar Veeramally
28fb4b17a8 android/health: Fix wrong user data passing in set_mcl_cb
It used to be channel, when set_mcl_cb refactored
it got changed to channed->dev.
commit 32180fa3a6 introduced it.
2014-06-27 15:29:33 +02:00
Jakub Tyszkowski
bec4567faa android/pts: Update MCAP results 2014-06-27 14:35:41 +02:00
Jakub Tyszkowski
38efcec2f0 android/mcaptest: Support unavailable response to first MDL connect
This is needed to pass TC_MCAP_ERR_BI_16_C
2014-06-27 14:35:41 +02:00
Jakub Tyszkowski
1e71953f80 android/mcaptest: Send clock sync capabilities request
This adds option to send synchronization capabilities and requirements
request on MCL connection.
2014-06-27 14:35:41 +02:00
Marcel Holtmann
4a06d82515 doc: Add management command to get clock information 2014-06-27 14:17:17 +03:00
Luiz Augusto von Dentz
3053eb7a0a 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)
2014-06-27 14:02:25 +03:00
Luiz Augusto von Dentz
3382ea0558 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)
2014-06-27 14:02:25 +03:00
Marcel Holtmann
e4ad2b67ee doc: Add address type information to get connection info command 2014-06-27 11:44:39 +02:00