OSDN Git Service

android-x86/external-bluetooth-bluez.git
13 years agoFix duplicate characteristics
Bruna Moreira [Thu, 20 Jan 2011 13:27:47 +0000 (09:27 -0400)]
Fix duplicate characteristics

The Discover() operation (from DBus API) was registering the same
characteristics after running several times. This can be checked using
test-attrib.

13 years agomgmt: Add support for connected/disconnected events
Johan Hedberg [Fri, 21 Jan 2011 05:03:02 +0000 (07:03 +0200)]
mgmt: Add support for connected/disconnected events

13 years agoKeep connection handle information inside adapter_ops
Johan Hedberg [Fri, 21 Jan 2011 04:56:55 +0000 (06:56 +0200)]
Keep connection handle information inside adapter_ops

There's no point to export connection handle details to the core daemon
since it will not be available in the management interface. Instead
track the handles inside hciops (managment interface will do this inside
the kernel).

13 years agomgmt: add initial support for link key handling
Johan Hedberg [Fri, 21 Jan 2011 02:49:42 +0000 (04:49 +0200)]
mgmt: add initial support for link key handling

13 years agoRemove unused storage functions
Johan Hedberg [Fri, 21 Jan 2011 02:48:39 +0000 (04:48 +0200)]
Remove unused storage functions

13 years agoUse an unsigned integer for representing the PIN length
Johan Hedberg [Fri, 21 Jan 2011 02:40:11 +0000 (04:40 +0200)]
Use an unsigned integer for representing the PIN length

The value 0 is not allowed by the HCI spec so it can be used to denote
"not applicable" or "unknown". Also, the management interface will use
an unsigned integer for the PIN length so mirroring that in the core
daemon code makes sense. This patch also takes care of handling
previously stored -1 values and converts them to 0 whenever they are
detected.

13 years agoRelease 4.86
Marcel Holtmann [Thu, 20 Jan 2011 11:25:31 +0000 (12:25 +0100)]
Release 4.86

13 years agoAdd READ_BLOB_REQUEST support to attribute server
Brian Gix [Wed, 19 Jan 2011 22:00:53 +0000 (14:00 -0800)]
Add READ_BLOB_REQUEST support to attribute server

13 years agoFix Handle range if Pri/Sec Service is Empty
Brian Gix [Wed, 19 Jan 2011 22:00:52 +0000 (14:00 -0800)]
Fix Handle range if Pri/Sec Service is Empty

13 years agoUpdate a2dpsink to use new Acquire API
Luiz Augusto von Dentz [Thu, 20 Jan 2011 09:29:41 +0000 (11:29 +0200)]
Update a2dpsink to use new Acquire API

13 years agoUpdate NREC callback code to originally intended v2 state
Johan Hedberg [Wed, 19 Jan 2011 16:50:41 +0000 (22:20 +0530)]
Update NREC callback code to originally intended v2 state

13 years agoAdd proper tracking mechanism to NREC
Luiz Augusto von Dentz [Tue, 18 Jan 2011 10:00:15 +0000 (12:00 +0200)]
Add proper tracking mechanism to NREC

NREC may change during the connections so it has to be tracked in order
to signal changes to applications.

13 years agoAdd Routing property to MediaTransport interface
Luiz Augusto von Dentz [Tue, 18 Jan 2011 10:00:14 +0000 (12:00 +0200)]
Add Routing property to MediaTransport interface

This should indicate to the endpoint what routing the transport is using

13 years agoRemove IMTU and OMTU properties and return its values on Acquire reply
Luiz Augusto von Dentz [Tue, 18 Jan 2011 10:00:12 +0000 (12:00 +0200)]
Remove IMTU and OMTU properties and return its values on Acquire reply

This should make Acquire blocking friendly since the client no longer has
to call GetProperties to discover how much it can write/read when using
the acquired file descriptor.

13 years agoMove common code from Discover all Characteristics to GATT library
Bruna Moreira [Mon, 17 Jan 2011 19:37:49 +0000 (15:37 -0400)]
Move common code from Discover all Characteristics to GATT library

The attribute client (attrib/client.c) and gatttool share similar code
to parse the PDU coming from server. This commit moves this common code
to attrib/gatt.c, and simplifies the callbacks implemented by the
clients. The client callbacks are now called just once and get a GSList
of characteristics, instead of the raw PDU.

