Commit Graph

19410 Commits

Author SHA1 Message Date
Eva Kolanska
47bcc522d0 android/pts: Update GATT test results 2014-05-28 11:10:29 +02:00
Jakub Tyszkowski
4a826d6899 shared/gatt-db: Fix cropping permissions value 2014-05-27 22:46:49 +02:00
Jakub Tyszkowski
b03d59f8c6 android/gatt: Use proper variable to store response length
This fixes confirmations being not send.
2014-05-27 22:46:49 +02:00
Jakub Tyszkowski
35e77c1c5f gatt: Fix not freeing GError on failure 2014-05-27 22:46:49 +02:00
Jakub Tyszkowski
111150d7e6 attrib: Fix minor whitespace issue
Replace spaces with tabs.
2014-05-27 22:46:49 +02:00
Jakub Tyszkowski
86f395467c android/gatt: Fix not sending write request responses
Responses were pushed to pending response queue but send was never
triggered.
2014-05-27 22:06:35 +02:00
Eva Kolanska
69c8ff8a60 android/pts: Update GATT PTS tests results 2014-05-27 21:59:56 +02:00
Johan Hedberg
2790b3b250 tools/btmgmt: Fix address type in user confirm replies 2014-05-27 20:59:45 +03:00
Andrzej Kaczmarek
3c3e8a8b73 android: Add avinfo to makefile 2014-05-27 17:57:25 +03:00
Andrzej Kaczmarek
a78aec57a5 tools/avinfo: Decode aptX codec capabilities 2014-05-27 17:57:25 +03:00
Andrzej Kaczmarek
d7d11d074f tools/avinfo: Decode MPEG-2,4 AAC codec capabilities 2014-05-27 17:57:25 +03:00
Andrzej Kaczmarek
a238e3b108 tools/hcidump: Decode aptX codec capabilities 2014-05-27 17:57:25 +03:00
Andrzej Kaczmarek
fee302da25 tools/hcidump: Decode MPEG-2,4 AAC codec capabilities 2014-05-27 17:57:25 +03:00
Andrzej Kaczmarek
62c32efcab audio: Add definitions for aptX 2014-05-27 17:56:36 +03:00
Andrzej Kaczmarek
e0268c9936 audio: Add macros to access MPEG-2,4 AAC codec info
This patch provides helper macros to get, set and init-in-struct both
frequency and bitrate fields in codec info structs for MPEG-2,4 AAC.
2014-05-27 17:56:36 +03:00
Andrzej Kaczmarek
c93915c343 audio: Add definitions for MPEG-2,4 AAC codec
frequency and bitrate bit-fields are splitted into separate bytes since
they span across byte-boundary and cannot be set easily on LE arch
anyway.
2014-05-27 17:56:36 +03:00
Andrzej Kaczmarek
73f5534028 audio: Fix a2dp_vendor_codec_t declaration
As per A2DP spec, both Vendor ID (4.7.2.1) and Codec ID (4.7.2.2) are
defined as 32-bit and 16-bit values respectively rather that array of
bytes. Also changing to uint types will make using these values in code
much easier.
2014-05-27 17:56:36 +03:00
Andrei Emeltchenko
3c5413c3dd android/hal-sco: Fix memory leak
Release resampler on exit.
2014-05-27 16:38:48 +03:00
Johan Hedberg
cc3dd149f8 shared/crypto: Fix fd leaks in bt_crypto_sign_att() 2014-05-27 12:15:11 +03:00
Eva Kolanska
cad7c666c1 android/pts: Update GATT PTS tests results 2014-05-27 11:06:52 +02:00
Marcin Kraglak
881c2be854 android/gatt: Check permissions before write execution
Check attribute's permissions and return error if device is not allowed
to read.
2014-05-27 00:13:06 +02:00
Marcin Kraglak
bf44e53bf4 android/gatt: Fix possible memory leak in write request
If write cannot be executed, remove data from queue and free
allocated memory.
2014-05-27 00:13:05 +02:00
Eva Kolanska
4953238ca6 android/pts: Update GATT tests results 2014-05-27 00:07:20 +02:00
Szymon Janc
4b75bb8e7b android/README: Update required kernel options
CRYPTO support is required by gatt.
2014-05-27 00:05:58 +02:00
Szymon Janc
9dce79972e android/hal-gatt: Fix missing check if interface is ready 2014-05-27 00:05:58 +02:00
Andrei Emeltchenko
510aae0f8e android/hal-audio: Fix invalid memory access when downmixing to mono
While iterating over input buffer frame's size was not correctly taken
into account. Input buffer is always PCM 16bit stereo (4 bytes per
frame).
2014-05-26 14:36:25 +02:00
Marcin Kraglak
56a9685d81 android/gatt: Check permissions before read execution
Check device security level and attribute permissions before read
execution.
2014-05-26 14:13:59 +02:00
Marcin Kraglak
f72f19c757 android/gatt: Add proper permissions to built-in services
Set permissions to built in services.
2014-05-26 14:13:59 +02:00
Marcin Kraglak
94a00ef006 android/gatt: Store proper attributes permissions in database
Convert Android HAL permissions to GATT server permissions and store
them in database.
2014-05-26 14:13:58 +02:00
Marcin Kraglak
ce42888b9b android/hal-gatt: Define attribute permissions values
These values are defined in Android and should be used on daemon
side.
2014-05-26 14:13:58 +02:00
Marcin Kraglak
57954cb066 shared/gatt: Add helper for getting attribute's permissions
It will return attribute's permissions or 0 if attribute was not found.
2014-05-26 14:13:58 +02:00
Marcin Kraglak
8061d4ca5c shared/gatt: Define atribute permissions as uint32_t 2014-05-26 14:13:58 +02:00
Szymon Janc
7c275ee0d3 android/pts: Update MPS tests results 2014-05-26 11:07:28 +02:00
Szymon Janc
793d84ed78 android/pics: Enable NAP and PBAP in MPS settings 2014-05-26 11:07:28 +02:00
Szymon Janc
f3ad56bdf5 android/bluetooth: Register SDP record for MPS
This was affecting TC_AG_SRC_HFAV_ACT_SD_BV_01_I and
TC_SDP_CTH_SD_BV_01_I PTS qualification tests.
2014-05-26 11:07:28 +02:00
Szymon Janc
0b01caab7b lib/sdp: Add attributes and service class for MPS 2014-05-26 11:07:28 +02:00
Jakub Tyszkowski
0fc577d841 android/gatt: Use default mtu on mtu exchange response
We should be setting new mtu after sending response using old mtu. This
also moves sending the response from att_handler to mtu_att_handle.
2014-05-26 10:52:55 +02:00
Jakub Tyszkowski
8197cf3da2 android/gatt: Make att_handler use g_attrib buffer
This makes use of g_attrib buffer for output and removes some unused
read_by_group_type function parameters.
2014-05-26 10:52:55 +02:00
Jakub Tyszkowski
8989a684f7 android/gatt: Use g_attrib buffer where possible for att
This replaces fixed size pdu usage with g_attrib buffer when possible.
When only received packets are decoded we use dynamic allocation with
current mtu.
2014-05-26 10:52:55 +02:00
Jakub Tyszkowski
f43d74eb83 android: Fix sending uninitialised data
This fixes the following:

