OSDN Git Service

android-x86/external-bluetooth-bluez.git
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.

10 years agoandroid/gatt: Support find request in permission check
Jakub Tyszkowski [Fri, 30 May 2014 13:19:41 +0000 (15:19 +0200)]
android/gatt: Support find request in permission check

Permissions check was failing on those requests.

10 years agoandroid/gatt: Update GATT test results
Eva Kolanska [Fri, 30 May 2014 11:51:49 +0000 (13:51 +0200)]
android/gatt: Update GATT test results

10 years agoandroid/pts: Update GAP TC_BOND_BON_BV_03_C result
Szymon Janc [Fri, 30 May 2014 12:15:22 +0000 (14:15 +0200)]
android/pts: Update GAP TC_BOND_BON_BV_03_C result

10 years agoandroid/a2dp: Add support to check aptX capabilities
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:49 +0000 (15:16 +0200)]
android/a2dp: Add support to check aptX capabilities

10 years agoandroid/a2dp: Add support to check MPEG-2,4 AAC caps
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:48 +0000 (15:16 +0200)]
android/a2dp: Add support to check MPEG-2,4 AAC caps

10 years agoandroid/a2dp: Fix SEP selection
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:42 +0000 (15:16 +0200)]
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.

10 years agoandroid: Fix missing include
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:28 +0000 (15:16 +0200)]
android: Fix missing include

It's needed for getenv().

10 years agoandroid/a2dp: Fix removing device on incoming connection
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:27 +0000 (15:16 +0200)]
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.

10 years agoshared/crypto: Remove not needed memcpy
Lukasz Rymanowski [Thu, 29 May 2014 13:49:44 +0000 (15:49 +0200)]
shared/crypto: Remove not needed memcpy

10 years agoandroid/pts: Update GATT PTS test results
Lukasz Rymanowski [Thu, 29 May 2014 13:49:43 +0000 (15:49 +0200)]
android/pts: Update GATT PTS test results

Update tests related to write signed

10 years agounit/crypto: Update unit test vectors after changes in singing process
Lukasz Rymanowski [Thu, 29 May 2014 13:49:42 +0000 (15:49 +0200)]
unit/crypto: Update unit test vectors after changes in singing process

10 years agoshared/crypto: Fix byte order of message
Lukasz Rymanowski [Thu, 29 May 2014 13:49:41 +0000 (15:49 +0200)]
shared/crypto: Fix byte order of message

Message should be swapped before we send it to the kernel for signing

10 years agoshared/crypto: Change swap128 to swap_buf
Lukasz Rymanowski [Thu, 29 May 2014 13:49:40 +0000 (15:49 +0200)]
shared/crypto: Change swap128 to swap_buf

We will need to swap bigger buffers so lets make swap128 more generic for
that purpose

10 years agoshared/crypto: Fix byte order of sign counter added to signature
Lukasz Rymanowski [Thu, 29 May 2014 13:49:39 +0000 (15:49 +0200)]
shared/crypto: Fix byte order of sign counter added to signature

10 years agoshared/crypto: Fix concatenate of sign counter into the msg
Lukasz Rymanowski [Thu, 29 May 2014 13:49:38 +0000 (15:49 +0200)]
shared/crypto: Fix concatenate of sign counter into the msg

This patch fixes incorrectly concatenated sign counter to the message

10 years agoandroid/gatt: Fix signed write command encoding
Lukasz Rymanowski [Thu, 29 May 2014 13:49:37 +0000 (15:49 +0200)]
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

10 years agoandroid/gatt: Fix handling signed write command from remote
Lukasz Rymanowski [Thu, 29 May 2014 13:49:36 +0000 (15:49 +0200)]
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

10 years agoandroid/gatt: Verify signature counter from remote
Lukasz Rymanowski [Thu, 29 May 2014 13:49:35 +0000 (15:49 +0200)]
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.

10 years agoandroid/pics: Fix GATT PICS settings
Szymon Janc [Fri, 30 May 2014 10:02:57 +0000 (12:02 +0200)]
android/pics: Fix GATT PICS settings

