OSDN Git Service
Vinicius Costa Gomes [Wed, 18 Jan 2012 23:13:30 +0000 (20:13 -0300)]
Use the helper function to convert a string to a binary buffer
When loading Link Keys from storage we are able to re-use the function
that was introduced earlier for the LTK case.
Vinicius Costa Gomes [Wed, 18 Jan 2012 23:13:29 +0000 (20:13 -0300)]
Add support for creating devices from the stored LTK's
Claudio Takahasi [Thu, 19 Jan 2012 18:38:22 +0000 (15:38 -0300)]
proximity-api: Add Link Loss Alert for Proximity Reporter API
PropertyChanged signal for LinkLossAlertLevel property is emitted when a
given remote device writes a new value for the Alert Level
characteristic in the local Link Loss service. Each platform is free to
define the actions for the detected signal.
Claudio Takahasi [Thu, 19 Jan 2012 18:36:59 +0000 (15:36 -0300)]
proximity-api: Add Proximity Reporter API
Adds API for Immediate Alert Service(IAS) abstraction. IAS is used
by Proximity Monitors and Find Me Locators to notify the user that
reporter/target has been found. This new interface combines Proximity
Reporter and Find Me Target in the same API providing the flexibility
to implement external applications to control alerts(including per
device alerts).
This abstraction allows the development of platform specific
applications to control Immediate Alert coming from Proximity Monitor
and Find Me Locator. This provides flexibility to define different level
and tone for each device. Use case: watch finding a mobile phone.
Szymon Janc [Fri, 20 Jan 2012 15:26:27 +0000 (16:26 +0100)]
Remove dead code from device_create_bonding
bonding_request_new always return valid pointer so there is not need
to check for NULL as this will never happen.
Szymon Janc [Fri, 20 Jan 2012 15:26:26 +0000 (16:26 +0100)]
Remove dead code from bonding_request_new
agent_create always return valid pointer so there is not need to check
for NULL as this will never happen.
Szymon Janc [Thu, 19 Jan 2012 09:52:30 +0000 (10:52 +0100)]
mgmt-api: Add information about endianness
Management interface use little-endian byte order and this should be
clearly stated in documentation.
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:47 +0000 (20:28 -0300)]
Add support for sending the Load Long Term Keys commands
Also this adds another method to the adapter_ops method table,
this method allows LTKs to be loaded to the kernel.
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:46 +0000 (20:28 -0300)]
Add support for handling the New LTK mgmt event
This event would cause this key to be permanently stored.
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:45 +0000 (20:28 -0300)]
Add support for storing a LTK when it enters bluetoothd
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:44 +0000 (20:28 -0300)]
Fix using "magic" values for the key types
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:43 +0000 (20:28 -0300)]
Add macros for the possible link key types
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:42 +0000 (20:28 -0300)]
Add storage functions to handle SMP keys
For now, only the Long Term Key (LTK) is stored.
Vinicius Costa Gomes [Wed, 18 Jan 2012 17:12:31 +0000 (14:12 -0300)]
Add messages to the mgmt interface to handle SMP key storage
The SMP keys are to be communicated to/from userspace using these
messages.
Johan Hedberg [Wed, 18 Jan 2012 12:21:46 +0000 (14:21 +0200)]
btmgmt: Fix format string specifier
Hemant Gupta [Mon, 16 Jan 2012 08:06:42 +0000 (13:36 +0530)]
Add KeyboardDisplay IO Capability
This patch adds suppport for KeyboardDisplay IO capability in BlueZ.
It is ensured that the new capability is set only if management
interface is being used. For hciops Keyboarddisplay capability is
mapped to DisplayYesNo.
Vinicius Costa Gomes [Tue, 17 Jan 2012 23:28:40 +0000 (20:28 -0300)]
mgmt-api: Update the commands for exchanging LTK's
For restoring the device from storage we need to have the Address type
of the device, the LTK is a good place for this.
In some cases, we may be notified of keys that were generated in the
Host, that key key would be used when the Host is the slave role in
a later connection, we should be able to differentiate this type of
key because it doesn't mean that we have a bonding with the Remote
Device.
Johan Hedberg [Wed, 18 Jan 2012 11:27:44 +0000 (13:27 +0200)]
mgmt: Update mgmt_ev_device_found to match latest API
Johan Hedberg [Wed, 18 Jan 2012 11:27:16 +0000 (13:27 +0200)]
storage: Add variable-length EIR support to write_remote_eir
Johan Hedberg [Tue, 17 Jan 2012 23:27:20 +0000 (01:27 +0200)]
hciops: Encode class of device data into EIR
Johan Hedberg [Tue, 17 Jan 2012 23:18:16 +0000 (01:18 +0200)]
eir: Add eir_length() function
Johan Hedberg [Tue, 17 Jan 2012 20:06:27 +0000 (22:06 +0200)]
eir: Add eir_append_data function
Johan Hedberg [Tue, 17 Jan 2012 20:04:02 +0000 (22:04 +0200)]
eir: Rename eir_has_complete_name to eir_has_data_type
Johan Hedberg [Tue, 17 Jan 2012 20:02:03 +0000 (22:02 +0200)]
eir: Move EIR data type defines to eir.h
Anderson Lizardo [Tue, 17 Jan 2012 16:18:02 +0000 (12:18 -0400)]
Fix not showing name if first EIR has no name info
Some devices may not advertise their name right on the first EIR data
sent (e.g. LE devices where name is set on either advertises or scan
responses, but not both). Given that the "found devices" cache does not
refresh the name on each EIR received, the UI may never show the name
during a discovery session.
This fix improves the Discovery UI by showing names immediately as they
are received. This works by emitting DeviceFound signals when the name
is received, even if RSSI stays the same.
Further discovery sessions will use the stored complete name, as usual.
Johan Hedberg [Tue, 17 Jan 2012 19:39:55 +0000 (21:39 +0200)]
mgmt: Remove ev_remote name and update event codes
Johan Hedberg [Tue, 17 Jan 2012 19:39:10 +0000 (21:39 +0200)]
mgmtops: Add eir_len to device_connected debug message
Johan Hedberg [Tue, 17 Jan 2012 19:37:55 +0000 (21:37 +0200)]
btmgmt: Fix connected event length check
Johan Hedberg [Tue, 17 Jan 2012 19:37:23 +0000 (21:37 +0200)]
btmgmt: Update event table
Johan Hedberg [Tue, 17 Jan 2012 15:18:41 +0000 (17:18 +0200)]
mgmt: Update ev_device_connected implementation to match API
Johan Hedberg [Tue, 17 Jan 2012 15:17:30 +0000 (17:17 +0200)]
eir: Simplify parsing with clear helper variables
Johan Hedberg [Tue, 17 Jan 2012 15:09:15 +0000 (17:09 +0200)]
eir: Add Class Of Device parsing
Marcel Holtmann [Tue, 17 Jan 2012 10:47:59 +0000 (11:47 +0100)]
btio: Remove support for hciX source addresses
Johan Hedberg [Mon, 16 Jan 2012 09:48:28 +0000 (11:48 +0200)]
mgmt-api: Use 2 octets instead of 1 for EIR data length
This allows for future extensibility.
Johan Hedberg [Sun, 15 Jan 2012 21:36:18 +0000 (23:36 +0200)]
mgmt-api: Use EIR encoding wherever possible
We can encode the remotee name and class to the EIR data format both in
device_found and device_connected events.
Johan Hedberg [Fri, 13 Jan 2012 11:59:49 +0000 (13:59 +0200)]
mgmt-api: Update to latest plans
- Remove the remote_name event and add the name to the device_connected
event (since we always refresh the name at that point anyway).
- Add Class of Device to device_connected since that's the only point
where we get it when a previously unknown device connects to us for the
first time.
- Add a Flags field to device_found to accommodate for legacy pairing
information (which we get from the remote host features HCI event) and
merge the only other existing boolean parameter (confirm_name) into this
Flags field.
Marcel Holtmann [Fri, 13 Jan 2012 03:03:08 +0000 (04:03 +0100)]
Release 4.98
Johan Hedberg [Fri, 13 Jan 2012 00:03:48 +0000 (02:03 +0200)]
eir: Fix modifying field_len when parsing
The field_len variable shouldn't be touched for the over-all parsing
state to remain consistent and so a helper variable (name_len) is needed
after all.
Johan Hedberg [Thu, 12 Jan 2012 23:19:29 +0000 (01:19 +0200)]
eir: Fix minor whitespace issue
Johan Hedberg [Thu, 12 Jan 2012 23:16:08 +0000 (01:16 +0200)]
eir: Remove unnecessary name_len variable
Johan Hedberg [Thu, 12 Jan 2012 23:08:18 +0000 (01:08 +0200)]
eir: Pass explicit length to g_utf8_validate
This way we avoid g_utf8_validate having to do it's own strlen work.
Anderson Lizardo [Thu, 12 Jan 2012 20:56:53 +0000 (16:56 -0400)]
proximity: Fix Alert Level characteristic
According to PXP IAS specification (Table 3.2), the Alert Level
characteristic property has only "Write without response" as mandatory
and the rest is excluded.
Anderson Lizardo [Thu, 12 Jan 2012 18:59:41 +0000 (14:59 -0400)]
Add missing "Legacy" property for LE devices
Some UIs may assume that a device lacking the Legacy property is
pre 2.1. To be more consistent with BR/EDR devices, always set Legacy
property explicitly to False. This makes these UIs not ask for a PIN
code when doing Just Works pairing for LE devices.
Bruna Moreira [Thu, 12 Jan 2012 18:33:37 +0000 (14:33 -0400)]
Fix EIR name parsing
Some vendors put a NUL byte terminator on EIR name field. If that is the
case, use -1 as string length so g_utf8_validade() can parse it
properly.
Syam Sidhardhan [Thu, 12 Jan 2012 15:15:01 +0000 (20:45 +0530)]
headset: Fix unknown command error response
If HF has already requested for the Extended Error result code
reporting, then send the same in certain failure cases. Earlier in this
case we were sending normal error.
Szymon Janc [Thu, 5 Jan 2012 09:23:39 +0000 (10:23 +0100)]
l2test: Add option 'K' to set delay before receiving
Szymon Janc [Thu, 5 Jan 2012 09:23:38 +0000 (10:23 +0100)]
l2test: Add option 'H' to set socket receive buffer size
Size is set using SO_RCVBUF, see man 7 socket for more details.
Anderson Lizardo [Fri, 30 Dec 2011 19:26:11 +0000 (15:26 -0400)]
Add missing options to bootstrap-configure
With these options, all BlueZ C files are compiled with
"./bootstrap-configure". The only exception is --enable-hal, which
conflicts with the "formfactor" plugin.
Anderson Lizardo [Fri, 30 Dec 2011 19:26:09 +0000 (15:26 -0400)]
Remove unused/broken "echo" RFCOMM plugin
It was disabled for quite some time (since 2009), and does not even
compile anymore if enabled:
plugins/echo.c: In function 'session_event':
plugins/echo.c:53: error: implicit declaration of function
'g_io_channel_read'
plugins/echo.c:57: error: implicit declaration of function
'g_io_channel_write'
Anderson Lizardo [Fri, 30 Dec 2011 19:26:08 +0000 (15:26 -0400)]
Remove PulseAudio plugin leftover
The .c file and the configure check were not being used anywhere.
Santiago Carot-Nemesio [Fri, 30 Dec 2011 11:45:09 +0000 (12:45 +0100)]
gatt-example: Fix memory leak
Remove the example-plugin data element from the list whenever an adapter
is removed.
Santiago Carot-Nemesio [Fri, 30 Dec 2011 11:45:08 +0000 (12:45 +0100)]
gatt-service: Add missing user_data parameter for callbacks
Santiago Carot-Nemesio [Fri, 30 Dec 2011 11:45:07 +0000 (12:45 +0100)]
gatt-service: Delete attributes when service registration fails
Whenever a regitration operation fails, the attributes stored in the
data base of handles remain. This patches removes all attributes
registered by a service when the operation is not succesful. In this
way, either all service attributes are registered or none of them are
stored in the data base.
Santiago Carot-Nemesio [Fri, 30 Dec 2011 11:45:06 +0000 (12:45 +0100)]
attrib-server: Move GAP attributes inside gatt_server struct
Scott James Remnant [Fri, 6 Jan 2012 01:07:11 +0000 (17:07 -0800)]
build: increase check requirement to 0.9.6
ck_assert, used by unit/test-eir.c wasn't added to check until 0.9.6
Andrei Emeltchenko [Thu, 15 Dec 2011 09:48:03 +0000 (11:48 +0200)]
lib: Fix structures for AMP Assoc Read
Make struct names similar to kernel and remove static array since
fragment length can be other size than HCI_MAX_NAME_LENGTH, which
is for totally different purpose.
Johan Hedberg [Mon, 2 Jan 2012 11:34:03 +0000 (13:34 +0200)]
manager: Fix removing adapter from list upon initialization failure
Johan Hedberg [Mon, 2 Jan 2012 11:22:52 +0000 (13:22 +0200)]
mgmtops: Log confirm_name field in mgmt_device_found
Johan Hedberg [Fri, 30 Dec 2011 13:30:58 +0000 (15:30 +0200)]
hciops: Add check for EIR complete name
Johan Hedberg [Fri, 30 Dec 2011 13:30:26 +0000 (15:30 +0200)]
eir: Add function to check for complete name
Johan Hedberg [Fri, 30 Dec 2011 13:26:06 +0000 (15:26 +0200)]
hciops: Fix missing eir in btd_event_device_found call
Anderson Lizardo [Thu, 29 Dec 2011 18:41:08 +0000 (14:41 -0400)]
hciemu: Fix strict-aliasing rules handling
gcc 4.4.3 (from Ubuntu 10.04) started complaining about this code:
test/hciemu.c: In function ‘hci_host_control’:
test/hciemu.c:431: error: dereferencing pointer ‘({anonymous})’ does break
strict-aliasing rules
test/hciemu.c:431: note: initialized from here
The fix is based on commit
97046eaf3fc44b4451157b1a1bbc166ab0f4dda8.
David Herrmann [Thu, 29 Dec 2011 16:59:44 +0000 (17:59 +0100)]
wiimote: Fix device_get_address to use new API
Commit
b06899eace1f484b387aae0e568fb1da988b468c introduced a new API for
device_get_address but apparently missed fixing the call in
plugins/wiimote.c. This patch converts the plugin to use the new API.
David Herrmann [Thu, 29 Dec 2011 17:22:28 +0000 (18:22 +0100)]
Add wiimote plugin to bootstrap-configure
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:50 +0000 (11:24 +0100)]
attrib-server: Add GAttrib in attrib_channel_detach function
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:49 +0000 (11:24 +0100)]
attrib-server: Add adapter in attrib_create_sdp function
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:48 +0000 (11:24 +0100)]
attrib-server: Add adapter in attrib_db_del function
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:47 +0000 (11:24 +0100)]
attrib-server: Add adapter in attrib_gap_set function
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:46 +0000 (11:24 +0100)]
attrib-server: Add adapter in attrib_db_update function
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:45 +0000 (11:24 +0100)]
gatt-service: Add adapter in gatt_service_add function
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:44 +0000 (11:24 +0100)]
attrib-server: Add adapter in attrib_db_add
Because of there can be many adapters plugged, the GATT servers must
provide the adapter in which the attributes will be registered.
Santiago Carot-Nemesio [Wed, 28 Dec 2011 10:24:43 +0000 (11:24 +0100)]
attrib-server: Add adapter to attrib_db_find_avail function
Adapters manage their own list of handlers so we need to specify the
adapter where the handlers will be registered.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:19 +0000 (15:33 +0100)]
gatt-example: Use adapter driver to register GATT attributes
GATT servers should register their attributes on each adapter when it is
plugged instead of doing that when the plugins is loaded. This patch
registers a new adapter driver to manage plug and unplug events in order
to register attributes in each GATT served managed in each adapter.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:18 +0000 (15:33 +0100)]
attrib-server: Mark attrib_channel_detach as deprecated
All public attrib-server functions are marked as deprecated until they
expose adapter facilities to operate with. This is a transactional patch
toward multiple adapter support is implemented. All those functions use
default adapter in order to keep backward compatibility.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:17 +0000 (15:33 +0100)]
attrib-server: Remove global database list
Each server use its own databa list to manage handlers so all operations
should managed separately by each GATT server instead of using a global
handler list.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:16 +0000 (15:33 +0100)]
attrib-server: Remove global le_io variable
Get ride of the global low energy channel in order to use the low
energy channel managed in each server.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:15 +0000 (15:33 +0100)]
attrib-server: Attach attrib_channel in adapter clients list
This patch attaches attribute channels to the gatt server list instead
of using the global client list. Furthermore, we use the GATT server
started in the default adapter when attrib_channel_detach is invoked in
order to keep backward compatibility until the interface is updated to
accept the adapter too.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:14 +0000 (15:33 +0100)]
attrib-server: Add attributes in adapter database
Each server has its own database so the global database list will be
removed. This patch makes a wrapper over attrib_db_add function to get
the default GATT server in order to add attributes in the default
adapter, int his way we keep backward compatibility with the gatt server
interface until the API is updated.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:13 +0000 (15:33 +0100)]
attrib-server: Register GATT SDP record per each adapter
Each server has its own SDP registry wich will be managed separately.
Furthermore, this patch makes a wrapper over attrib_create_sdp function
using the default GATT server started in thye default adapter in order
to keep backward compatibility with the gatt server interface until the
api is finally updated.
Santiago Carot-Nemesio [Tue, 27 Dec 2011 14:33:12 +0000 (15:33 +0100)]
attrib-server: Initial steps towards multi-adapter GATT server support
We need neither to init nor stop gatt server whenever the demon
starts and finishes the execution, instead of doing that, we init
or stop the GATT server when the adapter is initialized or removed.
Johan Hedberg [Wed, 28 Dec 2011 21:00:46 +0000 (23:00 +0200)]
hciops: Fix integer type for Class of Device
Yegor Yefremov [Wed, 28 Dec 2011 09:53:37 +0000 (10:53 +0100)]
add tools to include folder list
adding tools to include folder list avoids out-of-source build
breakage
Yegor Yefremov [Wed, 28 Dec 2011 09:53:36 +0000 (10:53 +0100)]
fix link creation for out-of-source builds
Johan Hedberg [Wed, 28 Dec 2011 14:34:40 +0000 (16:34 +0200)]
Remove useless btd_event_bonding_complete function
Johan Hedberg [Sat, 24 Dec 2011 02:27:39 +0000 (04:27 +0200)]
Move name resolving control into hciops
Due to the way legacy name resolving is handled for the mgmt interface
the entire logic that was previously part of the core daemon needs to be
moved into hciops. Essentially hciops now contains what the mgmt code
in the kernel will do when mgmtops is used.
Johan Hedberg [Wed, 28 Dec 2011 09:12:34 +0000 (11:12 +0200)]
hciops: Fix passing correct bdaddr pointer to oob lookups
Marcel Holtmann [Wed, 28 Dec 2011 04:09:56 +0000 (20:09 -0800)]
build: Move libcheck under TEST conditional
DoHyun Pyun [Mon, 26 Dec 2011 01:00:25 +0000 (10:00 +0900)]
adapter-api: Fix incorrect spelling
This patch fixes incorrect spelling.
Radoslaw Jablonski [Fri, 23 Dec 2011 11:18:00 +0000 (12:18 +0100)]
audio: Use headset_shutdown in headset_setconf_cb
If pending connection will stay after state has been changed to
HEADSET_STATE_DISCONNECTED, then crash may happen (e.g. when hs_connect
will be called quickly again after that) To avoid that kind of problems
using headset_shutdown, which does necessary cleanup first (finalizes
pending connections) and after that changes state to
HEADSET_STATE_DISCONNECTED.
Claudio Takahasi [Wed, 21 Dec 2011 21:41:50 +0000 (18:41 -0300)]
attrib-client: Fix consecutive set value when disconnected
SetProperty for "Value" property needs to be queued when disconnected.
Registering ATTIO connection callback does not mean that the link is
established, GAttrib instance is assigned in the connection callback.
Claudio Takahasi [Wed, 21 Dec 2011 21:41:49 +0000 (18:41 -0300)]
attrib-client: Fix GAttrib reference counting
Although ATT connection callbacks control GAttrib reference, each
entity using GAttrib should be increment the GAttrib reference to
keep the code standard.
Claudio Takahasi [Wed, 21 Dec 2011 21:06:17 +0000 (18:06 -0300)]
attrib-client: Remove unused SDP header includes
Johan Hedberg [Fri, 23 Dec 2011 12:14:18 +0000 (14:14 +0200)]
Clean up name resolving state handling
Johan Hedberg [Fri, 23 Dec 2011 11:00:55 +0000 (13:00 +0200)]
Fix device address type tracking
Marcel Holtmann [Fri, 23 Dec 2011 01:39:07 +0000 (17:39 -0800)]
Release 4.97
Marcel Holtmann [Fri, 23 Dec 2011 01:16:25 +0000 (17:16 -0800)]
Update library version
Johan Hedberg [Mon, 19 Dec 2011 12:35:03 +0000 (14:35 +0200)]
Fix size_t format specifiers
Johan Hedberg [Mon, 19 Dec 2011 12:15:53 +0000 (14:15 +0200)]
btmgmt: Add basic confirm_name support
Johan Hedberg [Mon, 19 Dec 2011 12:14:57 +0000 (14:14 +0200)]
mgmt: Update confirm_name definitions to match API specification
Johan Hedberg [Mon, 19 Dec 2011 12:14:30 +0000 (14:14 +0200)]
mgmt-api: Update Confirm Name return parameters