OSDN Git Service

android-x86/external-bluetooth-bluez.git
10 years agoReplace att_put_u16() by put_le16()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:40 +0000 (16:25 -0300)]
Replace att_put_u16() by put_le16()

10 years agoReplace att_put_uuid() by util.h helpers
Claudio Takahasi [Mon, 24 Mar 2014 19:25:39 +0000 (16:25 -0300)]
Replace att_put_uuid() by util.h helpers

10 years agoReplace att_get_uuid128() by bswap_128()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:38 +0000 (16:25 -0300)]
Replace att_get_uuid128() by bswap_128()

GATT/ATT use little-endian byte order format for 128-bit UUID. No matter
the system byte order representation, internally the core will handle
128-bit UUID on big-endian format.

10 years agoReplace att_get_u16() by get_le16()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:37 +0000 (16:25 -0300)]
Replace att_get_u16() by get_le16()

10 years agoReplace att_get_uuid16() by get_le16()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:36 +0000 (16:25 -0300)]
Replace att_get_uuid16() by get_le16()

10 years agoReplace att_put_uuid16() by put_le16()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:35 +0000 (16:25 -0300)]
Replace att_put_uuid16() by put_le16()

10 years agoReplace att_put_u32() by put_le32()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:34 +0000 (16:25 -0300)]
Replace att_put_u32() by put_le32()

10 years agoReplace att_get_u32() by get_le32()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:33 +0000 (16:25 -0300)]
Replace att_get_u32() by get_le32()

10 years agoattrib: Use LE helpers defined in src/shared/util.h
Claudio Takahasi [Mon, 24 Mar 2014 19:25:32 +0000 (16:25 -0300)]
attrib: Use LE helpers defined in src/shared/util.h

10 years agounit: Fix 128-bit UUID format
Claudio Takahasi [Mon, 24 Mar 2014 19:25:31 +0000 (16:25 -0300)]
unit: Fix 128-bit UUID format

No matter the system, 128-bit UUID must use big endian byte order format
(similar to human-readable format).

10 years agolib: Fix UUID 16/32-bits to 128-bit conversion
Claudio Takahasi [Mon, 24 Mar 2014 19:25:30 +0000 (16:25 -0300)]
lib: Fix UUID 16/32-bits to 128-bit conversion

16 and 32-bit UUIDs are always created using host order. However,
no matter the system type, 128-bit UUID must use big-endian byte
order format (similar to human-readble format).

10 years agolib: Remove hton128() from bt_uuid_to_string()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:29 +0000 (16:25 -0300)]
lib: Remove hton128() from bt_uuid_to_string()

bt_uuid_to_string() helper should get the raw UUID value. Caller should
convert the 128-bit UUID before call this helper (if applicable).
bt_uuid_t stores 128-bit UUID using big-endian format (human-readable
format), swapping byte order is not necessary.

10 years agolib: Remove ntoh128() from bt_string_to_uuid128()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:28 +0000 (16:25 -0300)]
lib: Remove ntoh128() from bt_string_to_uuid128()

No matter the system, 128-bit UUIDs should not be converted to any byte
order when creating the UUID. Conversion to big/little endian should be
performed when transfering the data over-the-air only. bt_uuid_t should
handle 128-bit UUID on big-endian format (human-readable format).

10 years agoReplace bt_put_be64() by put_be64()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:27 +0000 (16:25 -0300)]
Replace bt_put_be64() by put_be64()

10 years agoReplace bt_put_be32() by put_be32()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:26 +0000 (16:25 -0300)]
Replace bt_put_be32() by put_be32()

10 years agoReplace bt_put_be16() by put_be16()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:25 +0000 (16:25 -0300)]
Replace bt_put_be16() by put_be16()

10 years agoReplace bt_get_be64() by get_be64()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:24 +0000 (16:25 -0300)]
Replace bt_get_be64() by get_be64()

10 years agoReplace bt_get_be32() by get_be32()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:23 +0000 (16:25 -0300)]
Replace bt_get_be32() by get_be32()

10 years agoReplace bt_get_be16() by get_be16()
Claudio Takahasi [Mon, 24 Mar 2014 19:25:22 +0000 (16:25 -0300)]
Replace bt_get_be16() by get_be16()