10 years agoinput: Do not send UHID_DESTROY
Luiz Augusto von Dentz [Wed, 28 May 2014 11:23:33 +0000 (14:23 +0300)]
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."

10 years agoandroid/hidhost: Rework uHID code to use bt_uhid
Luiz Augusto von Dentz [Wed, 28 May 2014 11:18:18 +0000 (14:18 +0300)]
android/hidhost: Rework uHID code to use bt_uhid

10 years agoandroid/pts: Update GATT results
Jakub Tyszkowski [Thu, 29 May 2014 13:05:04 +0000 (15:05 +0200)]
android/pts: Update GATT results

10 years agoandroid/gatt: Support exec write request test command
Jakub Tyszkowski [Thu, 29 May 2014 13:05:03 +0000 (15:05 +0200)]
android/gatt: Support exec write request test command

'u2' parameter is used to pass exec write flag.

10 years agoandroid/gatt: Support prepare write request test command
Jakub Tyszkowski [Thu, 29 May 2014 13:05:02 +0000 (15:05 +0200)]
android/gatt: Support prepare write request test command

'u2' parameter is used for handle value, 'u3' for offset and
'u4' holds the value.

10 years agoandroid/gatt: Support write command test command
Jakub Tyszkowski [Thu, 29 May 2014 13:05:01 +0000 (15:05 +0200)]
android/gatt: Support write command test command

'u2' parameter is used to pass handle value.

10 years agoandroid/gatt: Support write request test command
Jakub Tyszkowski [Thu, 29 May 2014 13:05:00 +0000 (15:05 +0200)]
android/gatt: Support write request test command

'u2' parameter is used to pass handle value.

10 years agoandroid/gatt: Initial support for write test command
Jakub Tyszkowski [Thu, 29 May 2014 13:04:59 +0000 (15:04 +0200)]
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).

10 years agoandroid/pts: Update GATT test results
Eva Kolanska [Thu, 29 May 2014 13:34:15 +0000 (15:34 +0200)]
android/pts: Update GATT test results

10 years agoandroid/pts: Update GATT PTS status
Jakub Tyszkowski [Thu, 29 May 2014 10:34:08 +0000 (12:34 +0200)]
android/pts: Update GATT PTS status

10 years agoandroid/gatt: Support read by group in test commands
Jakub Tyszkowski [Thu, 29 May 2014 10:34:07 +0000 (12:34 +0200)]
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.

10 years agoandroid/gatt: Support read blob request in test command
Jakub Tyszkowski [Thu, 29 May 2014 10:34:06 +0000 (12:34 +0200)]
android/gatt: Support read blob request in test command

'u2' command paremeter is used as handle and 'u3' as offset value.

10 years agoandroid/gatt: Suport read by type request in test command
Jakub Tyszkowski [Thu, 29 May 2014 10:34:05 +0000 (12:34 +0200)]
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.

10 years agoandroid/gatt: Support read request in test command
Jakub Tyszkowski [Thu, 29 May 2014 10:34:04 +0000 (12:34 +0200)]
android/gatt: Support read request in test command

'u2' command parameter is used to pass attribute handle.

10 years agoandroid/gatt: Add read test command stub
Jakub Tyszkowski [Thu, 29 May 2014 10:34:03 +0000 (12:34 +0200)]
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.

10 years agoandroid/pts: Update PTS GAP tests results
Szymon Janc [Thu, 29 May 2014 08:01:07 +0000 (10:01 +0200)]
android/pts: Update PTS GAP tests results

10 years agoandroid/pics: Update PICS for GAP
Szymon Janc [Thu, 29 May 2014 08:01:06 +0000 (10:01 +0200)]
android/pics: Update PICS for GAP

Enable peripheral mode and tweak some other settings.

10 years agoandroid/pts: Update PTS GATT tests selection
Szymon Janc [Thu, 29 May 2014 10:48:20 +0000 (12:48 +0200)]
android/pts: Update PTS GATT tests selection

