OSDN Git Service

android-x86/external-bluetooth-bluez.git
10 years agoandroid/hal-ipc: Move exit calls outside of handle_msg
Szymon Janc [Tue, 20 May 2014 10:49:48 +0000 (12:49 +0200)]
android/hal-ipc: Move exit calls outside of handle_msg

This reduce number of exit points in preparation for destroy callback.

10 years agoandroid/hal-ipc: Fix missing mutex unlock
Szymon Janc [Tue, 20 May 2014 10:33:09 +0000 (12:33 +0200)]
android/hal-ipc: Fix missing mutex unlock

This is a preparation for destroy callback.

10 years agoandroid/hal-ipc: Allow to pass custom path to IPC
Szymon Janc [Tue, 20 May 2014 10:07:54 +0000 (12:07 +0200)]
android/hal-ipc: Allow to pass custom path to IPC

10 years agoandroid/ipc: Make struct service_handler private
Szymon Janc [Tue, 20 May 2014 09:31:47 +0000 (11:31 +0200)]
android/ipc: Make struct service_handler private

10 years agoandroid: Re-enable support for Android 4.4.2
Szymon Janc [Wed, 11 Jun 2014 11:31:01 +0000 (13:31 +0200)]
android: Re-enable support for Android 4.4.2

Due to very unfortunate change Android 4.4.3-r1.1 BT GATT HAL API is
not backward compatible. This adds support for 4.4.3-r1.1 and 4.4.2.

On android PLATFORM_VERSION is used to determine which API should be
used. On Linux we always build with latest API.

10 years agoandroid/gatt: Update set_adv_data IPC to HAL API change
Szymon Janc [Wed, 11 Jun 2014 11:31:00 +0000 (13:31 +0200)]
android/gatt: Update set_adv_data IPC to HAL API change

10 years agoandroid: Update HAL API to Android 4.4.3-r1.1
Szymon Janc [Wed, 11 Jun 2014 11:30:59 +0000 (13:30 +0200)]
android: Update HAL API to Android 4.4.3-r1.1

10 years agoandroid: Load Identity Resolving Keys
Jakub Tyszkowski [Wed, 11 Jun 2014 08:00:14 +0000 (10:00 +0200)]
android: Load Identity Resolving Keys

Load IRKs from file.

10 years agoandroid: Store remote's Identity Resolving Key
Jakub Tyszkowski [Wed, 11 Jun 2014 08:00:13 +0000 (10:00 +0200)]
android: Store remote's Identity Resolving Key

Persistent storage is used so we can load IRKs on startup.

10 years agoandroid/health: Fix MDEP data type
Ravi kumar Veeramally [Tue, 10 Jun 2014 13:21:59 +0000 (16:21 +0300)]
android/health: Fix MDEP data type

MDEP data type size is 2 octets.

10 years agoandroid/hal-ipc-api: Update Health MDEP command parameter
Ravi kumar Veeramally [Tue, 10 Jun 2014 13:21:58 +0000 (16:21 +0300)]
android/hal-ipc-api: Update Health MDEP command parameter

10 years agoandroid/gatt: Fix error status override
Andrei Emeltchenko [Mon, 9 Jun 2014 08:26:16 +0000 (11:26 +0300)]
android/gatt: Fix error status override

10 years agoandroid/tester: Update expected UUIDs with MPS
Grzegorz Kolodziejczyk [Wed, 11 Jun 2014 09:25:09 +0000 (11:25 +0200)]
android/tester: Update expected UUIDs with MPS

Some tests verify that all local UUIDs are present.

10 years agoandroid: Add Android CTS tests results
Szymon Janc [Tue, 10 Jun 2014 13:21:24 +0000 (15:21 +0200)]
android: Add Android CTS tests results

10 years agoandroid/README: Update information about GATT HAL support
Szymon Janc [Tue, 10 Jun 2014 09:32:09 +0000 (11:32 +0200)]
android/README: Update information about GATT HAL support

10 years agoandroid/hal-pan: Use compact syntax for event handlers
Szymon Janc [Tue, 10 Jun 2014 12:52:02 +0000 (14:52 +0200)]
android/hal-pan: Use compact syntax for event handlers