13 years agoRename gatt_primary_t to more generic name
Bruna Moreira [Mon, 17 Jan 2011 19:37:48 +0000 (15:37 -0400)]
Rename gatt_primary_t to more generic name

The gatt_primary_t typedef was renamed to gatt_cb_t because it will be
used for primary and characteristic callbacks.

13 years agogdbus: Remove root node 'name' attribute in introspection
Daniel Wagner [Fri, 14 Jan 2011 15:14:21 +0000 (16:14 +0100)]
gdbus: Remove root node 'name' attribute in introspection

generate_introspection_xml generates the root <node> tags with a
'name' attribute. This seems to be a valid attribute but it is not
consistent with the way the D-Bus daemon generates empty nodes.

For example if we register "/foo/bar", D-Bus daemon will generate for
"/foo" a introspection which looks like this:

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <node name="bar"/>
</node>

and generate_introspection_xml generates for "/foo/bar":

<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node name="/foo/bar">
</node>

Just don't add the 'name' attribute to the root node.  The GLib
binding for D-Bus does it the same way.

13 years agogdbus: invaldate_parent_data: walk the whole path down
Daniel Wagner [Fri, 14 Jan 2011 15:14:20 +0000 (16:14 +0100)]
gdbus: invaldate_parent_data: walk the whole path down

Assume there is only one object registerd at "/". If we add a new
object at "/foo/bar" the introspection of "/" has to be updated. A new
node has to be added at "/".

invalidate_parent_data stops invaldating the whole path because the
boolean return value of dbus_connection_get_object_path_data is used
wrong.

If we get a TRUE just go on down in the path, if FALSE is return
dbus_connection_get_object_path_data has run out of memory.

13 years agoFix use of deprecated glib on tests
Luiz Augusto von Dentz [Wed, 19 Jan 2011 11:57:05 +0000 (13:57 +0200)]
Fix use of deprecated glib on tests

13 years agoFix use of deprecated glib on core
Luiz Augusto von Dentz [Wed, 19 Jan 2011 11:56:32 +0000 (13:56 +0200)]
Fix use of deprecated glib on core

13 years agoFix use of deprecated glib on hciops plugin
Luiz Augusto von Dentz [Wed, 19 Jan 2011 11:55:08 +0000 (13:55 +0200)]
Fix use of deprecated glib on hciops plugin

13 years agoFix use of deprecated glib on serial plugin
Luiz Augusto von Dentz [Wed, 19 Jan 2011 11:55:29 +0000 (13:55 +0200)]
Fix use of deprecated glib on serial plugin

13 years agoFix use of deprecated glib on network plugin
Luiz Augusto von Dentz [Wed, 19 Jan 2011 11:54:17 +0000 (13:54 +0200)]
Fix use of deprecated glib on network plugin

13 years agoFix use of deprecated glib on input plugin
Luiz Augusto von Dentz [Wed, 19 Jan 2011 11:53:20 +0000 (13:53 +0200)]
Fix use of deprecated glib on input plugin

13 years agoFix use of deprecated glib on audio plugin
Luiz Augusto von Dentz [Wed, 19 Jan 2011 08:04:49 +0000 (10:04 +0200)]
Fix use of deprecated glib on audio plugin

13 years agoUse -DG_DISABLE_DEPRECATED compiler define
Marcel Holtmann [Tue, 18 Jan 2011 13:56:31 +0000 (14:56 +0100)]
Use -DG_DISABLE_DEPRECATED compiler define

13 years agoUpdate Class of Device handling to the latest management interface
Johan Hedberg [Fri, 14 Jan 2011 21:14:13 +0000 (23:14 +0200)]
Update Class of Device handling to the latest management interface

This patch updates the class of device handling code to match the latest
management interface. A notable feature is that UUID to service class
mapping policy remains in user space with the help of the svc_hint
parameter of the add_uuid command. This is to make it easy to update the
mapping table when new profiles come along.

13 years agoRevert "Send an Invalid PDU Size Error Response for Service Search Req"
Johan Hedberg [Mon, 17 Jan 2011 09:01:04 +0000 (09:01 +0000)]
Revert "Send an Invalid PDU Size Error Response for Service Search Req"

This reverts commit 3094ec7008735c80d35bd255ffc41e7bea2d3a3c.

Commit 3094ec7008735c80d35bd255ffc41e7bea2d3a3c was supposed to fix
TP/SERVER/SS/BI-01-C but it turns out it doesn't even affect the outcome
of that test case (the code path is never traversed). Additionally the
commit breaks TP/SERVER/SS/BI-02-C so it should be reverted.