==25759== Syscall param socketcall.sendmsg(msg.msg_iov[i]) points to
uninitialised byte(s)
==25759==    at 0x521C570: __sendmsg_nocancel (syscall-template.S:82)
==25759==    by 0x41688F: ipc_send (ipc.c:366)
==25759==    by 0x40ECF8: send_ssp_request (bluetooth.c:1028)
==25759==    by 0x4110A6: user_confirm_request_callback
(bluetooth.c:1055)
==25759==    by 0x4094FE: queue_foreach (queue.c:186)
==25759==    by 0x409FCF: can_read_data (mgmt.c:287)
==25759==    by 0x408E4C: read_callback (io-glib.c:168)
==25759==    by 0x4E79D12: g_main_context_dispatch (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==25759==    by 0x4E7A05F: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==25759==    by 0x4E7A459: g_main_loop_run (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
==25759==    by 0x40454D: main (main.c:538)
==25759==  Address 0x7ff00085d is on thread 1's stack
==25759==  Uninitialised value was created by a stack allocation
==25759==    at 0x40EC77: send_ssp_request (bluetooth.c:1018)
2014-05-26 10:45:56 +02:00
Jakub Tyszkowski
8b2a8c9257 android/gatt: Fix possible memory leak 2014-05-26 10:45:56 +02:00
Lukasz Rymanowski
6988399496 android/gatt: Add handling signed write from remote device 2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
537e5de5d2 android/gatt: Add support for signed write command 2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
3785fca57c android/gatt: Add crypto needed for sign write 2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
067c255878 android/bluetooth: Store sign counter needed for aes-cmac sign
If CSRK is valid between sessions we should remember sign counter.
Therefor store it.
2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
4c1d913ddc android/bluetooth: Read CSRK from the storage on startup 2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
bfcc673c98 android/bluetooth: Store CSRK
CSRK is generated while paring and should be used for sign att packets
when LE devices uses write signed command.
2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
f976567382 android/bluetooth: Add support to read CSRK from the kernel 2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
55fa5f1e94 android/bluetooth: Expose API to update sign counter
This is needed so GATT can notify GAP that write sign has been done and
sign counter shall be increased as per spec.
2014-05-26 10:28:16 +02:00
Lukasz Rymanowski
2003db3897 android/bluetooth: Expose API to get CSRK for device
GATT will take CSRK key and sign counter each time it needs it to sign
att package or to verify att package
2014-05-26 10:28:16 +02:00