10 years agoandroid/pics: Update PICS for GATT
Szymon Janc [Thu, 29 May 2014 10:37:31 +0000 (12:37 +0200)]
android/pics: Update PICS for GATT

10 years agoandroid/pts: Update GATT Server test results
Eva Kolanska [Wed, 28 May 2014 14:24:48 +0000 (16:24 +0200)]
android/pts: Update GATT Server test results

10 years agoandroid/gatt: Fix doing database reads on write
Jakub Tyszkowski [Thu, 29 May 2014 05:59:11 +0000 (07:59 +0200)]
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.

10 years agoandroid/gatt: Implement disconnect test command
Szymon Janc [Mon, 26 May 2014 21:53:28 +0000 (23:53 +0200)]
android/gatt: Implement disconnect test command

10 years agoandroid/gatt: Implement connect test command
Szymon Janc [Mon, 26 May 2014 21:53:27 +0000 (23:53 +0200)]
android/gatt: Implement connect test command

10 years agoandroid/gatt: Implement enable test command
Szymon Janc [Mon, 26 May 2014 21:53:26 +0000 (23:53 +0200)]
android/gatt: Implement enable test command

This command is used to enable and disable test interface.

10 years agoandroid/gatt: Factor out unregistering client into helper function
Szymon Janc [Mon, 26 May 2014 21:53:25 +0000 (23:53 +0200)]
android/gatt: Factor out unregistering client into helper function

This will be also used by test interface.

10 years agoandroid/gatt: Add initial implementation of client test command
Szymon Janc [Mon, 26 May 2014 21:53:24 +0000 (23:53 +0200)]
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.

10 years agotools/hcidump: Decode MPEG-1,2 Audio codec capabilities
Andrzej Kaczmarek [Wed, 28 May 2014 08:50:02 +0000 (10:50 +0200)]
tools/hcidump: Decode MPEG-1,2 Audio codec capabilities

10 years agoandroid/gatt: Initialize crypto first
Jakub Tyszkowski [Wed, 28 May 2014 07:48:49 +0000 (09:48 +0200)]
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

10 years agoandroid/pts: Update GATT PTS results
Jakub Tyszkowski [Wed, 28 May 2014 09:34:15 +0000 (11:34 +0200)]
android/pts: Update GATT PTS results

10 years agoandroid/pts: Update SM PTS test results
Lukasz Rymanowski [Wed, 28 May 2014 09:30:06 +0000 (11:30 +0200)]
android/pts: Update SM PTS test results

Rerun TC_JW_* test cases

10 years agoandroid/gatt: Fix not checking for read errors in read by type
Jakub Tyszkowski [Wed, 28 May 2014 09:17:59 +0000 (11:17 +0200)]
android/gatt: Fix not checking for read errors in read by type

10 years agoandroid/client: Allow zero length responses
Jakub Tyszkowski [Wed, 28 May 2014 09:19:06 +0000 (11:19 +0200)]
android/client: Allow zero length responses

10 years agoandroid/pts: Update GATT test results
Eva Kolanska [Wed, 28 May 2014 08:53:21 +0000 (10:53 +0200)]
android/pts: Update GATT test results

10 years agoshared/gatt-db: Fix cropping permissions value
Jakub Tyszkowski [Tue, 27 May 2014 10:15:32 +0000 (12:15 +0200)]
shared/gatt-db: Fix cropping permissions value

10 years agoandroid/gatt: Use proper variable to store response length
Jakub Tyszkowski [Tue, 27 May 2014 10:15:31 +0000 (12:15 +0200)]
android/gatt: Use proper variable to store response length

This fixes confirmations being not send.

10 years agogatt: Fix not freeing GError on failure
Jakub Tyszkowski [Tue, 27 May 2014 10:15:30 +0000 (12:15 +0200)]
gatt: Fix not freeing GError on failure

10 years agoattrib: Fix minor whitespace issue
Jakub Tyszkowski [Tue, 27 May 2014 10:15:29 +0000 (12:15 +0200)]
attrib: Fix minor whitespace issue