10 years agoattrib: Remove unneeded sdp.h header include
Claudio Takahasi [Thu, 20 Mar 2014 17:25:59 +0000 (14:25 -0300)]
attrib: Remove unneeded sdp.h header include

10 years agoandroid/bluetooth: Always send known properties in new device event
Szymon Janc [Mon, 24 Mar 2014 14:07:49 +0000 (15:07 +0100)]
android/bluetooth: Always send known properties in new device event

This fix not updating property if EIR value was same as cached one.

10 years agotools: Fix coding style checking boolean
Claudio Takahasi [Mon, 24 Mar 2014 14:06:41 +0000 (11:06 -0300)]
tools: Fix coding style checking boolean

This patch fixes tools/gatt-service.c coding style, using !foo instead
of foo == FALSE.

10 years agogatt: Fix coding style when testing pointers
Claudio Takahasi [Mon, 24 Mar 2014 14:06:40 +0000 (11:06 -0300)]
gatt: Fix coding style when testing pointers

Use !ptr instead of ptr == NULL

10 years agogatt: Fix read callback description
Claudio Takahasi [Mon, 24 Mar 2014 13:34:18 +0000 (10:34 -0300)]
gatt: Fix read callback description

10 years agogatt: Minor coding style fix
Johan Hedberg [Mon, 24 Mar 2014 13:42:10 +0000 (15:42 +0200)]
gatt: Minor coding style fix

10 years agotools: Emit property changed when Value changes
Claudio Takahasi [Mon, 24 Mar 2014 13:30:09 +0000 (10:30 -0300)]
tools: Emit property changed when Value changes

This patch extends gatt-service tool, emitting PropertiesChanged for
"Value" when a new value is set. This flow represents the handling of
ATT Write Command or Write Request which is translated to a GDBusProxy
set property. PropertiesChanged will be tracked by the characteristic
GDBusProxy in order to detect "Value" changes.

10 years agotools: Add setting Value property of gatt-service
Alvaro Silva [Mon, 24 Mar 2014 13:30:08 +0000 (10:30 -0300)]
tools: Add setting Value property of gatt-service

This patch extends the gatt-service.c example adding a generic callback
to allow set the characteristic Value. It doesn't check for
characteristic properties yet.

10 years agotools: Add reading Value property of gatt-service
Alvaro Silva [Mon, 24 Mar 2014 13:30:07 +0000 (10:30 -0300)]
tools: Add reading Value property of gatt-service

This patch extends the gatt-service.c example adding the callback to
allow reading the Value property. At the moment, it is a generic
callback and it doesn't consider characteristic value property
restrictions.

10 years agotools: Add Alert Level characteristic to gatt-service
Alvaro Silva [Mon, 24 Mar 2014 13:30:06 +0000 (10:30 -0300)]
tools: Add Alert Level characteristic to gatt-service

This patch registers the Alert Level characteristic object related to
Immediate Alert Service. It adds the characteristic UUID property only.

10 years agogatt: Add Write Request handling for GDBusProxy
Claudio Takahasi [Mon, 24 Mar 2014 13:30:05 +0000 (10:30 -0300)]
gatt: Add Write Request handling for GDBusProxy

When the characteristic requires Write Request, the ATT response should
be sent after receiving the reply for the Set method call.

10 years agogatt: Add result callback for Write Request
Claudio Takahasi [Mon, 24 Mar 2014 13:30:04 +0000 (10:30 -0300)]
gatt: Add result callback for Write Request

This patch adds a callback to allow the service implementation to inform
the core (ATT layer) the result of the write operation. Used to handle
ATT Write Request procedure, which requires ATT response.

10 years agogatt: Assign write callback for external services
Claudio Takahasi [Mon, 24 Mar 2014 13:30:03 +0000 (10:30 -0300)]
gatt: Assign write callback for external services

This patch adds the callback for writing the external characteristic
value. Internally, GDBusProxy implementation calls Set method of the
"Value" property. At the moment, potential errors returned by the
external service implementation are being ignored.