13 years agoFix memory leak when calling endpoint to select capabilities
Luiz Augusto von Dentz [Tue, 11 Jan 2011 14:42:27 +0000 (16:42 +0200)]
Fix memory leak when calling endpoint to select capabilities

When passing allocated memory to avdtp_service_cap_new it needs to be
freed since avdtp_service_cap_new copies the memory.

13 years agoFix possible memory leak on each a2dp stream setup
Luiz Augusto von Dentz [Tue, 11 Jan 2011 14:42:26 +0000 (16:42 +0200)]
Fix possible memory leak on each a2dp stream setup

Setup capabilities were not freed when capabilities were automatically
generated and not just taken as it used to be with old unix socket
clients.

13 years agoFix possible memory leak when handling avdtp transport connection
Luiz Augusto von Dentz [Tue, 11 Jan 2011 11:54:18 +0000 (13:54 +0200)]
Fix possible memory leak when handling avdtp transport connection

When acting as initiator stream io already has a reference to io channel
to be able to cancel if necessary.

13 years agoFix memory leak when calling endpoint method
Luiz Augusto von Dentz [Tue, 11 Jan 2011 12:21:51 +0000 (14:21 +0200)]
Fix memory leak when calling endpoint method

The pending call must be unrefed in those cases

13 years agoRelease 4.85
Marcel Holtmann [Tue, 11 Jan 2011 07:34:03 +0000 (23:34 -0800)]
Release 4.85

13 years agoFix event mask setting for a specific 1.2 adapter
Johan Hedberg [Mon, 10 Jan 2011 22:40:27 +0000 (00:40 +0200)]
Fix event mask setting for a specific 1.2 adapter

One 1.2 Broadcom adapter doesn't respond to the event mask HCI command
at all unless the second byte of the mask is 0xff. Strictly speaking
this is an invalid value because bits 0x02 and 0x04 are reserved.
However, no other adapters seem to mind and using 0xff instead of 0xf9
makes this particular adapter work properly.

13 years agoFix event mask setting for 1.1 controllers
Johan Hedberg [Mon, 10 Jan 2011 22:16:33 +0000 (00:16 +0200)]
Fix event mask setting for 1.1 controllers

Controllers based on the core spec 1.1 support the event mask HCI
command but need a very stripped down default value for the mask. This
patch makes sure the command gets issued for 1.1 controllers with the
appropriate value.

13 years agotelephony-ofono: add support for Three Way Calling feature
Luiz Augusto von Dentz [Mon, 10 Jan 2011 13:05:45 +0000 (15:05 +0200)]
telephony-ofono: add support for Three Way Calling feature

The Three Way Calling additionally support AT+CHLD values 0,3 and 4.

13 years agotelephony-ofono: add support for Enhanced Call Control feature
Luiz Augusto von Dentz [Mon, 10 Jan 2011 13:05:44 +0000 (15:05 +0200)]
telephony-ofono: add support for Enhanced Call Control feature

The Enhanced Call Control feature is simply an extension of the current
AT+CHLD command:

 - Release Specified Call: AT+CHLD=1<idex>
 - Private Consultation Mode: AT+CHLD=1<idex>

The new arguments for this command include an index of a specific call as
indicated in the +CLCC response.

13 years agotelephony-ofono: add proper support for AT+CHLD and AT+CKPD
Luiz Augusto von Dentz [Mon, 10 Jan 2011 13:05:43 +0000 (15:05 +0200)]
telephony-ofono: add proper support for AT+CHLD and AT+CKPD

13 years agotelephony-ofono: add support for inband ringtone feature
Luiz Augusto von Dentz [Mon, 10 Jan 2011 13:05:42 +0000 (15:05 +0200)]
telephony-ofono: add support for inband ringtone feature

13 years agoMove interactive code of Discover Primary to gatt.c
Claudio Takahasi [Sat, 8 Jan 2011 02:27:59 +0000 (23:27 -0300)]
Move interactive code of Discover Primary to gatt.c

Initial patch to move the shared code related to Discover All Primary
Services and Discover Primary Services by UUID to gatt.c.

13 years agoRemove unused variable from browse_req structure
Claudio Takahasi [Fri, 7 Jan 2011 23:00:03 +0000 (20:00 -0300)]
Remove unused variable from browse_req structure

