Commit Graph

19410 Commits

Author SHA1 Message Date
Eva Kolanska
e37c2a36cb android/gatt: Update GATT test results 2014-05-30 14:24:03 +02:00
Szymon Janc
275f4f7e6c android/pts: Update GAP TC_BOND_BON_BV_03_C result 2014-05-30 14:22:51 +02:00
Andrzej Kaczmarek
2cc2e7d131 android/a2dp: Add support to check aptX capabilities 2014-05-30 14:54:57 +03:00
Andrzej Kaczmarek
171aac2ead android/a2dp: Add support to check MPEG-2,4 AAC caps 2014-05-30 14:54:57 +03:00
Andrzej Kaczmarek
e1c7dddd0d android/a2dp: Fix SEP selection
When matching remote SEP to local SEP we do not match vendor codecs
properly, i.e. neither vendor ID not codec ID are checked, which may
cause wrong endpoint to be selected in case there are more that one
endpoints using vendor codec on remote.

This patch fixes this by assinging vendor codec indentification to
local SEP after it's registered and uses this information when matching
SEPs.
2014-05-30 14:54:56 +03:00
Andrzej Kaczmarek
d8354e8e63 android: Fix missing include
It's needed for getenv().
2014-05-30 14:10:53 +03:00
Andrzej Kaczmarek
c618d0fa66 android/a2dp: Fix removing device on incoming connection
Connection state is not changed for incoming connection, i.e. during
discovery device is still in disconnected state and in case connection
fails for some reason, device won't be removed due to triggered state
change disconnected->disconnected which is silently ignored.

This patch fixes this problem by changing device state to connecting
immediately after signalling channel is connected. This allows device
to be removed properly in case something fails and is also consistent
with behaviour of Bluedroid.

In addition there's new flag added to device which stores information
whether we're initiator of connection. This is required because before
fix this property was decided based on HAL state which we can't now
use since it will be always connecting for both incoming and outgoing
connections.
2014-05-30 14:10:53 +03:00
Lukasz Rymanowski
f11e50810b shared/crypto: Remove not needed memcpy 2014-05-30 13:26:55 +03:00
Lukasz Rymanowski
f11b5dbcfc android/pts: Update GATT PTS test results
Update tests related to write signed
2014-05-30 13:26:52 +03:00
Lukasz Rymanowski
ff781eea58 unit/crypto: Update unit test vectors after changes in singing process 2014-05-30 13:26:47 +03:00
Lukasz Rymanowski
33c1a21cc4 shared/crypto: Fix byte order of message
Message should be swapped before we send it to the kernel for signing
2014-05-30 13:26:40 +03:00
Lukasz Rymanowski
94d89db19d shared/crypto: Change swap128 to swap_buf
We will need to swap bigger buffers so lets make swap128 more generic for
that purpose
2014-05-30 13:26:35 +03:00
Lukasz Rymanowski
067050b2eb shared/crypto: Fix byte order of sign counter added to signature 2014-05-30 13:26:30 +03:00
Lukasz Rymanowski
8b4d1ea541 shared/crypto: Fix concatenate of sign counter into the msg
This patch fixes incorrectly concatenated sign counter to the message
2014-05-30 13:26:26 +03:00
Lukasz Rymanowski
514e224641 android/gatt: Fix signed write command encoding
As per spec (BT spec 4.1 Vol[3], Part F, chapter 3.4.5.4) we need to
take opcode, handle and parameters to generate signature.
In order to support it signing is moved to att.c, place where pdu is
encoded
2014-05-30 13:26:14 +03:00
Lukasz Rymanowski
26304dcc44 android/gatt: Fix handling signed write command from remote
As per spec (BT spec 4.1 Vol[3], Part F, chapter 3.4.5.4) message which
should be taken to generate signature is opcode, handle and parameters
2014-05-30 13:26:10 +03:00
Lukasz Rymanowski
2e8cd0bff4 android/gatt: Verify signature counter from remote
We will receive signature counter as a part of signature in att packet.
We shall verify if signature counter has value as expected otherwise
drop the message.
2014-05-30 13:26:05 +03:00
Szymon Janc
b2616d41e4 android/pics: Fix GATT PICS settings 2014-05-30 12:05:21 +02:00
Luiz Augusto von Dentz
f8f65a0926 input: Do not send UHID_DESTROY
Accourding to uHID documentation when diconnecting the kernel will take
care of cleaning up any device created:

  "If you close() the fd, the device is automatically unregistered and
   destroyed internally."