The ATT operation (Write Command or Request) is not exposed to the
external service implementation. GATT/GDBusProxy handles possible
DBus errors returned, and notify the core using the callbacks informed.
Write Command doesn't have callback since it doesn't return ATT errors.

10 years agogatt: Add write callback to btd_gatt_add_char helper
Claudio Takahasi [Mon, 24 Mar 2014 13:30:02 +0000 (10:30 -0300)]
gatt: Add write callback to btd_gatt_add_char helper

This patch adds a function callback for write operations. When a remote
device writes to a given attribute, the core calls the specified write
callback informing the attribute server the new characteristic value.

10 years agoandroid/bluetooth: Fix handling of BREDR, LE and dual mode devices
Szymon Janc [Sun, 23 Mar 2014 21:40:54 +0000 (22:40 +0100)]
android/bluetooth: Fix handling of BREDR, LE and dual mode devices

This includes fix for storage format so that dual mode devices are
handled correctly. Unfortunatelly this change is not backward
compatible so wiping out /data/misc/bluetooth/ is recommended.

Also correct device type is passed to bonding commands. For create_bond
we fallback to BDEDR if device is not known. This can happen eg. with
OOB. For cancel_bond and remove_bond we require device to be known.
For dual mode device currently only BREDR type is used.

Storage change details:
Instead of storing bdaddr type of device as "Type", now two variables
are used. Boolean "BREDR" if device supports BREDR. Address type is
stored in "AddressType" only if device supports LE and is either
LE random or LE public type.

10 years agoandroid/bluetooth: Add support for new long term key mgmt event
Szymon Janc [Sun, 23 Mar 2014 21:40:53 +0000 (22:40 +0100)]
android/bluetooth: Add support for new long term key mgmt event

10 years agoandroid/bluetooth: Add support for loading LTKs
Szymon Janc [Sun, 23 Mar 2014 21:40:52 +0000 (22:40 +0100)]
android/bluetooth: Add support for loading LTKs

10 years agoandroid/bluetooth: Filter out not discoverable LE devices
Szymon Janc [Sun, 23 Mar 2014 21:40:51 +0000 (22:40 +0100)]
android/bluetooth: Filter out not discoverable LE devices

Filter out unknown LE devices that do not have Discoverable flag or
Limited Discoverable flag set.

10 years agoandroid/gatt: Restart scan after connection
Lukasz Rymanowski [Sun, 23 Mar 2014 20:20:09 +0000 (21:20 +0100)]
android/gatt: Restart scan after connection

With this patch we make sure that scan is restarted if it was holded for
connection purpose.

10 years agoandroid/gatt: Fix scan handling
Lukasz Rymanowski [Sun, 23 Mar 2014 20:20:08 +0000 (21:20 +0100)]
android/gatt: Fix scan handling

Android has its own ScanQueue which is used for tracking scanning
clients which means we do not have to have this logic internally.

Android will call Scan Off only when his scanQueue is empty.

10 years agocore: Move EIR flags definitions to eir.h
Szymon Janc [Mon, 24 Mar 2014 12:36:42 +0000 (13:36 +0100)]
core: Move EIR flags definitions to eir.h

10 years agounit/avrcp: Fix possible buffer overflow
Andrei Emeltchenko [Wed, 19 Mar 2014 12:26:58 +0000 (14:26 +0200)]
unit/avrcp: Fix possible buffer overflow

Parameter passed needs to be of size number otherwise there is buffer
overflow.

10 years agotools: Fix coding style when testing pointer
Claudio Takahasi [Fri, 21 Mar 2014 19:20:32 +0000 (16:20 -0300)]
tools: Fix coding style when testing pointer

This patch fixes tools/gatt-service.c coding style, using !ptr instead
of ptr == NULL.

10 years agogatt: Fix coding style checking boolean
Claudio Takahasi [Fri, 21 Mar 2014 19:20:31 +0000 (16:20 -0300)]
gatt: Fix coding style checking boolean

Use !foo instead of foo == FALSE

10 years agogdbus: Add g_dbus_proxy_set_property_array
Claudio Takahasi [Fri, 21 Mar 2014 19:16:36 +0000 (16:16 -0300)]
gdbus: Add g_dbus_proxy_set_property_array