10 years agoandroid/hal-hidhost: Use compact syntax for event handlers
Szymon Janc [Tue, 10 Jun 2014 12:50:56 +0000 (14:50 +0200)]
android/hal-hidhost: Use compact syntax for event handlers

10 years agoandroid/hal-bluetooth: Use compact syntax for event handlers
Szymon Janc [Tue, 10 Jun 2014 12:47:22 +0000 (14:47 +0200)]
android/hal-bluetooth: Use compact syntax for event handlers

10 years agoandroid/hal-a2dp: Use compact syntax for event handlers
Szymon Janc [Tue, 10 Jun 2014 12:40:38 +0000 (14:40 +0200)]
android/hal-a2dp: Use compact syntax for event handlers

10 years agoandroid/hal-health: Add app state event handler
Ravi kumar Veeramally [Mon, 9 Jun 2014 14:28:13 +0000 (17:28 +0300)]
android/hal-health: Add app state event handler

10 years agoandroid/hal-msg: Add application id to mdep config cmd struct
Ravi kumar Veeramally [Mon, 9 Jun 2014 14:28:09 +0000 (17:28 +0300)]
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.

10 years agoandroid/hal-health: Fix passing buf not cmd for passing data
Ravi kumar Veeramally [Mon, 9 Jun 2014 14:28:08 +0000 (17:28 +0300)]
android/hal-health: Fix passing buf not cmd for passing data

10 years agoandroid/pts: Update GAP TC_CONN_CPUP_BV_06_C test result
Grzegorz Kolodziejczyk [Mon, 9 Jun 2014 14:14:19 +0000 (16:14 +0200)]
android/pts: Update GAP TC_CONN_CPUP_BV_06_C test result

10 years agodoc: Update test coverage
Johan Hedberg [Tue, 10 Jun 2014 11:54:45 +0000 (14:54 +0300)]
doc: Update test coverage

10 years agotools/mgmt-tester: Add SSP just-works test case
Johan Hedberg [Tue, 10 Jun 2014 11:49:54 +0000 (14:49 +0300)]
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.

10 years agoandroid/gatt: Rename app unregister function
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:22 +0000 (15:46 +0200)]
android/gatt: Rename app unregister function

Its used for client and server apps unregistering

10 years agoandroid/gatt: Use common code for server and client apps unregister
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:21 +0000 (15:46 +0200)]
android/gatt: Use common code for server and client apps unregister

10 years agoandroid/gatt: Use fill_gatt_response in response processing
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:20 +0000 (15:46 +0200)]
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.

10 years agoandroid/gatt: Move response filling functions up
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:19 +0000 (15:46 +0200)]
android/gatt: Move response filling functions up

Its needed to be called from read_requested_attributes.

10 years agoandroid/gatt: Improve response filling function
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:18 +0000 (15:46 +0200)]
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.

10 years agoandroid/gatt: Fix double processing of pending responses list
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:17 +0000 (15:46 +0200)]
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.

10 years agoandroid/gatt: Dont process pending requests if queue is empty
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:16 +0000 (15:46 +0200)]
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)

10 years agoandroid/gatt: Always check for complete response queue
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:15 +0000 (15:46 +0200)]
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.

10 years agoandroid/gatt: Rename app connection handling function
Jakub Tyszkowski [Fri, 6 Jun 2014 13:46:14 +0000 (15:46 +0200)]
android/gatt: Rename app connection handling function

These are handling app connections thus we should make this clear by
proper naming.

10 years agoinput: Fix access to uninitialized data when authorizing connections
Johan Hedberg [Tue, 10 Jun 2014 10:25:08 +0000 (13:25 +0300)]
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.

10 years agodoc: Update test-hfp coverage statistics
Szymon Janc [Tue, 10 Jun 2014 09:39:46 +0000 (11:39 +0200)]
doc: Update test-hfp coverage statistics

10 years agoshared/hfp: Fix crash due to invalid free
Szymon Janc [Wed, 4 Jun 2014 17:41:08 +0000 (19:41 +0200)]
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).

