Commit Graph

19466 Commits

Author SHA1 Message Date
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
Andrei Emeltchenko
09b9afbbea HDP: Fix NULL check
Improves readability of the code using similar check for not NULL.
2014-06-25 12:26:19 +03:00
Andrei Emeltchenko
dc95c60e08 HDP: trivial: Remove empty lines 2014-06-25 12:26:15 +03:00
Andrei Emeltchenko
333dacef05 HDP: Fix possible memory leak 2014-06-25 12:26:11 +03:00
Andrei Emeltchenko
ba5442362d mcap: Fix possible overflow 2014-06-25 12:25:58 +03:00
Andrei Emeltchenko
eaebd5db40 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.
2014-06-25 12:25:55 +03:00
Andrei Emeltchenko
0a295fa8ea 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.
2014-06-25 12:25:47 +03:00
Andrei Emeltchenko
faf90d0d52 HDP: Remove extra debug statements
DBG() includes function name by default, so including it is not needed.
2014-06-25 12:25:18 +03: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
Ravi kumar Veeramally
1a384796a5 android/client: Fix coding style 2014-06-24 10:19:02 +02:00
Ravi kumar Veeramally
36c0227f52 android/health: Fix error messages 2014-06-24 10:19:02 +02:00
Ravi kumar Veeramally
5503e3ae0e 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.
2014-06-24 10:19:02 +02:00
Luiz Augusto von Dentz
ee675de191 android/pics: Do not set Suspend feature in HOGP
This requires integration with Android power management so leave it out
for now.
2014-06-24 09:50:55 +02:00
Luiz Augusto von Dentz
33a5353e06 android/pics: Fix having both types of discover set in HOGP
Currently the code discover by service handle and not by UUID.
2014-06-24 09:50:43 +02:00
Szymon Janc
59a17e31ce android/client: Fix closing wrong FD in health HAL 2014-06-23 15:29:11 +02:00
Andrei Emeltchenko
e61fc2565e 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.
2014-06-23 14:37:28 +03:00
Ravi kumar Veeramally
7d4d7bec38 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.
2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
6d127e3bae 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.
2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
a61f99c4a3 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.
2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
ab8a1f1df7 android/health: Notify channel status on channel destroy call 2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
e5f4e488f4 android/health: Cache remote mdep id on channel connect request
Remote mdep is required to initiate MD_CREATE_MDL_REQ request.
2014-06-23 10:57:59 +02:00
Ravi kumar Veeramally
4543ac00e8 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.
2014-06-23 10:57:59 +02:00
Marcel Holtmann
b3bfa3614c AUTHORS: Mention Arman's contributions 2014-06-23 10:37:21 +02:00
Marcel Holtmann
33f84d58ee shared/att: Fix a few compiler warnings 2014-06-23 10:36:23 +02:00
Arman Uguray
4f524c86fa 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.
2014-06-23 10:31:49 +02:00
Arman Uguray
661ae6851b 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.
2014-06-23 10:31:44 +02:00
Arman Uguray
f21a18af28 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.
2014-06-23 10:31:40 +02:00
Arman Uguray
8b0625c471 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.
2014-06-23 10:31:32 +02:00