This patch adds a new gdbus utility function to allow setting a property
of fixed, and non-fixed values array.

10 years agogatt: Assign read callback for external services
Claudio Takahasi [Fri, 21 Mar 2014 19:16:34 +0000 (16:16 -0300)]
gatt: Assign read callback for external services

This patch adds the callback for reading the external characteristic
Value. Internally, GDBusProxy implementation tracks all properties Value
changes consequently Value can be ready directly from the proxy without
additional method calls.

10 years agoshared: Add proper IO disconnect handling when using epoll
Marcel Holtmann [Sun, 23 Mar 2014 19:37:55 +0000 (12:37 -0700)]
shared: Add proper IO disconnect handling when using epoll

10 years agoshared: Add simple function to remove entry from queue
Marcel Holtmann [Sun, 23 Mar 2014 19:09:58 +0000 (12:09 -0700)]
shared: Add simple function to remove entry from queue

10 years agoeir: Use unsigned int for flags in struct eir_data
Szymon Janc [Fri, 21 Mar 2014 17:21:32 +0000 (18:21 +0100)]
eir: Use unsigned int for flags in struct eir_data

This adds assumption that if flags field is not present in EIR all
flags are unset:
"The Flags data type shall be included when any of the Flag bits are
non-zero, otherwise the Flags data type may be omitted."

This also fix reporting non-discoverable LE devices as limited
discoverable due to no explicit check for flags == -1 as empty
flags.

10 years agoandroid/bluetooth: Constify bdaddr parameter in bt_le_device_found
Szymon Janc [Sat, 22 Mar 2014 17:26:45 +0000 (18:26 +0100)]
android/bluetooth: Constify bdaddr parameter in bt_le_device_found

10 years agocore: Use non-discoverable LE device found events for existing devices
Johan Hedberg [Sat, 22 Mar 2014 17:29:16 +0000 (19:29 +0200)]
core: Use non-discoverable LE device found events for existing devices

If we have an existing device objects take advantage of new data in
device found events even if the device is not discoverable. If there is
no previous device object ignore the event.

10 years agocore: Update btd_adapter_find_device to also match the address type
Johan Hedberg [Sat, 22 Mar 2014 17:30:18 +0000 (19:30 +0200)]
core: Update btd_adapter_find_device to also match the address type

This is necessary to do accurate matching for LE devices.

10 years agocore: Add function to look up devices also by their type
Johan Hedberg [Sat, 22 Mar 2014 17:28:45 +0000 (19:28 +0200)]
core: Add function to look up devices also by their type

10 years agomonitor: Update decoding of Apple manufacturer advertising data
Marcel Holtmann [Sat, 22 Mar 2014 05:28:01 +0000 (22:28 -0700)]
monitor: Update decoding of Apple manufacturer advertising data

10 years agodevice: Fix sending unneeded property change signals
Szymon Janc [Fri, 21 Mar 2014 15:06:34 +0000 (16:06 +0100)]
device: Fix sending unneeded property change signals

Send property change for Modalias only if it changed. This fix sending
multiple unneeded property change events during discovery.

10 years agoandroid/handsfree: Start codec selection if HF send AT+BAC while codec connection
Marcin Kraglak [Fri, 21 Mar 2014 14:30:20 +0000 (15:30 +0100)]
android/handsfree: Start codec selection if HF send AT+BAC while codec connection

If AG receives AT+BAC in response to +BCS, refresh list of codecs
and start new codec connection. It is required in TC_AG_ACC_BV_11_I
PTS test case.

10 years agocore: Fix g_hash_table_destroy when running without -E
Johan Hedberg [Fri, 21 Mar 2014 14:14:52 +0000 (16:14 +0200)]
core: Fix g_hash_table_destroy when running without -E

10 years agoobexd/client: Fix not sending OBEX Disconnect when disconnecting
Luiz Augusto von Dentz [Fri, 21 Mar 2014 11:49:38 +0000 (13:49 +0200)]
obexd/client: Fix not sending OBEX Disconnect when disconnecting

Sending OBEX Disconnect command before disconnecting the transport is
mandatory.

