Commit Graph

19306 Commits

Author SHA1 Message Date
Szymon Janc
0655ac0d32 android/gatt: Update set_adv_data IPC to HAL API change 2014-06-12 12:18:33 +02:00
Szymon Janc
fa8f26feb1 android: Update HAL API to Android 4.4.3-r1.1 2014-06-12 12:18:33 +02:00
Jakub Tyszkowski
93af47ef15 android: Load Identity Resolving Keys
Load IRKs from file.
2014-06-12 12:15:00 +02:00
Jakub Tyszkowski
62cc5889fe android: Store remote's Identity Resolving Key
Persistent storage is used so we can load IRKs on startup.
2014-06-12 12:14:58 +02:00
Ravi kumar Veeramally
9beb1faa25 android/health: Fix MDEP data type
MDEP data type size is 2 octets.
2014-06-12 11:57:25 +02:00
Ravi kumar Veeramally
86eb34164f android/hal-ipc-api: Update Health MDEP command parameter 2014-06-12 11:56:35 +02:00
Andrei Emeltchenko
42b98fd60b android/gatt: Fix error status override 2014-06-12 11:54:09 +02:00
Grzegorz Kolodziejczyk
c2d4c9bda2 android/tester: Update expected UUIDs with MPS
Some tests verify that all local UUIDs are present.
2014-06-11 13:33:18 +02:00
Szymon Janc
81e1cd3cb8 android: Add Android CTS tests results 2014-06-10 15:34:02 +02:00
Szymon Janc
e55af38a98 android/README: Update information about GATT HAL support 2014-06-10 15:01:19 +02:00
Szymon Janc
cfc9452c0b android/hal-pan: Use compact syntax for event handlers 2014-06-10 14:56:29 +02:00
Szymon Janc
9692780128 android/hal-hidhost: Use compact syntax for event handlers 2014-06-10 14:56:29 +02:00
Szymon Janc
c7cd6e4361 android/hal-bluetooth: Use compact syntax for event handlers 2014-06-10 14:56:29 +02:00
Szymon Janc
a3bd6579ea android/hal-a2dp: Use compact syntax for event handlers 2014-06-10 14:56:29 +02:00
Ravi kumar Veeramally
39437cd5d1 android/hal-health: Add app state event handler 2014-06-10 14:56:29 +02:00
Ravi kumar Veeramally
73aa8b8411 android/hal-msg: Add application id to mdep config cmd struct
Register application cmd is fragmented into application and multiple
MDEP configurations data. Passing app id helps to find which mdep data
belongs to which registered application.
2014-06-10 14:56:29 +02:00
Ravi kumar Veeramally
8801bcae45 android/hal-health: Fix passing buf not cmd for passing data 2014-06-10 14:56:29 +02:00
Grzegorz Kolodziejczyk
5209ff5032 android/pts: Update GAP TC_CONN_CPUP_BV_06_C test result 2014-06-10 14:04:52 +02:00
Johan Hedberg
6fb74ba2f2 doc: Update test coverage 2014-06-10 14:54:59 +03:00
Johan Hedberg
404c356846 tools/mgmt-tester: Add SSP just-works test case
This patch adds a test case to ensure that we do not get any user space
confirmation callbacks when we're supposed to be doing just-works
pairing.
2014-06-10 14:54:59 +03:00
Jakub Tyszkowski
1ff1d4e911 android/gatt: Rename app unregister function
Its used for client and server apps unregistering
2014-06-10 13:34:21 +02:00
Jakub Tyszkowski
aee0b14475 android/gatt: Use common code for server and client apps unregister 2014-06-10 13:34:21 +02:00
Jakub Tyszkowski
04c4bab2bc android/gatt: Use fill_gatt_response in response processing
This makes use of fill_gatt_response in function doing reads on queue
with pending responses.
2014-06-10 13:34:21 +02:00
Jakub Tyszkowski
4ca3d8bcb2 android/gatt: Move response filling functions up
Its needed to be called from read_requested_attributes.
2014-06-10 13:34:21 +02:00
Jakub Tyszkowski
663c2ca504 android/gatt: Improve response filling function
Some functionality was extracted so it can be used from functions
already having device and pending response pointers without redundant
search. Parameters order was improved and some were removed. Function
name was changed as the real sending is done elsewere.
2014-06-10 13:34:21 +02:00
Jakub Tyszkowski
9f6f6cb203 android/gatt: Fix double processing of pending responses list
send_gat_response should have been used to only fill the response
data since when pending reponses queue was introduced and response
sending was moved to queue processing function.
2014-06-10 13:34:21 +02:00
Jakub Tyszkowski
64daf61e43 android/gatt: Dont process pending requests if queue is empty
Processing empty queue can result with crash:

