Commit Graph

15976 Commits

Author SHA1 Message Date
Jerzy Kasenberg
ac77140a00 android/client: Add helper macros to verify args
This patch adds bunch of macros that will simplify
common arguments checking for methods.
2013-10-31 15:59:42 +02:00
Jerzy Kasenberg
c621c15d5e android/client: Add init/cleanup for GATT
This patch adds gatt functions code.
2013-10-31 15:59:34 +02:00
Jerzy Kasenberg
6c6e02b379 android/client: Add complex GATT type formating
This adds formating for complex types in GATT.
2013-10-31 15:58:51 +02:00
Jerzy Kasenberg
5d23d8caaf android/client: Add GATT client callbacks code
This adds callbacks code, mostly printing.
Complex formating function not implemented yet.
2013-10-31 15:58:41 +02:00
Jerzy Kasenberg
5c26c130f1 android/client: Add skeleton for GATT interface
This patch adds empty functions for all gatt methods
and callbacks.
2013-10-31 15:57:14 +02:00
Szymon Janc
c7a838af87 android/client: Don't align name property while printing
Received name property is guaranteed to be NULL terminated so there is
no need to use length specifier. This also fix really long space while
printing due to text alignment to the right.
2013-10-31 15:48:07 +02:00
Szymon Janc
dce613ef26 android: Set pairable mode only if it is not set
There is no need to set already set setting.
2013-10-31 15:46:30 +02:00
Szymon Janc
42817e6cc5 android: Always enable SSP if supported by controller
There is no HAL function to enable/disable SSP so always enable it if
supported by controller.
2013-10-31 15:46:29 +02:00
Andrei Emeltchenko
043251a8bc android/daemon: Fix not reporting scan mode to Java
After set_adapter_property() higher layer expects callback to be returned
even if property is not changes. Otherwise Java timeouts and reset Bluetooth
enetring to the loop.
...
BluetoothAdapterState( 2850): Timeout will setting scan mode..
  Continuing with disable...
...
2013-10-31 15:45:19 +02:00
Andrei Emeltchenko
5eaf3a88f3 android/daemon: Fix error setting property
Do not return error setting property which is already set. This fixes
bug with set_scan_mode which might return HAL_STATUS_DONE.
2013-10-31 15:44:43 +02:00
Luiz Augusto von Dentz
26ba19064d android/hid: Add handling of HAL_EV_HID_CONN_STATE
This patches generate proper events when the connection state changes:

>hidhost connect
BlueZ D: android/hal-hidhost.c:hh_connect()
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_CONNECTING
if_hh->connect: BT_STATUS_SUCCESS
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_CONNECTED
>hidhost disconnect
BlueZ D: android/hal-hidhost.c:hh_disconnect()
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_DISCONNECTING
if_hh->disconnect: BT_STATUS_SUCCESS
connection_state_cb: bd_addr= connection_state=BTHH_CONN_STATE_DISCONNECTED
2013-10-31 15:00:14 +02:00
Luiz Augusto von Dentz
6a92a05be3 android/hal-hidhost: Add implementation of .connection_state_cb 2013-10-31 15:00:10 +02:00
Luiz Augusto von Dentz
043fd76a2b android/hid: Add handling of incoming connections 2013-10-31 14:59:30 +02:00
Jerzy Kasenberg
3e4893a27b android/client: Fix crash in get_profile_interface
This fixes crash due to uncheck input from user.
2013-10-31 13:51:59 +02:00
Szymon Janc
42876422b2 android: Add support for handling remove bond command
Bond state change is send when command complete for unpair device is
received and status was success.
2013-10-31 12:32:24 +02:00
Szymon Janc
08e6aadd83 android/hal: Add support for repacking received IPC data to HAL data
Some HAL defined types that are passed as type-len-value in properties
callback needs to be repacked at runtime to match defined types.

This is due to HAL using data types without strict refined sizes like
enums or unpacked structures. This is needed only if data is passed as
TLV. With data passed to callbacks as parameters compiler will handle
types convertion.