10 years agounit/test-gobex: Add test for g_obex_disconnect
Luiz Augusto von Dentz [Fri, 21 Mar 2014 11:09:51 +0000 (13:09 +0200)]
unit/test-gobex: Add test for g_obex_disconnect

10 years agogobex: Add g_obex_disconnect
Luiz Augusto von Dentz [Fri, 21 Mar 2014 10:56:08 +0000 (12:56 +0200)]
gobex: Add g_obex_disconnect

This adds g_obex_disconnect function which can be used to send OBEX
Disconnect command.

10 years agoTODO: Add task to implement authentication in obexd
Luiz Augusto von Dentz [Fri, 21 Mar 2014 10:48:52 +0000 (12:48 +0200)]
TODO: Add task to implement authentication in obexd

10 years agoTODO: Add unit tests for GOEP
Luiz Augusto von Dentz [Fri, 21 Mar 2014 10:22:36 +0000 (12:22 +0200)]
TODO: Add unit tests for GOEP

10 years agoTODO: Add task for PBAP 1.2
Luiz Augusto von Dentz [Fri, 21 Mar 2014 09:39:42 +0000 (11:39 +0200)]
TODO: Add task for PBAP 1.2

10 years agocore/profile: Add MapSupportedFeatures to MSN record
Luiz Augusto von Dentz [Fri, 21 Mar 2014 09:28:03 +0000 (11:28 +0200)]
core/profile: Add MapSupportedFeatures to MSN record

This add MapSupportedFeatures and set it to support everything including
instance information and extended event report.

10 years agolib/sdp: Add MapSupportedFeatures attribute
Luiz Augusto von Dentz [Fri, 21 Mar 2014 09:08:05 +0000 (11:08 +0200)]
lib/sdp: Add MapSupportedFeatures attribute

This adds MapSupportedFeatures which is used for MAP v1.2 and later.

10 years agolib/sdp: Add PbapSupportedFeatures attribute
Luiz Augusto von Dentz [Fri, 21 Mar 2014 08:05:21 +0000 (10:05 +0200)]
lib/sdp: Add PbapSupportedFeatures attribute

This adds PbapSupportedFeatures which is used for PBAP v1.2 and later.

10 years agogobex/transfer: Keep request id for GET when SRM is active
Luiz Augusto von Dentz [Thu, 20 Mar 2014 16:59:41 +0000 (18:59 +0200)]
gobex/transfer: Keep request id for GET when SRM is active

In case a GET operation is in progress with SRM the same request id is
valid for the whole transfer otherwise it is not possible to cancel the
transfer after the first response.

10 years agogobex: Fix not resetting SRM setup
Luiz Augusto von Dentz [Thu, 20 Mar 2014 16:54:48 +0000 (18:54 +0200)]
gobex: Fix not resetting SRM setup

If SRM is not confirmed by both ends the setup should be disregarded and
the data associated to it can be freed otherwise the next command may
reuse the same setup assuming it is still valid and probably cause SRM
to be enabled without remote consent.

10 years agounit: Use lower-case for 128-bit UUIDs
Claudio Takahasi [Thu, 20 Mar 2014 14:43:00 +0000 (11:43 -0300)]
unit: Use lower-case for 128-bit UUIDs

According to ISO/IEC 9834-8: "It is recommended that the hexadecimal
representation used in all human-readable formats be restricted to
lower-case letters. Software processing this representation is, however,
required to accept both upper and lower case letters as specified in
6.5.2."

10 years agoReplace bt_get_le64() by get_le64()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:38 +0000 (11:42 -0300)]
Replace bt_get_le64() by get_le64()

10 years agoReplace bt_get_le32() by get_le32()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:37 +0000 (11:42 -0300)]
Replace bt_get_le32() by get_le32()

10 years agoReplace bt_get_le16() by get_le16()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:36 +0000 (11:42 -0300)]
Replace bt_get_le16() by get_le16()

10 years agoshared: Fix incorrect "const" in 32/64 bit put functions
Johan Hedberg [Fri, 21 Mar 2014 08:39:27 +0000 (10:39 +0200)]
shared: Fix incorrect "const" in 32/64 bit put functions