13 years agoRemove unnecessary type cast
Johan Hedberg [Fri, 7 Jan 2011 22:02:57 +0000 (00:02 +0200)]
Remove unnecessary type cast

13 years agoMove GATT service to attribute server core
Anderson Lizardo [Fri, 7 Jan 2011 20:12:13 +0000 (16:12 -0400)]
Move GATT service to attribute server core

GATT service (like GAP one) should be moved to the core attribute server
because there can be only one instance of it.

There was a "Attribute Opcodes Supported" characteristic inside the GATT
service in attrib/example.c which is not defined by the Core
specification and was removed before moving the code.

13 years agoMove GAP service registration to src/attrib-server.c
Anderson Lizardo [Fri, 7 Jan 2011 20:12:12 +0000 (16:12 -0400)]
Move GAP service registration to src/attrib-server.c

GAP service shall be registered only once, so it makes sense to move it
to the core attribute server code.

The GAP "Device Name" characteristic was always "Example Device" on the
example server. This has been changed to use the Name attribute from
main.conf.

13 years agoRefactor example server to use att_put_u16()
Anderson Lizardo [Fri, 7 Jan 2011 20:12:11 +0000 (16:12 -0400)]
Refactor example server to use att_put_u16()

The original code was written before att_put_u16() was implemented.

13 years agoFix gatt_read_char() to support long Attrib Values
Brian Gix [Fri, 7 Jan 2011 00:39:43 +0000 (16:39 -0800)]
Fix gatt_read_char() to support long Attrib Values

Fix gatt_read_char() to support long Attribute Values by recognizing
that results longer that 21 octets may include data beyond
what has been returned with the first read. Extra data is
obtained by issuing READ_BLOB requests until either a
result is returned shorter than 22 octets, or an error
is recieved indicating that no further data is available.
The API for this function has not changed.

13 years agoFix g_attrib_send() to include a new ID parameter
Brian Gix [Fri, 7 Jan 2011 00:39:42 +0000 (16:39 -0800)]
Fix g_attrib_send() to include a new ID parameter

Overall purpose of change is to enable a GATT procedure to be
executed atomically, even if it requires multiple ATT
request/response transactions.

Fix g_attrib_send() to include an ID parameter, if the pkt to
be sent should be added to the Head of the pkt queue.  If the
ID is Zero, legacy functionality is maintained, and the pkt will
be added at the tail of the queuer, and a new ID will be generated,
and returned to the caller. If ID is non-zero, the pkt will be
added to the head of the queue, with the ID value requested, which
will also be returned to the caller.

Fix received_data() to not service the send queue until after the
received data has been processed by calling the cmd->func()
callback, to allow the callback to insert another pkt on the head
of the queue.

Fix all callers of g_attrib_send() to include new parameter.

13 years agotelephony-ofono: fix not updating indicators when a call is removed
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:47 +0000 (17:59 +0200)]
telephony-ofono: fix not updating indicators when a call is removed

In some extreme cases such as modem removal ofono may not have a chance
to set the call to disconnected state so indicators would not be update
properly.

13 years agotelephony-ofono: add handling for Modem.Interfaces property
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:46 +0000 (17:59 +0200)]
telephony-ofono: add handling for Modem.Interfaces property

This should make sure a modem is only used if a network is available

13 years agotelephony-ofono: handle ofono appearing/disappearing from bus
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:45 +0000 (17:59 +0200)]
telephony-ofono: handle ofono appearing/disappearing from bus

13 years agotelephony-ofono: simplify watches handling logic
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:44 +0000 (17:59 +0200)]
telephony-ofono: simplify watches handling logic

13 years agotelephony-ofono: fix not canceling pending calls on exit
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:43 +0000 (17:59 +0200)]
telephony-ofono: fix not canceling pending calls on exit

13 years agotelephony-ofono: make use of GetCalls method
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:42 +0000 (17:59 +0200)]
telephony-ofono: make use of GetCalls method

13 years agotelephony-ofono: make use of GetModems method
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:41 +0000 (17:59 +0200)]
telephony-ofono: make use of GetModems method

Ofono API has changed, modem list is no longer a property

13 years agotelephony-ofono: fix not setting originating when status property changes
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:40 +0000 (17:59 +0200)]
telephony-ofono: fix not setting originating when status property changes