10 years agounit/test-hfp: Add test for parsing empty string
Szymon Janc [Wed, 4 Jun 2014 17:41:07 +0000 (19:41 +0200)]
unit/test-hfp: Add test for parsing empty string

Test if parser is properly handling single '\r'.

10 years agoandroid/hal-audio: Fix memory leak
Andrei Emeltchenko [Fri, 6 Jun 2014 07:19:48 +0000 (10:19 +0300)]
android/hal-audio: Fix memory leak

Fixes clang warning:
...
android/hal-audio.c:484:3: warning: Potential leak of memory pointed to
by 'preset'
...

10 years agoandroid/avrcp: Fix accessing pointer
Andrei Emeltchenko [Mon, 9 Jun 2014 08:18:50 +0000 (11:18 +0300)]
android/avrcp: Fix accessing pointer

10 years agoandroid/pts: Update GAP test results
Eva Kolanska [Fri, 6 Jun 2014 13:54:45 +0000 (15:54 +0200)]
android/pts: Update GAP test results

10 years agoandroid/pts: Re-run PTS for A2DP
Sebastian Chlad [Mon, 9 Jun 2014 09:38:22 +0000 (11:38 +0200)]
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.

10 years agodoc: Update management command list for 3.16 kernels
Marcel Holtmann [Sun, 8 Jun 2014 19:11:58 +0000 (21:11 +0200)]
doc: Update management command list for 3.16 kernels

10 years agoplugins/sixaxis: Add a set_leds_sysfs() function
Antonio Ospite [Tue, 27 May 2014 11:25:15 +0000 (13:25 +0200)]
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

10 years agoplugins/sixaxis: Add a get_leds_data() function
Antonio Ospite [Tue, 27 May 2014 11:25:14 +0000 (13:25 +0200)]
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.

10 years agoplugins/sixaxis: Fix get_js_number() for devices connected via BT
Antonio Ospite [Wed, 28 May 2014 09:50:20 +0000 (11:50 +0200)]
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.

10 years agounit: The crypto create and cleanup functions are not test cases
Marcel Holtmann [Fri, 6 Jun 2014 14:44:39 +0000 (16:44 +0200)]
unit: The crypto create and cleanup functions are not test cases

10 years agoandroid/pts: Update GATT test result
Eva Kolanska [Fri, 6 Jun 2014 08:35:52 +0000 (10:35 +0200)]
android/pts: Update GATT test result

10 years agoandroid/client: Fix reversing send_response values
Marcin Kraglak [Fri, 6 Jun 2014 08:35:51 +0000 (10:35 +0200)]
android/client: Fix reversing send_response values

Add function to parse hex string to uint8_t array and use it in
send_response command.

10 years agodoc: Update test coverage numbers
Luiz Augusto von Dentz [Fri, 6 Jun 2014 08:41:59 +0000 (11:41 +0300)]
doc: Update test coverage numbers

10 years agoandroid/hal-audio-aptx: Add encoding
Andrzej Kaczmarek [Mon, 2 Jun 2014 16:37:51 +0000 (18:37 +0200)]
android/hal-audio-aptx: Add encoding

10 years agoandroid/hal-audio-aptx: Load aptX encoder library
Andrzej Kaczmarek [Mon, 2 Jun 2014 16:37:50 +0000 (18:37 +0200)]
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.

10 years agoandroid/hal-audio-aptx: Add initial support for aptX codec
Andrzej Kaczmarek [Mon, 2 Jun 2014 16:37:49 +0000 (18:37 +0200)]
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.

10 years agoandroid/hal-audio: Allow codec to init on startup
Andrzej Kaczmarek [Mon, 2 Jun 2014 16:37:48 +0000 (18:37 +0200)]
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.

10 years agoandroid/hal-audio: Always call qos_update
Andrzej Kaczmarek [Mon, 2 Jun 2014 16:37:47 +0000 (18:37 +0200)]
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.

10 years agoandroid/avrcp-lib: Add fragmentation support
Luiz Augusto von Dentz [Wed, 4 Jun 2014 15:07:41 +0000 (18:07 +0300)]
android/avrcp-lib: Add fragmentation support