bluetoothd[1670]:
    external/bluetooth/bluez/attrib/gattrib.c:g_attrib_ref() 0x6035878:
    ref=2
    02-23 21:36:05.650 I/bluetoothd( 1669): ==1670== Invalid
    read of size 1
    02-23 21:36:05.650 I/bluetoothd( 1669): ==1670==    at 0x12151E:
    send_dev_pending_response (gatt.c:3914)
    02-23 21:36:05.650 I/bluetoothd( 1669): ==1670==    by 0x121B33:
    process_dev_pending_requests (gatt.c:4228)
    02-23 21:36:05.650 I/bluetoothd( 1669): ==1670==    by 0x123955:
    att_handler (gatt.c:5049)
2014-06-10 13:34:20 +02:00
Jakub Tyszkowski
dd27e2dceb android/gatt: Always check for complete response queue
This moves the check for pending responses to response sending function
as it should always be used with this check. Since sending only complete
response is allowed, the function name was changed to better represent
what it does.
2014-06-10 13:34:20 +02:00
Jakub Tyszkowski
6136954aa3 android/gatt: Rename app connection handling function
These are handling app connections thus we should make this clear by
proper naming.
2014-06-10 13:34:20 +02:00
Johan Hedberg
c5162672e9 input: Fix access to uninitialized data when authorizing connections
There were bt_io_get() failure code paths in two places that would
access "src" and "dst" when they are uninitialized. This would happen
e.g. if the HID device disconnects before we've authorized the
connection. To fix this we now save the remote address in a more
complete confirm context and use the source address already available in
the server context.
2014-06-10 13:27:55 +03:00
Szymon Janc
257dfac984 doc: Update test-hfp coverage statistics 2014-06-10 11:39:46 +02:00
Szymon Janc
7f26eab8eb shared/hfp: Fix crash due to invalid free
If there are no characters before '\r' memchr() will return pointer
matching passed string. This will results either in double free (if
'\r' happen to be the first byte in ringbuffer buffer) or in freeing
pointer inside ringbuffer buffer (if '\r' is not the first byte).
2014-06-10 11:38:46 +02:00
Szymon Janc
ee9dc0d40d unit/test-hfp: Add test for parsing empty string
Test if parser is properly handling single '\r'.
2014-06-10 11:38:46 +02:00
Andrei Emeltchenko
ec20ba7a84 android/hal-audio: Fix memory leak
Fixes clang warning:
...
android/hal-audio.c:484:3: warning: Potential leak of memory pointed to
by 'preset'
...
2014-06-09 14:52:37 +03:00
Andrei Emeltchenko
49cc4676c6 android/avrcp: Fix accessing pointer 2014-06-09 14:52:37 +03:00
Eva Kolanska
24efc486ca android/pts: Update GAP test results 2014-06-09 11:54:27 +02:00
Sebastian Chlad
254d71e0d9 android/pts: Re-run PTS for A2DP
PTS session for A2DP which includes new PICS settings with PICS:
'Additional encoder Codec' set to TRUE as there is aptX support
added.
2014-06-09 11:45:27 +02:00
Marcel Holtmann
cbea745941 doc: Update management command list for 3.16 kernels 2014-06-08 21:11:58 +02:00
Antonio Ospite
fbe7d5226f plugins/sixaxis: Add a set_leds_sysfs() function
On recent kernels the hid-sony driver exposes leds class entries in
sysfs for setting the Sixaxis LEDs, use this interface and fall back to
hidraw in case using sysfs fails (e.g. on older hid-sony versions).