13 years agotelephony-ofono: fix not being able to answer alerting/waiting calls
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:39 +0000 (17:59 +0200)]
telephony-ofono: fix not being able to answer alerting/waiting calls

13 years agotelephony-ofono: notify alerting calls when headset connects
Luiz Augusto von Dentz [Wed, 5 Jan 2011 15:59:38 +0000 (17:59 +0200)]
telephony-ofono: notify alerting calls when headset connects

13 years agoTODO: Start Discover All Primary Services after SDP if necessary
Claudio Takahasi [Mon, 3 Jan 2011 21:45:54 +0000 (18:45 -0300)]
TODO: Start Discover All Primary Services after SDP if necessary

13 years agoTODO: Refactoring of gatt.c functions
Claudio Takahasi [Mon, 3 Jan 2011 21:45:53 +0000 (18:45 -0300)]
TODO: Refactoring of gatt.c functions

13 years agoTODO: Rename glib-helper file to a more convenient name
Claudio Takahasi [Mon, 3 Jan 2011 21:45:52 +0000 (18:45 -0300)]
TODO: Rename glib-helper file to a more convenient name

13 years agoTODO: Remove characteristic discovery for non connectable devices
Claudio Takahasi [Mon, 3 Jan 2011 21:45:51 +0000 (18:45 -0300)]
TODO: Remove characteristic discovery for non connectable devices

CreateDevice and CreatePairedDevice methods already check the event
type and AD Flags before to connect to discover all primary services.
Characteristic discovery will not be available since D-Bus method
is not exposed to Broadcaster devices.

13 years agoTODO: Setup advertising parameters and data
Claudio Takahasi [Mon, 3 Jan 2011 21:45:50 +0000 (18:45 -0300)]
TODO: Setup advertising parameters and data

13 years agoChange security level on demand when reading characteristic descriptor
Claudio Takahasi [Thu, 30 Dec 2010 21:22:10 +0000 (18:22 -0300)]
Change security level on demand when reading characteristic descriptor

13 years agoChange security level on demand when reading characteristic value
Claudio Takahasi [Thu, 30 Dec 2010 21:22:09 +0000 (18:22 -0300)]
Change security level on demand when reading characteristic value

If a characteristic requires a higher security level, change it on
demand and re-send the GATT Charateristic Value Read. Request will not
be sent until the SMP negotiation finishes. This change doesn't affect
GATT over BR/EDR, since encryption is mandatory for BR/EDR.

13 years agomgmt: Fix opcode endianess in commands
Johan Hedberg [Mon, 3 Jan 2011 20:57:44 +0000 (22:57 +0200)]
mgmt: Fix opcode endianess in commands

13 years agomgmt: Add preliminary UUID handling
Johan Hedberg [Mon, 3 Jan 2011 20:17:32 +0000 (22:17 +0200)]
mgmt: Add preliminary UUID handling

This patch adds support for the add_uuid and remove_uuid management
commands. The kernel uses them to track the list of UUIDs and
automatically set the service class bits as well as the EIR value
accordingly.

13 years agogdbus: Update copyright information
Marcel Holtmann [Sun, 2 Jan 2011 01:31:09 +0000 (17:31 -0800)]
gdbus: Update copyright information

13 years agomgmt: Implement set_pairable
Johan Hedberg [Thu, 30 Dec 2010 13:03:57 +0000 (15:03 +0200)]
mgmt: Implement set_pairable

This patch implements support for the set_pairable managment command.
Due to the async nature of it a new btd_adapter_pairable_changed
function is added to the core daemon.

13 years agoRefactor handling of UUIDs with respect to adapter_ops
Johan Hedberg [Thu, 30 Dec 2010 10:20:43 +0000 (12:20 +0200)]
Refactor handling of UUIDs with respect to adapter_ops

The management interface will have simple add_uuid and remove_uuid
methods so it makes sense to have the adapter_ops interface reflect
that. This patch removes the services_updated callback and replaces it
with add_uuid and remove_uuid callbacks.

13 years agoRename mgmt_update_mode to mgmt_update_powered for clarity
Johan Hedberg [Wed, 29 Dec 2010 22:13:25 +0000 (00:13 +0200)]
Rename mgmt_update_mode to mgmt_update_powered for clarity

13 years agomgmt: Use a common structure for powered, discoverable and connectable
Johan Hedberg [Wed, 29 Dec 2010 22:10:26 +0000 (00:10 +0200)]
mgmt: Use a common structure for powered, discoverable and connectable