10 years agoshared: Add put_be64()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:35 +0000 (11:42 -0300)]
shared: Add put_be64()

Add helper to avoid possible unaligned memory access when handling
uint64 value using big-endian representation.

10 years agoshared: Add put_be32()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:34 +0000 (11:42 -0300)]
shared: Add put_be32()

Add helper to avoid possible unaligned memory access when handling
uint32 value using big-endian representation.

10 years agoshared: Add put_be16()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:33 +0000 (11:42 -0300)]
shared: Add put_be16()

Add helper to avoid possible unaligned memory access when handling
uint16 value using big-endian representation.

10 years agoshared: Add get_be64()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:32 +0000 (11:42 -0300)]
shared: Add get_be64()

Add helper to avoid possible unaligned memory access when handling
uint64 value using big-endian representation.

10 years agoshared: Add get_be32()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:31 +0000 (11:42 -0300)]
shared: Add get_be32()

Add helper to avoid possible unaligned memory access when handling
uint32 value using big-endian representation.

10 years agoshared: Add get_be16()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:30 +0000 (11:42 -0300)]
shared: Add get_be16()

Add helper to avoid possible unaligned memory access when handling
uint16 value using big-endian representation.

10 years agoshared: Add get_le64()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:29 +0000 (11:42 -0300)]
shared: Add get_le64()

Add helper to avoid possible unaligned memory access when handling
uint64 value using little-endian representation.

10 years agoshared: Add get_le32()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:28 +0000 (11:42 -0300)]
shared: Add get_le32()

Add helper to avoid possible unaligned memory access when handling
uint32 value using little-endian representation.

10 years agoshared: Add get_le16()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:27 +0000 (11:42 -0300)]
shared: Add get_le16()

Add helper to avoid possible unaligned memory access when handling
uint16 value using little-endian representation.

10 years agoshared: Add put_le64()
Claudio Takahasi [Thu, 20 Mar 2014 14:42:26 +0000 (11:42 -0300)]
shared: Add put_le64()

Add helper to avoid possible unaligned memory access when handling
uint64 value using little-endian representation.

10 years agounit: Add test for g_dbus_client_set_ready_watch()
Claudio Takahasi [Fri, 7 Mar 2014 13:14:32 +0000 (10:14 -0300)]
unit: Add test for g_dbus_client_set_ready_watch()

10 years agogatt: Add read callback to btd_gatt_add_char helper
Claudio Takahasi [Tue, 18 Mar 2014 20:26:21 +0000 (17:26 -0300)]
gatt: Add read callback to btd_gatt_add_char helper

This patch adds a function callback for read operations. When a remote
device wants to reads a given attribute, the core calls the specified
read callback to get the value from the external services.

10 years agogatt: Add hash table of GDBusProxy objects
Claudio Takahasi [Tue, 18 Mar 2014 20:26:20 +0000 (17:26 -0300)]
gatt: Add hash table of GDBusProxy objects

This commits adds a hash table to map attributes into GDBusProxy,
allowing to call remote objects for reading and writing values.

10 years agogatt: Add characteristic to the database
Claudio Takahasi [Tue, 18 Mar 2014 20:26:19 +0000 (17:26 -0300)]
gatt: Add characteristic to the database

Initial support for GATT characteristics. This patch adds the
characteristic declaration attribute to the GATT local database based
on the fetched GDBusProxy objects.

10 years agogatt: Add helper for creating GATT characteristics
Andre Guedes [Tue, 18 Mar 2014 20:26:18 +0000 (17:26 -0300)]
gatt: Add helper for creating GATT characteristics

This patch adds btd_gatt_add_char() helper. It creates and adds the
Characteristic declaration, and Characteristic value attributes to the
local attribute database.

10 years agogatt: Add function to create constant attributes
Andre Guedes [Tue, 18 Mar 2014 20:26:17 +0000 (17:26 -0300)]
gatt: Add function to create constant attributes

This patch adds a helper function to create attribute with static
values. It is intended to be used to create GATT services, and
characteristic declarations.