Replace spaces with tabs.

10 years agoandroid/gatt: Fix not sending write request responses
Jakub Tyszkowski [Tue, 27 May 2014 11:52:47 +0000 (13:52 +0200)]
android/gatt: Fix not sending write request responses

Responses were pushed to pending response queue but send was never
triggered.

10 years agoandroid/pts: Update GATT PTS tests results
Eva Kolanska [Tue, 27 May 2014 14:22:39 +0000 (16:22 +0200)]
android/pts: Update GATT PTS tests results

10 years agotools/btmgmt: Fix address type in user confirm replies
Johan Hedberg [Tue, 27 May 2014 17:58:28 +0000 (20:58 +0300)]
tools/btmgmt: Fix address type in user confirm replies

10 years agoandroid: Add avinfo to makefile
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:47 +0000 (15:16 +0200)]
android: Add avinfo to makefile

10 years agotools/avinfo: Decode aptX codec capabilities
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:46 +0000 (15:16 +0200)]
tools/avinfo: Decode aptX codec capabilities

10 years agotools/avinfo: Decode MPEG-2,4 AAC codec capabilities
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:45 +0000 (15:16 +0200)]
tools/avinfo: Decode MPEG-2,4 AAC codec capabilities

10 years agotools/hcidump: Decode aptX codec capabilities
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:44 +0000 (15:16 +0200)]
tools/hcidump: Decode aptX codec capabilities

10 years agotools/hcidump: Decode MPEG-2,4 AAC codec capabilities
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:43 +0000 (15:16 +0200)]
tools/hcidump: Decode MPEG-2,4 AAC codec capabilities

10 years agoaudio: Add definitions for aptX
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:41 +0000 (15:16 +0200)]
audio: Add definitions for aptX

10 years agoaudio: Add macros to access MPEG-2,4 AAC codec info
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:40 +0000 (15:16 +0200)]
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.

10 years agoaudio: Add definitions for MPEG-2,4 AAC codec
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:39 +0000 (15:16 +0200)]
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.

10 years agoaudio: Fix a2dp_vendor_codec_t declaration
Andrzej Kaczmarek [Mon, 26 May 2014 13:16:38 +0000 (15:16 +0200)]
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.

10 years agoandroid/hal-sco: Fix memory leak
Andrei Emeltchenko [Thu, 22 May 2014 12:06:05 +0000 (15:06 +0300)]
android/hal-sco: Fix memory leak

Release resampler on exit.

10 years agoshared/crypto: Fix fd leaks in bt_crypto_sign_att()
Johan Hedberg [Tue, 27 May 2014 09:15:11 +0000 (12:15 +0300)]
shared/crypto: Fix fd leaks in bt_crypto_sign_att()

10 years agoandroid/pts: Update GATT PTS tests results
Eva Kolanska [Tue, 27 May 2014 08:40:39 +0000 (10:40 +0200)]
android/pts: Update GATT PTS tests results

10 years agoandroid/gatt: Check permissions before write execution
Marcin Kraglak [Mon, 26 May 2014 14:06:23 +0000 (16:06 +0200)]
android/gatt: Check permissions before write execution

Check attribute's permissions and return error if device is not allowed
to read.

10 years agoandroid/gatt: Fix possible memory leak in write request
Marcin Kraglak [Mon, 26 May 2014 14:06:22 +0000 (16:06 +0200)]
android/gatt: Fix possible memory leak in write request

If write cannot be executed, remove data from queue and free
allocated memory.

10 years agoandroid/pts: Update GATT tests results
Eva Kolanska [Mon, 26 May 2014 15:03:46 +0000 (17:03 +0200)]
android/pts: Update GATT tests results

10 years agoandroid/README: Update required kernel options
Szymon Janc [Mon, 26 May 2014 15:03:45 +0000 (17:03 +0200)]
android/README: Update required kernel options

CRYPTO support is required by gatt.