The events, commands and responses to these modes are represented by
identical management messages. By having a unified struct for all of
them quite a lot of code can simplified and reused.

13 years agomgmt: Clean up scan mode evaluation code
Johan Hedberg [Wed, 29 Dec 2010 21:43:06 +0000 (23:43 +0200)]
mgmt: Clean up scan mode evaluation code

13 years agoUpdate mgmt-api.txt to match latest implementation
Johan Hedberg [Wed, 29 Dec 2010 21:35:54 +0000 (23:35 +0200)]
Update mgmt-api.txt to match latest implementation

13 years agomgmt: Implement set_connectable
Johan Hedberg [Wed, 29 Dec 2010 21:30:35 +0000 (23:30 +0200)]
mgmt: Implement set_connectable

13 years agomgmt: Implement set_discoverable
Johan Hedberg [Wed, 29 Dec 2010 12:38:57 +0000 (14:38 +0200)]
mgmt: Implement set_discoverable

13 years agomgmt: Implement set_powered
Johan Hedberg [Wed, 29 Dec 2010 10:43:02 +0000 (12:43 +0200)]
mgmt: Implement set_powered

13 years agoKeep found LE device list to use when creating a device
Claudio Takahasi [Wed, 29 Dec 2010 21:25:22 +0000 (18:25 -0300)]
Keep found LE device list to use when creating a device

Found devices list should be used to identify device types when
CreateDevice or CreatePairedDevice are called. During the device
creation the selected device will be classified as LE device if it
belongs to the device found list and if the Flags AD type matches the
GAP requirements. BR/EDR devices don't need to be tracked since the
default remote device type is Basic Rate.

13 years agoAdd LE read supported states for hciconfig
Claudio Takahasi [Wed, 29 Dec 2010 21:17:24 +0000 (18:17 -0300)]
Add LE read supported states for hciconfig

Displays the states and state combinations that the link layer
supports. Usage: hciconfig hcix lestates

13 years agoSimplify btd_event_conn_complete logic
Johan Hedberg [Wed, 29 Dec 2010 13:43:09 +0000 (15:43 +0200)]
Simplify btd_event_conn_complete logic

13 years agoDon't force device creation for pairing failure events
Johan Hedberg [Wed, 29 Dec 2010 13:40:08 +0000 (15:40 +0200)]
Don't force device creation for pairing failure events

A pairing failure could be caused by switching Bluetooth off or a
disconnect forced by cancelling the pairing attempt so it doesn't make
sense to re-create a device object in these cases.

13 years agoRemove unneeded set_connectable adapter_ops callback
Johan Hedberg [Wed, 29 Dec 2010 11:33:29 +0000 (13:33 +0200)]
Remove unneeded set_connectable adapter_ops callback

13 years agoRelease 4.84
Marcel Holtmann [Tue, 28 Dec 2010 18:56:56 +0000 (10:56 -0800)]
Release 4.84

13 years agoFix leak of EIR data if RSSI does not change
Anderson Lizardo [Tue, 28 Dec 2010 18:10:20 +0000 (14:10 -0400)]
Fix leak of EIR data if RSSI does not change

If RSSI value does not change, memory used by parsed EIR data would leak
because it would not be assigned to the remote_dev_info structure.

13 years agoFix crash due to misplaced parameter in emit_device_found() call
Anderson Lizardo [Tue, 28 Dec 2010 16:52:30 +0000 (12:52 -0400)]
Fix crash due to misplaced parameter in emit_device_found() call

To avoid related mistakes, dev->uuid_count was shortened to uuid_count
and kept on the same line.

13 years agoRename btd_adapter_get_state to btd_adapter_get_mode
Johan Hedberg [Tue, 28 Dec 2010 09:35:35 +0000 (11:35 +0200)]
Rename btd_adapter_get_state to btd_adapter_get_mode

There's already an adapter_get_state function so to avoid confusion it's
better to have a different name.

13 years agoRemove unused variable
Johan Hedberg [Tue, 28 Dec 2010 09:16:38 +0000 (11:16 +0200)]
Remove unused variable

13 years agoFix adapter state when InitiallyPowered=false and RememberPowered=false
Johan Hedberg [Tue, 28 Dec 2010 09:00:39 +0000 (11:00 +0200)]
Fix adapter state when InitiallyPowered=false and RememberPowered=false