This adds handling for fragmentation if the PDU cannot fit into a AV/C
frame which can be up to 512 bytes or less depending on the L2CAP MTU
negotiated.

10 years agoandroid/avctp: Add define for AV/C data MTU and offset
Luiz Augusto von Dentz [Thu, 5 Jun 2014 11:25:03 +0000 (14:25 +0300)]
android/avctp: Add define for AV/C data MTU and offset

This defines the MTU and offset of AV/C data in AVCTP PDU.

10 years agounit/test-avrcp: Add /TP/RCR/BV-04-C test
Luiz Augusto von Dentz [Wed, 4 Jun 2014 15:06:12 +0000 (18:06 +0300)]
unit/test-avrcp: Add /TP/RCR/BV-04-C test

To verify the TG can accept abort fragmentation correctly.

10 years agounit/test-avrcp: Add /TP/RCR/BV-02-C test
Luiz Augusto von Dentz [Wed, 4 Jun 2014 14:54:54 +0000 (17:54 +0300)]
unit/test-avrcp: Add /TP/RCR/BV-02-C test

To verify that the TG can handle fragmentation correctly.

10 years agoandroid/pts: Update GATT results
Jakub Tyszkowski [Wed, 4 Jun 2014 14:36:33 +0000 (16:36 +0200)]
android/pts: Update GATT results

Update results for server's Service Changed Indication (CCC) tests.

10 years agoandroid/gatt: Make CCC descriptor readable
Jakub Tyszkowski [Wed, 4 Jun 2014 14:36:32 +0000 (16:36 +0200)]
android/gatt: Make CCC descriptor readable

Descriptor unlike characteristic should be readable.

10 years agoandroid/gatt: Store CCC and indicate service change
Jakub Tyszkowski [Wed, 4 Jun 2014 14:36:31 +0000 (16:36 +0200)]
android/gatt: Store CCC and indicate service change

We indicate service change on service stop and service start API calls.
Indication is also send when connecting to bonded device to force it
rebuilding its cache. Write request is properly handled on the response
queue know.

10 years agoandroid: Add gatt CCC value storage
Jakub Tyszkowski [Wed, 4 Jun 2014 14:36:30 +0000 (16:36 +0200)]
android: Add gatt CCC value storage

Client Characteristic Configuration for Service Changed Characteristic
should be stored for every bonded device, so we know if we should be
sending value (range affected by changes) indication.

10 years agoandroid/gatt: Set attrib MTU correctly
Marcin Kraglak [Wed, 4 Jun 2014 12:54:08 +0000 (14:54 +0200)]
android/gatt: Set attrib MTU correctly

We should set g_attrib mtu with MIN of two values: Remote Rx MTU
and local Tx MTU. In previous solution once we set g_attrib mtu, we
could only reduce MTU (because we took previously set g_attrib MTU
and Remote Rx MTU). It affected cases when remote wanted to increase
MTU.

10 years agoandroid/gatt: Handle prepare and execute write
Lukasz Rymanowski [Thu, 5 Jun 2014 09:38:52 +0000 (11:38 +0200)]
android/gatt: Handle prepare and execute write

Once remote device sends write execute we need to notify all the
server applications with this. Application will send response on this and
once we collect all the responses we should send execute write response
to remote device

This is initial version of handling execute write. Still many corner cases
have to be handled. Some of them seems to be not easy to solve with
existing BT HAL API e.g. BlueZ sends execute write to couple of server
applications and one of them reply with error. According to spec execute
write shall be atomic. In scenario that one server out of many replies
with error makes this write not atomic. There is no way to handle it with current
BT HAL API.

10 years agoandroid/gatt: Fix state of pending request for prep write
Lukasz Rymanowski [Thu, 5 Jun 2014 09:38:51 +0000 (11:38 +0200)]
android/gatt: Fix state of pending request for prep write

State PENDING is used when we send request to upper layer and this is
how we do with prep write request

10 years agoandroid/gatt: Fix parallel reading/writing attributes values from applications
Marcin Kraglak [Thu, 5 Jun 2014 09:38:50 +0000 (11:38 +0200)]
android/gatt: Fix parallel reading/writing attributes values from applications