2014-05-30 09:04:39 +03:00
Luiz Augusto von Dentz
3452e079b4 android/hidhost: Rework uHID code to use bt_uhid 2014-05-30 09:04:28 +03:00
Jakub Tyszkowski
8a2f624343 android/pts: Update GATT results 2014-05-29 16:20:40 +02:00
Jakub Tyszkowski
b6931ace33 android/gatt: Support exec write request test command
'u2' parameter is used to pass exec write flag.
2014-05-29 16:20:40 +02:00
Jakub Tyszkowski
05050e76d4 android/gatt: Support prepare write request test command
'u2' parameter is used for handle value, 'u3' for offset and
'u4' holds the value.
2014-05-29 16:20:40 +02:00
Jakub Tyszkowski
8c35ec18d7 android/gatt: Support write command test command
'u2' parameter is used to pass handle value.
2014-05-29 16:20:40 +02:00
Jakub Tyszkowski
70f1b9bfff android/gatt: Support write request test command
'u2' parameter is used to pass handle value.
2014-05-29 16:20:40 +02:00
Jakub Tyszkowski
23f5f2fc3c android/gatt: Initial support for write test command
This is handled mostly the same way as read so we can use the same
function for sending att requests.

As test command parameters are of type uint16_t, we cannot write longer
values. We can figure out the ways to overcome this limitation if it
turns out that it's really needed (i.e. some PTS test cases cannot be
passed).
2014-05-29 16:20:40 +02:00
Eva Kolanska
be129c891a android/pts: Update GATT test results 2014-05-29 15:42:53 +02:00
Jakub Tyszkowski
868c6eaa21 android/pts: Update GATT PTS status 2014-05-29 13:23:28 +02:00
Jakub Tyszkowski
b3ef5ca3f6 android/gatt: Support read by group in test commands
'u2' command parameter is used as start handle, 'u3' as end handle and
uuid as group type.
2014-05-29 13:23:28 +02:00
Jakub Tyszkowski
721d0c8349 android/gatt: Support read blob request in test command
'u2' command paremeter is used as handle and 'u3' as offset value.
2014-05-29 13:23:28 +02:00
Jakub Tyszkowski
c2cbfe92ab android/gatt: Suport read by type request in test command
'u2' parameter is used as start handle, 'u3' as end handle and uuid as
attribute type.
2014-05-29 13:23:28 +02:00
Jakub Tyszkowski
d94367362d android/gatt: Support read request in test command
'u2' command parameter is used to pass attribute handle.
2014-05-29 13:23:28 +02:00
Jakub Tyszkowski
7f51fb8f4f android/gatt: Add read test command stub
This adds read support to test command handler. Particular read types will be
handled basing on the 'u1' command parameter.
2014-05-29 13:23:28 +02:00
Szymon Janc
7c3f57fedc android/pts: Update PTS GAP tests results 2014-05-29 12:51:21 +02:00
Szymon Janc
9bc5485849 android/pics: Update PICS for GAP
Enable peripheral mode and tweak some other settings.
2014-05-29 12:51:21 +02:00
Szymon Janc
9c2c59ef02 android/pts: Update PTS GATT tests selection 2014-05-29 12:51:21 +02:00
Szymon Janc
d98ad578a3 android/pics: Update PICS for GATT 2014-05-29 12:51:21 +02:00
Eva Kolanska
30e915f00e android/pts: Update GATT Server test results 2014-05-29 09:27:09 +02:00
Jakub Tyszkowski
72c0f73d3a android/gatt: Fix doing database reads on write
Wrong function was called resulting in read responses being send along
with write response. As it is now 'process_dev_pending_requests' is
processing only read requests.
2014-05-29 09:27:09 +02:00
Szymon Janc
50e8846d15 android/gatt: Implement disconnect test command 2014-05-28 14:44:49 +02:00
Szymon Janc
32c5ba75d5 android/gatt: Implement connect test command 2014-05-28 14:44:49 +02:00
Szymon Janc
f803cc568a android/gatt: Implement enable test command
This command is used to enable and disable test interface.
2014-05-28 14:44:49 +02:00
Szymon Janc
221e262a8e android/gatt: Factor out unregistering client into helper function
This will be also used by test interface.
2014-05-28 14:44:49 +02:00
Szymon Janc
e84d92b16f android/gatt: Add initial implementation of client test command
This command is used to performe some tasks not available from
standard API and usable only for PTS testing.
2014-05-28 14:44:49 +02:00
Andrzej Kaczmarek
7c29b18cf2 tools/hcidump: Decode MPEG-1,2 Audio codec capabilities 2014-05-28 14:40:54 +03:00
Jakub Tyszkowski
b6d655f3d8 android/gatt: Initialize crypto first
This fixes the missleading error on crypto setup failure:

02-17 20:19:44.639 I/bluetoothd( 1705): bluetoothd[1706]: gatt: Failed
to allocate memory for queues
2014-05-28 12:20:40 +02:00
Jakub Tyszkowski
24d9ec7e15 android/pts: Update GATT PTS results 2014-05-28 11:37:05 +02:00
Lukasz Rymanowski
657fc7b62e android/pts: Update SM PTS test results
Rerun TC_JW_* test cases
2014-05-28 11:36:21 +02:00
Jakub Tyszkowski
d4ea8f3299 android/gatt: Fix not checking for read errors in read by type 2014-05-28 11:25:56 +02:00
Jakub Tyszkowski
a02d0cbff5 android/client: Allow zero length responses 2014-05-28 11:25:56 +02:00