Commit Graph

411 Commits

Author SHA1 Message Date
Santiago Carot-Nemesio
99156a2444 attrib-server: Add adapter in attrib_db_update function 2011-12-30 13:01:05 +02:00
Santiago Carot-Nemesio
7188fe255e gatt-service: Add adapter in gatt_service_add function 2011-12-30 13:00:34 +02:00
Santiago Carot-Nemesio
6a1e46afaf 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.
2011-12-30 13:00:00 +02:00
Santiago Carot-Nemesio
bbc34269b0 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.
2011-12-30 12:59:09 +02:00
Santiago Carot-Nemesio
caa6034e46 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.
2011-12-30 12:57:33 +02:00
Johan Hedberg
ddaf4b475f hciops: Fix integer type for Class of Device 2011-12-28 23:00:46 +02:00
Johan Hedberg
cac78035f1 Remove useless btd_event_bonding_complete function 2011-12-28 16:34:40 +02:00
Johan Hedberg
2a8c76faaf 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.
2011-12-28 16:15:31 +02:00
Johan Hedberg
9a1006eebc hciops: Fix passing correct bdaddr pointer to oob lookups 2011-12-28 11:13:13 +02:00
Johan Hedberg
632164a86b Clean up name resolving state handling 2011-12-23 14:20:11 +02:00
Johan Hedberg
b06899eace Fix device address type tracking 2011-12-23 13:00:55 +02:00
Johan Hedberg
26495f6734 Fix size_t format specifiers 2011-12-19 14:35:03 +02:00
Johan Hedberg
4d155a809b mgmtops: Check for exact mgmt_device_found event size 2011-12-19 13:53:07 +02:00
Johan Hedberg
42a03e1c6f mgmtops: Implement mgmt_confirm_name 2011-12-19 13:30:23 +02:00
Johan Hedberg
0c6f4b692c Add initial hooks to pass confirm_name info around 2011-12-19 13:25:54 +02:00
Hemant Gupta
e8c8ec2cac mgmt: Add support for Passkey handling
This patch adds support for handling Passkey Requests and response over
management interface.
2011-12-15 16:20:55 +02:00
Johan Hedberg
f60a1b5fee mgmt: Update implementation to match latest API spec 2011-12-14 14:21:46 +02:00
Johan Hedberg
89ae2d2c0f mgmt: Update read_info & related messages to match the API spec 2011-12-14 14:21:36 +02:00
Santiago Carot-Nemesio
f2fa8743c8 Update gatt-example to check if attributes were registered 2011-12-02 13:29:11 +02:00
Anderson Lizardo
f4d4dd6d41 Migrate example service to high level GATT API
This commit migrates the dummy "Battery Service" from example GATT
plugin to demonstrate how the new API is used.
2011-11-14 21:09:50 +02:00
Johan Hedberg
0573fc7cb1 mgmt: Add address type to mgmt_pair_device
This is important especially in the future when dual-mode devices can be
connected to over LE. It's also important if/when we decide to move the
advertisement cache into user-space.
2011-11-11 00:04:10 +02:00
Johan Hedberg
74b43ba833 mgmt: Add status parameter to disconnect response 2011-11-10 14:17:24 +02:00
Johan Hedberg
86c731b39b mgmtops: Update start_discovery parameters to latest spec 2011-11-10 10:51:03 +02:00
Johan Hedberg
4c63c025a5 mgmt: Update BR/EDR link key message naming to match new API 2011-11-07 20:09:03 +02:00
Johan Hedberg
7ee8ea022d mgmt: Add address type fields to messages that need them 2011-11-07 19:54:04 +02:00
Andre Guedes
d0ae998760 Add discovery cases to mgmt_cmd_complete() 2011-11-04 15:22:17 +02:00
Johan Hedberg
76bfabc7a3 mgmt: Update set_discoverable to match new API 2011-11-03 13:50:35 +02:00
Frédéric Danis
bb957be6a4 Add EIR length parameter to eir_parse()
LE uses shorter EIR (31 bytes) than HCI (240 bytes)
2011-10-21 13:35:01 +03:00
Johan Hedberg
9b98a6c764 Add glib-compat.h to deal with issues in old GLib versions 2011-10-18 10:57:06 +03:00
Johan Hedberg
549087a10b hciops: fix discov_state when powering off an adapter 2011-10-17 18:11:01 +03:00
Luiz Augusto von Dentz
b110c73356 hciops: fix adapter initialization when commands are missed
Sometimes after e.g, suspend we miss some initialization commands from
the kernel, even though we had a workaround for this it doesn't really
work as expected since the adapter must be up in order to resend.