It is needed because in some cases we send few read requests to applications.
Now all transactions data are overriden by last one, and if application wants
to respond to previous requests, transaction data is not found.
It happens when two devices will read attribute from one application in the same
time or if device will read few values in time (i.e. read by type request or find
by type value request).

10 years agoandroid/client: Fix handling hex test arguments
Grzegorz Kolodziejczyk [Thu, 5 Jun 2014 11:08:41 +0000 (13:08 +0200)]
android/client: Fix handling hex test arguments

This patch allows to pass as argument hex and int values as test command
argument. Hex values must be prefixed by '0x' or '0X'.

10 years agoandroid/client: Add additional support for handling hex values
Grzegorz Kolodziejczyk [Thu, 5 Jun 2014 11:08:40 +0000 (13:08 +0200)]
android/client: Add additional support for handling hex values

This patch allows to handle properly hex values prefixed by "0x" or
"0X" as function parameter.

10 years agoandroid/client: Add properly print prefix for hex values
Grzegorz Kolodziejczyk [Thu, 5 Jun 2014 11:08:39 +0000 (13:08 +0200)]
android/client: Add properly print prefix for hex values

This patch fix print hex values by adding "0x" prefix.

10 years agogitignore: Add cscope files
Andre Guedes [Fri, 7 Feb 2014 22:28:00 +0000 (19:28 -0300)]
gitignore: Add cscope files

10 years agoandroid: Fix compile error
Andre Guedes [Mon, 2 Jun 2014 14:49:39 +0000 (11:49 -0300)]
android: Fix compile error

During configure, if SBC is not installed in the system, we may use
SBC_CFLAGS and SBC_LIBS variables to indicate where SBC headers and
binaries can be found.

However, SBC_CFLAGS variable is not used in android/Makefile.am,
causing the following compile error:

$ ./bootstrap-configure SBC_CFLAGS=-I../sbc SBC_LIBS=-L../sbc/src/
$ make

(...)

android/hal-audio-sbc.c:22:21: fatal error: sbc/sbc.h: No such file or directory
 #include <sbc/sbc.h>
^
compilation terminated.
make[1]: *** [android/android_audio_a2dp_default_la-hal-audio-sbc.lo] Error 1

This patch fixes this error by appending SBC_CFLAGS to android_audio_
a2dp_default_la_CFLAGS.

10 years agoprofiles/audio: Fix propagation of EHOSTDOWN error
Andrzej Kaczmarek [Wed, 4 Jun 2014 15:14:45 +0000 (17:14 +0200)]
profiles/audio: Fix propagation of EHOSTDOWN error

EHOSTDOWN error is now overwritten by EIO and once it's passed to
device_profile_connected it triggers connection of another profiles
while it should actually stop connecting them.

10 years agocore: Fix cleaning pending services when ACL connection failed
Andrzej Kaczmarek [Wed, 4 Jun 2014 15:14:44 +0000 (17:14 +0200)]
core: Fix cleaning pending services when ACL connection failed

In case ACL connection failed to establish, all pending services shall
be always removed. At the moment it's only done in case there's pending
Connect message which does not take into account reconnect scenario,
i.e. service connection was triggered by reconnection timeout and there
is no pending message.

In such case, when reconnection failed there will be some services on
pending list and subsequent reconnect attempts will fail with EBUSY
immediately.

10 years agoandroid/pts: Update GATT test results
Eva Kolanska [Wed, 4 Jun 2014 10:45:35 +0000 (12:45 +0200)]
android/pts: Update GATT test results

10 years agoandroid/pts: Update GATT test results
Eva Kolanska [Mon, 2 Jun 2014 13:11:32 +0000 (15:11 +0200)]
android/pts: Update GATT test results

10 years agoandroid/hal-audio-sbc: Fix use of incorrect number of frames per packet
Luiz Augusto von Dentz [Sun, 1 Jun 2014 15:01:33 +0000 (18:01 +0300)]
android/hal-audio-sbc: Fix use of incorrect number of frames per packet

Number of frames should always be limited to the maximun that can be set
in the payload header.