10 years agoandroid/hal-gatt: Fix missing check if interface is ready
Szymon Janc [Mon, 26 May 2014 15:03:44 +0000 (17:03 +0200)]
android/hal-gatt: Fix missing check if interface is ready

10 years agoandroid/hal-audio: Fix invalid memory access when downmixing to mono
Andrei Emeltchenko [Thu, 22 May 2014 13:07:02 +0000 (16:07 +0300)]
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).

10 years agoandroid/gatt: Check permissions before read execution
Marcin Kraglak [Mon, 26 May 2014 09:10:29 +0000 (11:10 +0200)]
android/gatt: Check permissions before read execution

Check device security level and attribute permissions before read
execution.

10 years agoandroid/gatt: Add proper permissions to built-in services
Marcin Kraglak [Mon, 26 May 2014 09:10:28 +0000 (11:10 +0200)]
android/gatt: Add proper permissions to built-in services

Set permissions to built in services.

10 years agoandroid/gatt: Store proper attributes permissions in database
Marcin Kraglak [Mon, 26 May 2014 09:10:27 +0000 (11:10 +0200)]
android/gatt: Store proper attributes permissions in database

Convert Android HAL permissions to GATT server permissions and store
them in database.

10 years agoandroid/hal-gatt: Define attribute permissions values
Marcin Kraglak [Mon, 26 May 2014 09:10:26 +0000 (11:10 +0200)]
android/hal-gatt: Define attribute permissions values

These values are defined in Android and should be used on daemon
side.

10 years agoshared/gatt: Add helper for getting attribute's permissions
Marcin Kraglak [Mon, 26 May 2014 09:10:25 +0000 (11:10 +0200)]
shared/gatt: Add helper for getting attribute's permissions

It will return attribute's permissions or 0 if attribute was not found.

10 years agoshared/gatt: Define atribute permissions as uint32_t
Marcin Kraglak [Mon, 26 May 2014 09:10:24 +0000 (11:10 +0200)]
shared/gatt: Define atribute permissions as uint32_t

10 years agoandroid/pts: Update MPS tests results
Szymon Janc [Thu, 22 May 2014 09:41:14 +0000 (11:41 +0200)]
android/pts: Update MPS tests results

10 years agoandroid/pics: Enable NAP and PBAP in MPS settings
Szymon Janc [Fri, 23 May 2014 11:30:21 +0000 (13:30 +0200)]
android/pics: Enable NAP and PBAP in MPS settings

10 years agoandroid/bluetooth: Register SDP record for MPS
Szymon Janc [Thu, 22 May 2014 09:39:47 +0000 (11:39 +0200)]
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.

10 years agolib/sdp: Add attributes and service class for MPS
Szymon Janc [Thu, 22 May 2014 08:57:05 +0000 (10:57 +0200)]
lib/sdp: Add attributes and service class for MPS

10 years agoandroid/gatt: Use default mtu on mtu exchange response
Jakub Tyszkowski [Mon, 26 May 2014 07:13:16 +0000 (09:13 +0200)]
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.

10 years agoandroid/gatt: Make att_handler use g_attrib buffer
Jakub Tyszkowski [Mon, 26 May 2014 07:13:15 +0000 (09:13 +0200)]
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.

10 years agoandroid/gatt: Use g_attrib buffer where possible for att
Jakub Tyszkowski [Mon, 26 May 2014 07:13:14 +0000 (09:13 +0200)]
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.

10 years agoandroid: Fix sending uninitialised data
Jakub Tyszkowski [Mon, 26 May 2014 07:32:43 +0000 (09:32 +0200)]
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)

10 years agoandroid/gatt: Fix possible memory leak
Jakub Tyszkowski [Mon, 26 May 2014 07:32:42 +0000 (09:32 +0200)]
android/gatt: Fix possible memory leak

10 years agoandroid/gatt: Add handling signed write from remote device
Lukasz Rymanowski [Thu, 22 May 2014 19:06:26 +0000 (21:06 +0200)]
android/gatt: Add handling signed write from remote device