To fix this problem the resend logic is moved after DEVUP.
2011-10-17 12:53:59 +03:00
Claudio Takahasi
0ddc54ca5f Set auto connect from maemo6 plugin
Inform the adapter that the system has been unlocked when the MCE
sends the tklock_mode_ind signal. This signal will trigger the
automatic re-connections for the devices selected by the profiles.
Profiles register ATTIO callbacks to indicate that ATT connection
is required.
2011-10-05 18:01:48 +03:00
Anderson Briglia
cd907d8c84 Add display lock watcher on maemo6 plugin
Implements display status signal watcher in maemo6 plugin.
2011-10-05 18:01:43 +03:00
Luiz Augusto von Dentz
42b90a434a Remove use of read_device_id in wiimote plugin
Make use of btd_device_get_vendor and btd_device_get_product intead.
2011-10-01 09:02:19 +03:00
Antti Julku
f8a44769ff Rename fast_connectable function in hciops
Rename fast_connectable function in hciops to set_fast_connectable
to make it consistent with rest of the file and with mgmt interface
counterpart.
2011-09-26 15:39:39 +03:00
Antti Julku
1dcd74358c Implement fast connectable mode for mgmt interface
Management interface implementation for fast connectable mode.
2011-09-26 15:39:36 +03:00
Vinicius Costa Gomes
6184bc5911 Attrib server integration for outgoing connections
We need support for attaching a client connection to the attribute
server because the server that we are connected may want to do
something similar to a reverse service discovery, and we need to be
able to receive indications and notifications.
2011-09-22 20:25:23 +09:00
Anderson Lizardo
c703241170 Fix characteristic property on GATT example plugin
Any GATT characteristics which have a Client Characteristic
Configuration must have "Notify" property set.
2011-09-22 20:01:40 +09:00
Syam Sidhardhan
472095161e Fix crash when update service record with an invalid XML
If we pass an invalid xml to sdp_xml_parse_record(), then it returns
NULL. Further we are passing the this NULL pointer to the
sdp_record_free(), which leads to invalid memory access.
2011-09-18 18:36:43 +09:00
Claudio Takahasi
11ddc90c92 Serialize powering up/down in maemo6 plugin
This patch fixes wrong adapter state when using Management interface.
When bluetoothd starts, the adapter should be switched to the state
informed by Maemo6 MCE. In the current implementation, Maemo6 plugin
sends set powered command when the adapter is still powering up, the
last command sent fails(kernel returns EALREADY).
2011-09-12 15:17:22 +03:00
Claudio Takahasi
7aeeea795a Fix loop when setting adapter name
When management interface is enabled, name changed event comes when the
adapter is initialized as consequence of the Read Local Name. Use the
same function to set and handle event causes looping when bluetoothd
starts if the name stored in the controller is different from the name
provided by the adapter name plugin.

Splitting the adapter_update_local_name also fix the PropertyChanged
(for Name) signal being sent before AdapterAdded.
2011-09-12 10:59:27 +03:00
Antti Julku
396607837a Add support for blacklisting events
Add support for mgmt interface events for device blocking/unblocking.
Kernel sends a mgmt event when a device has been blocked by another
management socket or with ioctl command (e.g. by hciconfig).

Parameter update_only is added to device_block/unblock functions in
device.c to avoid code copying. When update_only is true, blocking
command is not sent to kernel, but only device status is updated and
dbus signal is sent.
2011-09-01 16:02:10 +03:00
Pavel Raiskup
7af9f8687e formfactor: Add missing comma
Missing comma in static array chassis_map definition between
"Blade" and "Blade Enclosure" field.

Typing error fixed.
2011-08-29 13:45:41 +03:00
Pavel Raiskup
edb505b8c0 Off-by-one(two) error in form factor detection
Indexing of chassis_map array has to be done like that:
    chassis_map[chassis_type * 2 - 1]

because if not, everything is shifted by one. When (e.g.) chassis_type
is 0x04 result should be "Low Profile Desktop" =>  "desktop" (not a
"Pizza Box" => "server"). Lets see the 2.6.1 document on:

http://www.dmtf.org/standards/smbios
2011-08-29 13:44:33 +03:00
Claudio Takahasi
bf857b7a57 Read local extended features at the initialization
Local extended features bitmask may change when Write LE Host Supported
Command is sent by the kernel. This patch adds reading of the local
extended features in the initialization sending a HCI command, extend
the ioctl HCIGETDEVINFO is not suitable due possible inconsistency
between kernel and userspace.
2011-08-22 13:39:10 +03:00
Claudio Takahasi
d7e1f84d30 Remove EnableLE option from the user-space
Deprecated configure option after adding "enable_le" parameter in the
bluetooth module. Write LE Host Supported Command is now sent by the
kernel if "enable_le" is enabled and the controller supports LE.
2011-08-22 13:39:08 +03:00
Szymon Janc
5a0c179b9a Add external dummy plugin for testing 2011-08-14 14:08:29 -07:00
Łukasz Stelmach
0065cf3be9 Fix off-by-one error in form factor detection
The keywords we are looking for are at odd positions.
2011-07-29 13:12:28 +03:00
Luiz Augusto von Dentz
e2482a5ee3 Fix removing inotify watch whenever an adapter is removed
This sometimes cause bluetoothd to burn cpu when an adapter is removed
from the system.

Since the watch is not really bond to any adapter, in fact it is added on
plugin .init, its removal is now moved to plugin .exit.
2011-07-26 12:59:54 +03:00
David Herrmann
1106efd440 Add support for wiimote pairing
The Nintendo Wii Remote requires binary bluetooth addresses as PINs.
This is not possible via dbus agent API. So this adds a plugin that
registers a pin-callback and forces the right pin for every
authentication request of wiimotes.
2011-07-14 17:25:05 +03:00