Currently only enum types are supported.
2013-10-31 10:55:43 +02:00
Andrei Emeltchenko
a49fa76fa8 android/haltest: Fix bug when building for Android 4.2.2
Since I started to use system Android headers instead of local this
bug was found.
2013-10-31 10:53:10 +02:00
Andrei Emeltchenko
dd4f0ea5f4 android/haltest: Use Android system headers instead of local 2013-10-31 10:52:53 +02:00
Szymon Janc
705b9a2d47 android: Add support for handling SSP reply command 2013-10-31 10:51:27 +02:00
Szymon Janc
1169f47966 android: Add support for handling pin reply command 2013-10-31 10:51:16 +02:00
Szymon Janc
e7d8ab6427 android: Add support for notify variant in SSP request event 2013-10-31 10:50:38 +02:00
Szymon Janc
c5b55f0345 android: Add support for entry variant in SSP request event 2013-10-31 10:50:35 +02:00
Szymon Janc
17ee50486b android: Add initial support for sending SSP request event
Only consent and confirm variants are supported in this patch.
2013-10-31 10:50:28 +02:00
Szymon Janc
6e2e717e92 android: Add support for sending pin code request 2013-10-31 10:50:21 +02:00
Szymon Janc
a56bec6642 android: Add support for handling cancel bond command 2013-10-31 10:47:48 +02:00
Szymon Janc
9ec2351f61 android: Add support for handling create bond command 2013-10-31 10:47:26 +02:00
Szymon Janc
2ed04662f4 android: Set default IO capability on daemon start
There is no HAL function for setting IO capabilities so this is
hardcoded to DisplayYesNo as Android devices usually have screen
and input.
2013-10-31 10:47:11 +02:00
Szymon Janc
21bf46e168 android: Make load_link_keys function load keys
GSlist passed is expected to hold mgmt_link_key_info structures.
2013-10-31 10:46:56 +02:00
Szymon Janc
7e0bc2f00d android: Add support for handling new link key mgmt event
When link key is emitted by kernel bond state change notification is
send to HAL. Storing link key is not yet implemented.
2013-10-31 10:45:51 +02:00
Szymon Janc
e7356e5e82 android: Add missing bond state definition to IPC header 2013-10-31 10:45:43 +02:00
Szymon Janc
424219cdf2 android: Add missing bonding state definitions to IPC specification 2013-10-31 10:45:33 +02:00
Andrei Emeltchenko
51236854f2 android: Use Android headers instead of local ones
Add path to Android libhardware library headers
2013-10-31 10:41:55 +02:00
Marcin Kraglak
a56aeec37d android: Initial implementation of socket interface
Add stub implementation of socket interace on daemon side.
2013-10-31 10:30:00 +02:00
Marcin Kraglak
2a7971fc3e android/hal: Add initial socket implementation
Added socket api opcodes and structures and its implementation
in hal-sock.c.
2013-10-31 10:29:40 +02:00
Jerzy Kasenberg
ea1347cf44 android/client: Define Android version for host
This patch defines PLATFORM_SDK_VERSION like it is handled in
Android.mk. This value corresponds to current copy of headers
from Android committed to bluez.
2013-10-30 17:04:33 +02:00
Luiz Augusto von Dentz
d9ea2226c0 android/hid: Fix not cleanup properly after disconnect
If the device is disconnected it should be removed from the list of
connected devices and free its data.
2013-10-30 16:42:19 +02:00
Jerzy Kasenberg
dbefd63d01 android: Fix compiler flags with Android version
This fixes commit that removed PLATFORM_SDK_VERSION when building
haltest. Now all android targets get this define.
2013-10-30 16:32:24 +02:00
Johan Hedberg
35b7d4b353 tools/mgmt-tester: Rename 'LE-only' to 'LE' for nicer logs 2013-10-30 16:12:32 +02:00
Johan Hedberg
7522cd327a tools/mgmt-tester: Add LE test for set_connectable when limited discoverable
We also need to update the order of the initial settings since limited
discoverable is only allowed when powered on.
2013-10-30 15:53:41 +02:00
Johan Hedberg
395eba9b17 tools/mgmt-tester: Add LE test for connectable off when discoverable 2013-10-30 15:44:19 +02:00
Johan Hedberg
e5748af3d1 tools/mgmt-tester: Add basic LE-only discoverable on test case 2013-10-30 15:33:56 +02:00
Johan Hedberg
6b2d2e8097 tools/mgmt-tester: Add basic LE-only limited discoverable on test case 2013-10-30 15:26:06 +02:00
Johan Hedberg
09da9e2fbb tools/mgmt-tester: Add basic BR/EDR limited discoverable on test cases 2013-10-30 15:10:25 +02:00
Johan Hedberg
f83187dd40 tools/mgmt-tester: Fix sending right set_discoverable parameters in setup 2013-10-30 14:47:46 +02:00
Johan Hedberg
20c2fedb79 tools/mgmt-tester: Fix calling test_setup twice 2013-10-30 14:43:47 +02:00
Jakub Tyszkowski
ef4f77e680 android: Add missing discovery state definitions to IPC header 2013-10-30 12:12:14 +02:00
Jakub Tyszkowski
ccfc207b4f android/hal: Add device state changed event handler
This is used to report property change of already reported remote
device.
2013-10-30 12:11:55 +02:00
Jakub Tyszkowski
56f12d1a33 android/hal: Add device found event handler
This is called when new remote device is found.
2013-10-30 12:11:46 +02:00
Jakub Tyszkowski
66f9de59f3 android/hal: Extract bt property repacking code for further reuse
This extracted part of code can be reused for repacking remote device
properties.
2013-10-30 12:11:33 +02:00
Jakub Tyszkowski
2cbbb5bbb6 android/hal: Add support for handling discovery state change event 2013-10-30 12:11:24 +02:00