10 years agoshared: Add bswap_128()
Claudio Takahasi [Tue, 18 Mar 2014 20:26:16 +0000 (17:26 -0300)]
shared: Add bswap_128()

Adds a new helper to swap 128-bit values. It is intended to be used for
GATT 128-bit UUID handling, converting 128-bit UUID from big-endian to
little-endian (or the opposite).

No matter the system, bt_uuid_t should always store 128-bit UUID value
using big-endian format (similar to human-readable format).

10 years agoandroid: Fix some random code style issues
Szymon Janc [Thu, 20 Mar 2014 13:27:07 +0000 (14:27 +0100)]
android: Fix some random code style issues

Fix whitespace problems and not needed empty lines.

10 years agoobexd/client: Fix not being able cancel GET requests
Luiz Augusto von Dentz [Thu, 20 Mar 2014 13:50:50 +0000 (15:50 +0200)]
obexd/client: Fix not being able cancel GET requests

In case of GET operation the code does not use g_obex_get_req_pkt since
the beggining to be able to read the header from the first response, this
means that the request should be cancel with g_obex_cancel_req not with
g_obex_cancel_transfer.

10 years agocore/profile: Remove code for waiting services to be resolved
Luiz Augusto von Dentz [Thu, 20 Mar 2014 13:50:51 +0000 (15:50 +0200)]
core/profile: Remove code for waiting services to be resolved

This remove code related to waiting service to be resolved as it is now
part of btd_request_authorization.

10 years agocore: Wait for services to be resolved before doing authorization
Luiz Augusto von Dentz [Thu, 20 Mar 2014 13:50:49 +0000 (15:50 +0200)]
core: Wait for services to be resolved before doing authorization

This makes btd_request_authorization to wait until services are resolved
before proceeding with authorization, if the services could not be
resolved it still proceeds with authorization since some profile may not
have a record to be resolved.

10 years agotools/mgmt-tester: Remove dead code
Lukasz Rymanowski [Thu, 20 Mar 2014 13:25:09 +0000 (14:25 +0100)]
tools/mgmt-tester: Remove dead code

10 years agotools/mgmt-tester: Minor fix in Stop discovery Success 1 test
Lukasz Rymanowski [Thu, 20 Mar 2014 13:25:08 +0000 (14:25 +0100)]
tools/mgmt-tester: Minor fix in Stop discovery Success 1 test

Set directly setup_send params for start discovery. It will be easier to
follow the test.

10 years agocore: Ignore ATT errors when considering Pair() success
Johan Hedberg [Thu, 20 Mar 2014 14:08:36 +0000 (16:08 +0200)]
core: Ignore ATT errors when considering Pair() success

Occasionally there may be errors in completing the service discovery
process over ATT when pairing with an LE device. Since we will any way
pick up from where we left off the next time we get connected it should
be safe to return success for the Pair() method call as long as the
actual pairing part was successful.

10 years agocore: Fix Paired property notification for multiple bearers
Johan Hedberg [Thu, 20 Mar 2014 14:06:21 +0000 (16:06 +0200)]
core: Fix Paired property notification for multiple bearers

The code in device_set_paired wasn't quite right previously. We should
not be sending Paired=true if we've already done that once due to the
other supported bearer.

10 years agotools/mgmt-tester: Refactor setup_start_discovery function
Lukasz Rymanowski [Thu, 20 Mar 2014 12:59:29 +0000 (13:59 +0100)]
tools/mgmt-tester: Refactor setup_start_discovery function

This patch removes handling hook register from this
function and its callback as this is no longer necessary for any stop
discovery tests.

This patch also adds setup_send_param and setup_send_len  parameters to
test data so it is easy to control start discovery command parameters.
It is useful for tests:
Stop Discovery - Invalid parameters 1
Stop Discovery - BR/EDR (Inquiry) Success 1

10 years agoandroid/README: Add "Customization" section
Szymon Janc [Thu, 20 Mar 2014 12:31:48 +0000 (13:31 +0100)]
android/README: Add "Customization" section

10 years agoandroid/README: Update Known Android issues section
Szymon Janc [Thu, 20 Mar 2014 11:04:46 +0000 (12:04 +0100)]
android/README: Update Known Android issues section