Commit Graph

2408 Commits

Author SHA1 Message Date
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
Jakub Tyszkowski
9bdab3911d android/pts: Update MCAP results 2014-06-26 18:04:42 +02:00
Jakub Tyszkowski
da9035cc45 android/mcaptest: Support MDL reconnection if MCL reconnected
This is needed in some PTS test cases.
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
c74c2926ba 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.
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
7ba28627a5 android/mcaptest: Support incoming connections
This adds support for handling incoming Control Link (MCL) and Data
Link (MDL) connections.
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
24989893f8 android/mcaptest: Support connect
This initiates the connection
2014-06-26 18:04:41 +02:00
Jakub Tyszkowski
126dbad0d1 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.
2014-06-26 18:04:39 +02:00
Jakub Tyszkowski
ce58b0bd70 android/pts: Change MCAP PIXIT value
Handling single data channel will simplify mcaptest tool.
This can be changed later when mcaptest will be improved.
2014-06-26 17:35:51 +02:00
Szymon Janc
2c2e873870 android/gatt: Fix not sending notification on get included service
If there was and error notification with GATT error status should be
send.
2014-06-26 11:15:31 +02:00
Szymon Janc
2520ba8587 android/gatt: Fix not sending notification if no included services 2014-06-26 11:15:30 +02:00
Ravi kumar Veeramally
ebf5439c30 android/health: Provide a helper funtion to search channel by id 2014-06-26 11:15:25 +02:00
Ravi kumar Veeramally
09d30507f0 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.
2014-06-26 10:56:26 +02:00
Ravi kumar Veeramally
a0ec9aee8f android/health: Rename matching functions 2014-06-26 10:28:18 +02:00
Luiz Augusto von Dentz
e847a85605 android/hog: Fix using invalid range for external report 2014-06-26 09:44:44 +02:00
Andrei Emeltchenko
e181b40d7c android/health: Fix setting wrong PSM for SDP record 2014-06-26 09:42:55 +02:00
Luiz Augusto von Dentz
8cdfae35c1 android/hog: Fix code style 2014-06-25 17:36:05 +02:00
Luiz Augusto von Dentz
ab063ec8c6 android/hidhost: Add hid_device_new helper function 2014-06-25 17:36:05 +02:00
Andrei Emeltchenko
16e27fa445 android/health: Add setting mcl callbacks for incoming connection
For incoming connection NULL is passed as argument since application is
not known yet.
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
c701a30bbe 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.
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
f756b74ba4 android/health: Add actual error message to error print 2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
32180fa3a6 android/health: Refactor setting mcl callbacks to function
Function will be used in other places as well.
2014-06-25 17:29:55 +02:00
Andrei Emeltchenko
c2cb1bf8c8 android/health: trivial: Fix missing space 2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
90d3512560 android/health: Remove extra check
gerr is always set on error condition.
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
a1d44da044 android/health: trivial: Remove empty line 2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
fddcaa4833 android/health: Fix missing error check 2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
ee86b4a255 android/health: Fix possible overflow 2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
1403ec3781 android/health: Remove unneeded check
In case of error err is always set so the check is not needed.
2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
e8bb8f1e1d android/hal-health: trivial: Correct coding style 2014-06-25 17:29:54 +02:00
Andrei Emeltchenko
961cbdfe13 android/gatt: Remove dead code
The code apparently left after wrong rebase as it duplicates code
several lines above.
2014-06-25 17:15:32 +02:00
Andrei Emeltchenko
054f3bcf05 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.
2014-06-25 17:15:32 +02:00
Szymon Janc
374d7a37da android/cts: Update tests results with CTS 4.4 R3
No LE GATT tests were run yet.
2014-06-25 16:51:54 +02:00
Szymon Janc
2ea7214869 android/bluetooth: Log error if loading LTKs or IRKs failed 2014-06-24 22:40:14 +02:00
Szymon Janc
df257c1950 android/gatt: Use proper address when connecting
If device was using RPA but address was resolved IDA must be used.
2014-06-24 22:40:14 +02:00
Szymon Janc
aea4b868b9 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.
2014-06-24 22:40:14 +02:00
Szymon Janc
edb033a01b android/bluetooth: Add get_device_android_addr helper
This will be used to fake address for Android Framework.
2014-06-24 22:40:14 +02:00
Szymon Janc
fded4d3716 android/bluetooth: Fix passing address type to SSP replies 2014-06-24 22:40:14 +02:00
Szymon Janc
d3e7e6f546 android/bluetooth: Pass device to send_bond_state_change function 2014-06-24 22:40:14 +02:00
Szymon Janc
36d29fc88f android/bluetooth: Add helper for finding device with android address 2014-06-24 22:40:14 +02:00
Grzegorz Kolodziejczyk
a0ad13ddd2 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.
2014-06-24 11:48:15 +02:00
Ravi kumar Veeramally
162f3f64db 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.
2014-06-24 10:20:12 +02:00
Ravi kumar Veeramally
ef7e4c3796 android/client: Write dummy data on fd on health source connect
PTS expects dummy data on fd when it connects in source role.
2014-06-24 10:19:17 +02:00