This patch reintroduces the adapter->initialized flag since it's
actually needed to make sure we only apply the InitiallyPowered setting
for the very first time when initializing an adapter.

13 years agoRemove outdated comments
Anderson Lizardo [Mon, 27 Dec 2010 13:21:07 +0000 (09:21 -0400)]
Remove outdated comments

13 years agoRemove ancient NAME_SENT name resolution status
Anderson Lizardo [Mon, 27 Dec 2010 13:21:05 +0000 (09:21 -0400)]
Remove ancient NAME_SENT name resolution status

The NAME_SENT status was introduced on commit
d6a16516a9f6deae8342f00e8186b02d0019a1e1, when there was a
"RemoteNameUpdate" D-Bus signal. Nowadays, there is no such signal, and
the device name (if any) is always sent on "DeviceFound" signal.

13 years agoFix printing D-Bus errors when headset record could not be found
Luiz Augusto von Dentz [Mon, 27 Dec 2010 12:27:21 +0000 (14:27 +0200)]
Fix printing D-Bus errors when headset record could not be found

When connection is started via headset_config_stream there is no D-Bus
message to reply to.

13 years agoAdd debug print for tracking adapter_mode_changed calls
Johan Hedberg [Mon, 27 Dec 2010 07:47:17 +0000 (09:47 +0200)]
Add debug print for tracking adapter_mode_changed calls

13 years agoFix closing of SDP server sockets
Johan Hedberg [Mon, 27 Dec 2010 06:48:53 +0000 (08:48 +0200)]
Fix closing of SDP server sockets

The existing code relied on set_close_on_unref which doesn't work as
long as the io watch callbacks hold on to their own reference. To fix
this it's better to track the watch id's instead of the IO channels and
do g_source_remove instead of g_io_channel_unref.

This isn't a particularly critical fd leak since these are created once
on bluetoothd startup and closed on exit, however they do help clean up
the valgrind fd-leak report.

13 years agoRelease 4.83
Marcel Holtmann [Sun, 26 Dec 2010 19:20:39 +0000 (11:20 -0800)]
Release 4.83

13 years agoAdd Broadcaster property in DeviceFound signal
Sheldon Demario [Thu, 23 Dec 2010 21:33:07 +0000 (16:33 -0500)]
Add Broadcaster property in DeviceFound signal

Broadcaster property is required to distinguish the device role. If the
remote is sending an advertising event, two possible roles are possible:
Peripheral or Broadcaster.

This change is required to pass on qualification tests which require
filtering Broadcasting devices during General Discovery Procedure.

13 years agoChange CreatePairedDevice to support LE devices
Sheldon Demario [Thu, 23 Dec 2010 21:29:50 +0000 (16:29 -0500)]
Change CreatePairedDevice to support LE devices

CreatePairedDevice implements now the same behaviour of CreateDevice,
triggering Discover All Primary Services when needed. SMP negotiation
starts when the link is established. LE capable kernel is required to
test this method properly.

Limitation: For dual mode devices, Discover All Primary Services is not
being executed after SDP search if GATT record is found.

13 years agoFix spurious DeviceDisappeared signals after name resolution
Anderson Lizardo [Thu, 23 Dec 2010 17:39:25 +0000 (13:39 -0400)]
Fix spurious DeviceDisappeared signals after name resolution

update_oor_devices() was being called twice, first after a inquiry, then
after name resolution. This caused the just found devices to be always
reported as "disappeared" after name resolution.

13 years agoChange power_on & power_off adapter_ops callbacks to set_powered
Johan Hedberg [Thu, 23 Dec 2010 12:38:52 +0000 (14:38 +0200)]
Change power_on & power_off adapter_ops callbacks to set_powered

The current idea is to have a single set_powered management command
which for the switching on case would leave the controller in a
non-connectable, non-pairable and non-discoverable state.

13 years agoAdd a "services" command to test-device
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:40 +0000 (19:26 -0200)]
Add a "services" command to test-device

This command adds a way to retrieve the Services property that each
device has.

13 years agoAdd GetProperties method the Service Interface
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:39 +0000 (19:26 -0200)]
Add GetProperties method the Service Interface

For now this interface just includes the path that each characteristic
is registered at.

13 years agoAdd support for adding services to the Services property
Vinicius Costa Gomes [Tue, 21 Dec 2010 21:26:38 +0000 (19:26 -0200)]
Add support for adding services to the Services property

We need to fill the devices property as each service path gets
registered in the DBus system bus.