10 years agoaudio/media: Check if setting value is already set
Luiz Augusto von Dentz [Tue, 3 Jun 2014 13:00:56 +0000 (16:00 +0300)]
audio/media: Check if setting value is already set

If the setting value is already set the is no need to send anything.

10 years agoaudio/media: Fix crash while changing repeat mode
Luiz Augusto von Dentz [Tue, 3 Jun 2014 09:37:40 +0000 (12:37 +0300)]
audio/media: Fix crash while changing repeat mode

By changing repeat mode to 'group' which does not have a direct
translation to MPRIS LoopStatus will cause the following crash:

_dbus_abort () from /usr/lib/libdbus-1.so.3
_dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3
dbus_message_iter_append_basic () from /usr/lib/libdbus-1.so.3
set_repeat_setting (key=0x80d6a87 "Repeat", value=0x80d8079 "group", user_data=0x984ab40) at profiles/audio/media.c:1050

10 years agotools/btmgmt: Trival whitespace fix
Andrzej Kaczmarek [Tue, 3 Jun 2014 10:13:36 +0000 (12:13 +0200)]
tools/btmgmt: Trival whitespace fix

10 years agotools/btmgmt: Fix io-cap usage message
Andrzej Kaczmarek [Tue, 3 Jun 2014 10:13:35 +0000 (12:13 +0200)]
tools/btmgmt: Fix io-cap usage message

10 years agotools/btmgmt: Rename set-io-cap to io-cap
Andrzej Kaczmarek [Tue, 3 Jun 2014 10:13:34 +0000 (12:13 +0200)]
tools/btmgmt: Rename set-io-cap to io-cap

Every other 'set-something' command is just called 'something', so
let's keep this consistent.

10 years agotools/btmgmt: Add scan-params command
Andrzej Kaczmarek [Tue, 3 Jun 2014 10:13:33 +0000 (12:13 +0200)]
tools/btmgmt: Add scan-params command

10 years agomonitor: Fix crash when parsing SDP
Szymon Janc [Mon, 2 Jun 2014 14:33:11 +0000 (16:33 +0200)]
monitor: Fix crash when parsing SDP

get_tid() may return NULL if bogus tid is passed.
This fix following crash:

Invalid write of size 1
   at 0x4A0A643: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/
     vgpreload_memcheck-amd64-linux.so)
   by 0x4218E4: search_attr_req (sdp.c:413)
   by 0x42214D: sdp_packet (sdp.c:748)
   by 0x41ED09: l2cap_frame (l2cap.c:2632)
   by 0x414D51: packet_hci_acldata (packet.c:7713)
   by 0x415133: packet_monitor (packet.c:3332)
   by 0x404AEC: control_reader (control.c:911)
   by 0x40231A: main (main.c:197)
 Address 0x6 is not stack'd, malloc'd or (recently) free'd

Process terminating with default action of signal 11 (SIGSEGV)
 Access not within mapped region at address 0x6
   at 0x4A0A643: memcpy@@GLIBC_2.14 (in /usr/lib64/valgrind/
     vgpreload_memcheck-amd64-linux.so)
   by 0x4218E4: search_attr_req (sdp.c:413)
   by 0x42214D: sdp_packet (sdp.c:748)
   by 0x41ED09: l2cap_frame (l2cap.c:2632)
   by 0x414D51: packet_hci_acldata (packet.c:7713)
   by 0x415133: packet_monitor (packet.c:3332)
   by 0x404AEC: control_reader (control.c:911)
   by 0x40231A: main (main.c:197)

10 years agoemulator: Fix random address type in LE conn complete events
Johan Hedberg [Mon, 2 Jun 2014 10:01:04 +0000 (13:01 +0300)]
emulator: Fix random address type in LE conn complete events

10 years agoemulator: Fix matching up connections to random addresses
Johan Hedberg [Mon, 2 Jun 2014 09:47:56 +0000 (12:47 +0300)]
emulator: Fix matching up connections to random addresses

10 years agomonitor: Fix User Passkey Request name
Johan Hedberg [Sun, 1 Jun 2014 19:47:27 +0000 (22:47 +0300)]
monitor: Fix User Passkey Request name