Setting the LEDs via sysfs is the preferred way on newer kernels, the
rationale behind that is:

  1. the Sixaxis uses the same HID output report for setting both LEDs
     and rumble effects;
  2. hid-sony remembers the state of LEDs in order to preserve them when
     setting rumble effects;
  3. when the LEDs are set via hidraw hid-sony has no way to know the
     new LEDs state and thus can change the LEDs in an inconsistent way
     when setting rumble effects later.

Also require libudev >= 172, this is where
udev_enumerate_add_match_parent() has been first introduced.

NOTE: using udev_enumerate_add_match_parent() results in a memory leak
when enumerating child devices, this has been fixed in udev 207; the
commit which fixes the issue is this one:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=51cc07576e119dea6e65478eeba9472979fd0936
2014-06-08 14:54:41 +02:00
Antonio Ospite
1a124e4acc plugins/sixaxis: Add a get_leds_data() function
Get all the data necessary to set the LEDs in a single function,
returning a leds_data structure to be passed as argument to the
setup_leds() callback.

For now only a 'bitmap' field is used, which is the only thing that
set_leds_hidraw() needs.
2014-06-08 14:54:41 +02:00
Antonio Ospite
fdbe933252 plugins/sixaxis: Fix get_js_number() for devices connected via BT
Match hid devices and input devices using HID_UNIQ and UNIQ when these
are available, this is the correct way to get matching devices when the
controllers are connected via BT (UNIQ refers to the device bdaddr, PHYS
is the adapter bdaddr, so matching against PHYS will result in all
devices with the same LED number).

Fall back to HID_PHYS and PHYS when needed, hid devices do not define
HID_UNIQ when connected via USB.
2014-06-08 14:54:41 +02:00
Marcel Holtmann
9423547294 unit: The crypto create and cleanup functions are not test cases 2014-06-06 16:44:39 +02:00
Eva Kolanska
8e07f07562 android/pts: Update GATT test result 2014-06-06 14:28:58 +03:00
Marcin Kraglak
64bd6b25f1 android/client: Fix reversing send_response values
Add function to parse hex string to uint8_t array and use it in
send_response command.
2014-06-06 14:28:56 +03:00
Luiz Augusto von Dentz
e8782aa19b doc: Update test coverage numbers 2014-06-06 11:41:59 +03:00
Andrzej Kaczmarek
85e5b72c14 android/hal-audio-aptx: Add encoding 2014-06-06 11:27:45 +03:00
Andrzej Kaczmarek
922a069bec android/hal-audio-aptx: Load aptX encoder library
This patch adds loading of aptX encoder library which should be provided
by user. hal-audio-aptx will try to load 'libbt-aptx.so' so it should be
available in search patch, preferably in /system/lib.
2014-06-06 11:27:45 +03:00
Andrzej Kaczmarek
683aa4bf36 android/hal-audio-aptx: Add initial support for aptX codec
This patch adds support for aptX codec. Since this is proprietary codec
it requires to obtain license form vendor (CSR) in order to use it.
Also shared library which provices encoder implementation is required
since this implementation only wraps it into audio HAL.
2014-06-06 11:27:45 +03:00
Andrzej Kaczmarek
99849cb584 android/hal-audio: Allow codec to init on startup
This patch adds optional load/unload methods for codec which can be
used to initialize some static data for codec, e.g. load shared library
which provides encoder. Unlike init/cleanup which are called on stream
open/close these methods are called when audio device is opened/closed
thus most likely only once.

Codecs which are loaded properly (or do not have load callback) are
added to separate queue and used later to register endpoints.
2014-06-06 11:27:45 +03:00
Andrzej Kaczmarek
c44c923bc9 android/hal-audio: Always call qos_update
As it turned out, it's better to always call update_qos and just
provide dummy callback from codecs which do not support it.
2014-06-06 11:27:45 +03:00