10 years agotools/btmgmt: Add support for passkey notification
Johan Hedberg [Sun, 1 Jun 2014 18:51:48 +0000 (21:51 +0300)]
tools/btmgmt: Add support for passkey notification

10 years agotools/btmgmt: Add support for passkey requests
Johan Hedberg [Sun, 1 Jun 2014 18:48:00 +0000 (21:48 +0300)]
tools/btmgmt: Add support for passkey requests

10 years agoandroid/gatt: Check for invalid handle errors
Marcin Kraglak [Fri, 30 May 2014 09:37:42 +0000 (11:37 +0200)]
android/gatt: Check for invalid handle errors

Check if handle or handle range is valid for server. If is invalid,
reply with ATT_ECODE_INVALID_HANDLE.

10 years agoshared/gatt: Return bool in gatt_db_get_attribute_permissions
Marcin Kraglak [Fri, 30 May 2014 09:37:41 +0000 (11:37 +0200)]
shared/gatt: Return bool in gatt_db_get_attribute_permissions

It will return true if attribute with given handle exists in db and
set permissions value, otherwise it will return false.
Now, if get_permissions failed, we should reply with
ATT_ECODE_ATTR_NOT_FOUND.

10 years agoandroid/hal-audio: Allow to autoselect endpoint in open_stream IPC
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:34 +0000 (15:16 +0200)]
android/hal-audio: Allow to autoselect endpoint in open_stream IPC

audio_open_output_stream always tries to open 1st registered endpoint
based on assumption that there is only one endpoint registered anyway
(due to support for only one codec). With more endpoints available in
future we need to be able to retrieve endpoint id which is connected
and use it for streaming.

This patch adds special case for id=0 in open_stream IPC to return 1st
opened endpoint on BlueZ side which is enough for now since only one
headset can be connected at any time (i.e. we should not have more
than 1 endpoint opened).

10 years agoandroid/hal-audio: Send packets only when data were encoded
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:33 +0000 (15:16 +0200)]
android/hal-audio: Send packets only when data were encoded

Codec may not return encoded packet on every encode_mediapacket call,
i.e. in case there's not enough data it may buffer data and encode on
subsequent calls when enough data were provided. We need to make sure
media packet is written only in case somethind was encoded so we don't
send empty packets.

10 years agoandroid/hal-audio: Make update_qos optional
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:32 +0000 (15:16 +0200)]
android/hal-audio: Make update_qos optional

10 years agoandroid/hal-audio: Make RTP header optional
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:31 +0000 (15:16 +0200)]
android/hal-audio: Make RTP header optional

Not every codec on A2DP will use RTP so it's now optional - codec can
be defined to use it and core will take care of filling the data.

10 years agoandroid/hal-audio: Fix media_packet definition
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:30 +0000 (15:16 +0200)]
android/hal-audio: Fix media_packet definition

rtp_payload field in media_packet is specific for SBC codec thus it
should be moved to SBC codec implementation and removed from generic
structs.

10 years agoandroid/hal-audio: Fix PT in media packets
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:29 +0000 (15:16 +0200)]
android/hal-audio: Fix PT in media packets

According to A2DP 1.3 spec section 4.3.3.2:
"A payload type in the RTP dynamic range shall be chosen (see [22],
section 3)." - [22] = RFC3551

As per referenced RFC3551, values in range 96-127 are reserved for
dynamic assignment so we can set PT to 96.

10 years agotools/smp-tester: Add client test case for MITM
Johan Hedberg [Sun, 1 Jun 2014 06:23:34 +0000 (09:23 +0300)]
tools/smp-tester: Add client test case for MITM

10 years agotools/btmgmt: Add set-io-cap command
Lukasz Rymanowski [Tue, 27 May 2014 15:17:45 +0000 (17:17 +0200)]
tools/btmgmt: Add set-io-cap command

This is needed for testing e.g. PTS

10 years agoandroid/gatt: Fix not setting request as done on direct db read
Jakub Tyszkowski [Fri, 30 May 2014 13:19:42 +0000 (15:19 +0200)]
android/gatt: Fix not setting request as done on direct db read

Previously if read was succesfull - request was not marked as completed
because no callback was called for direct db read.