Commit Graph

57 Commits

Author SHA1 Message Date
Szymon Janc
b0ceb60518 build: Fix make distcheck
sixaxis.h was missing in release tarball.
2017-11-11 12:55:42 +01:00
Bastien Nocera
927711c0af profiles/battery: Add Bluetooth LE Battery service
The Battery Level characteristic was tested with a
Microsoft Arc Touch Mouse SE.

The Battery1 interface is now exported for Bluetooth LE devices which
support the Battery Level characteristic, providing a single
"Percentage" value to other integration points in the OS, such as UPower
for consumption on most free desktops.

See https://bugs.freedesktop.org/show_bug.cgi?id=92370
2017-11-03 13:00:57 +02:00
Szymon Janc
3a140aa35b sap: Remove support for STE U8500 platform
This code didn't received updates for few years. It is not installed
(build only) since BlueZ 5 release. And STE U8500 platform is long
dead.
2017-07-13 10:43:40 +02:00
Felipe F. Tonello
5b8353e90e profiles/midi: Added MIDI over BLE profile implementation
This plugin implements the Central role of MIDI over Bluetooth
Low-Energy (BLE-MIDI) 1.0 specification as published by MMA in
November/2015.

It was implmemented as a bluetoothd plugin because of latency requirements
of MIDI. There are still room for improvements on this regard.

Like previsouly mentioned, it only implements the Central role, but
since all parsing and state-machine code is in libmidi.[hc] it should be
simple to implement the Peripheral role as a GATT service as well.

Files added:
 * profiles/midi/midi.c: Actual GATT plugin
 * profiles/midi/libmidi.[ch]: MIDI parsers

Techinal notes
==============

This plugin doesn't require any new threads. It relies on notifications
from a device to parse and render proper events that are queued in the
kernel, causing no blocks at all. Even if an error occur, it will be
handled and returned control to bluetoothd.

It also adds a new file descriptor to be read using struct io. That is
necessary to read events from applications and render raw BLE packets to
be sent to the device with a write without response command. It doesn't
block as well.

This patch introduces ALSA as dependency. But this feature is disabled
by default. To enable it, pass --enable-midi to the configure script.

Even though this introduces ALSA dependency, it is not an audio plugin.
It is rather a MIDI plugin, which is a byte stream protocol with low
throughput but requires low-latency.

Observations
============

I have tested on a normal laptop Arch-linux (x86_64) and a Raspberry Pi 2
(ARM Cortex-A8) and it works very well. As I mentioned, the latency can
always be improved.

I will still maintain a personal branch on my github[1] so others can
contribute there and I can test before sending to BlueZ.

IMPORTAT: the timestamp support is incomplete since ALSA doesn't support the
way MIDI over BLE expects (asign timestamp to an event without scheduling).
We are working on ALSA to support this.

Credits
=======

I would like to send kudos to ROLI Ltd. which allowed my to work
on this as part of my full-time job.

[1] https://github.com/ftonello/bluez/
2017-01-04 12:05:14 +02:00
Luiz Augusto von Dentz
00af15150e build: Add option to enable health profiles
This adds--enable-health option dedicated to enabled health plugin
so it is no longer enabled with --enable-experimental since that
enables other plugins that might not be relevant for the system.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
523b6fb52f build: Add option to disable HoG profile
This adds --disable-hog option to configure which make HoG plugin
to not be build thus reducing the build time and binary size of
bluetoothd in systems where HID over GATT profile is not supported.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
435b3be70e build: Add option to disable HID profile
This adds --disable-hid option to configure which make input plugin
to not be build thus reducing the build time and binary size of
bluetoothd in systems where HID profile is not supported.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
a9643f63ee build: Add option to disable network profiles
This adds --disable-network option to configure which make network plugin
to not be build thus reducing the build time and binary size of
bluetoothd in systems where those profiles are not supported.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
b5bab5ea0e build: Add option to disable AVRCP profile
This adds --disable-avrcp option to configure which make AVRCP plugin
to not be build thus reducing the build time and binary size of
bluetoothd in systems where AVRCP is not supported.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
1e9ab1dab7 build: Add option to disable A2DP profile
This adds --disable-a2dp option to configure which make A2DP plugin
to not be build thus reducing the build time and binary size of
bluetoothd in systems where A2DP is not supported.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
1d76b2ee1f build: Add option to enable SAP profile
This adds --enable-sap option dedicated to enabled sap plugin
so it is no longer enabled with --enable-experimental leaving it to just
enable experimental tools.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
26e38bbcef build: Add option to enable NFC pairing
This adds --enable-nfc option dedicated to enabled neard plugin
so it is no longer enabled with --enable-experimental since that
enables other plugins that might not be relevant for the system.
2016-11-17 14:15:42 +02:00
Luiz Augusto von Dentz
cc80afff47 build: Remove gatt-example plugin
This examples can be done over D-Bus already so it makes no sense to have
it as a plugin and in fact it currently it doesn't even work since it was
never ported to the new code under src/shared.
2016-11-08 17:09:49 +02:00
Luiz Augusto von Dentz
afc66b8d68 build: Remove deprecated profiles
This removes deprecated GATT profiles that are no longer supported
and should instead be implemented over D-Bus.
2016-10-18 13:55:34 +03:00
Luiz Augusto von Dentz
25bce13507 build: Make old GATT plugins deprecated
This disables building plugins that are no longer supported by the core
since the transition to gatt-db. In the future these plugins will have to
be ported to use gatt-db or be removed if the profile can be implemented
using the GATT D-Bus APIs.
2016-04-01 14:57:37 +03:00
Luiz Augusto von Dentz
718bad60d8 input/hog: Make use of hog-lib
This changes the input plugin to use hog-lib so the same code is used in
both D-Bus daemon, Android and unit tests.
2015-11-13 14:00:29 +02:00
Marcel Holtmann
fb55b7a6ab profiles/hog: Use no suspend support instead of the dummy FIFO 2015-05-29 16:25:33 +02:00
Arman Uguray
9942dcdb55 profiles/gatt: Rename profile to gap
Since this built in profile only handles the GAP service, this patch
renames it to gap.
2014-12-19 18:49:25 -02:00
Ravi kumar Veeramally
9164e6d2c5 mcap: Rename mcap-lib to mcap 2014-10-02 16:09:50 +03:00
Ravi kumar Veeramally
c2a70e6b9d mcap: Unify libmcap usage for Android and non-Android versions
Now profiles/health/ , android/health and mcaptest will use
profiles/health/mcap-lib.
2014-10-02 14:24:28 +03:00
Marcel Holtmann
9b912ea925 build: Use internal libshared-glib and libshared-mainloop libraries 2014-09-25 13:01:43 +02:00
Luiz Augusto von Dentz
e93eeb6cff input/device: Rework uHID code to use bt_uhid 2014-05-23 16:40:29 +03:00
Petri Gynther
054bfbcf4a input: Add userspace HID support
Enable HID protocol handling in userspace when UserspaceHID=true in input.conf.

Benefits of userspace HID:
1. Persistent HID/input pipeline
   For a Bluetooth HID device, the corresponding kernel HID/input devices are
   created only once when the Bluetooth HID device is used the first time.
   The HID/input pipeline is not destroyed and recreated every time when
   the Bluetooth HID device disconnects and reconnects.

2. HID vs HoG parity
   Enables HID and HoG devices to operate the same way in BlueZ stack, using
   uHID kernel module (/dev/uhid) to pass HID report data between bluetoothd
   and kernel HID subsystem.

3. Debugging
   It is easier to debug HID protocol in userspace than in HIDP kernel module.
2014-05-08 23:08:31 +03:00
Ravi kumar Veeramally
5fe8d7556f profiles/network: Rename common.c|h to bnep.c|h
Files common.c|h contains only bnep related code, it makes
more sence with bnep.c|h.
2013-11-29 17:10:19 +02:00
Szymon Janc
f52aa87499 plugins: Add initial code for sixaxis plugin
This plugin will be used to associate PS3 controllers.
2013-11-27 11:29:26 +02:00
Luiz Augusto von Dentz
956e63360d audio: Remove audio plugin
Audio plugin is now splitted in multiple plugins so it is no longer
necessary to have a manager to deal with many different drivers.
2013-07-24 15:45:18 -07:00
Luiz Augusto von Dentz
abe0595df1 audio: Move A2DP code to its own plugin
This moves A2DP related code to a2dp plugin and making it possible to
disable by passing -P a2dp and increasing the modularity of the code.
2013-07-24 15:45:09 -07:00
Luiz Augusto von Dentz
089d112ffe audio: Move AVRCP related code to its own plugin
This moves AVRCP related code to avrcp plugin and making it possible to
disable by passing -P avrcp and increasing the modularity of the code.
2013-07-24 15:44:52 -07:00
Luiz Augusto von Dentz
fe4cbedb1e plugins/policy: Reword audio policy code in a simple plugin
This moves audio device policy to a plugin and removes any dependency of
audio plugin to it.
2013-07-12 15:05:49 +03:00
Alex Deymo
4cf14a98e5 autopair: Add the autopair plugin
The autopair plugin tries standard pincodes for different devices with
dumb pincodes. It also generates a random 6 digit pincode for keyboards
that support any pincode but fallbacks to the agent call in case the
random generated pincode didn't work.
2013-05-10 10:21:39 +03:00
Mikel Astiz
10620c1c0f profile: Use btd_service for connect/disconnect
Change the btd_profile connect/disconnect callbacks to receive a
btd_service pointer. This should make it possible to handle multiple
instances of the same profile in a specific device.

The patch strongly influences how the profiles should interact with the
core. The state transitions, previously reported using the device.h API
(device_profile_connected() and device_profile_disconnected()), have
now been replaced by the btd_service API.

The transitions will then be propagated to device.c by means of the
conventional state-changed callback mechanism.
2013-04-26 14:48:32 +03:00
Vinicius Costa Gomes
eac1dfd0e6 gas: Move all the code to only one file
Our Generic Attribute/Access Service plugin is small and simple enough
to be kept in only one file.
2013-01-29 15:57:41 -06:00
Marcel Holtmann
f1f6a1ae88 plugins: Remove no longer needed formfactor plugin 2012-12-29 15:57:21 -08:00
Marcel Holtmann
d4cbe27507 plugins: Remove no longer needed adaptername plugin 2012-12-29 15:32:55 -08:00
Marcel Holtmann
7279e8508e plugins: Add support for systemd's hostname daemon 2012-12-29 14:46:19 -08:00
Marcel Holtmann
4a6389350f build: Mark Health plugin as experimental for now
The API of the Health plugin and the code itself needs another review
phase in the light for BlueZ 5.x. For now mark this plugin as experimental.
2012-12-21 09:48:17 +01:00
Marcel Holtmann
2935c04e3d build: Remove support for external OOB plugin 2012-12-20 00:23:53 +01:00
Andre Guedes
6402746a4e hog: Rename hog_device.c file to hog.c
Since hog_manager.c and hog_device.h were merged into hog_device.c,
now the whole HoG logic is in this file. So, calling this file hog.c
instead of hog_device.c is more suitable.
2012-12-19 23:57:20 +02:00
Andre Guedes
0a5b1ec8d3 hog: Merge hog_device.h code into hog_device.c
This patch merges hog_device.h code into hog_device.c and removes
hog_device.h file. As long as hog_manager.c was merged into hog_
device.c, there is no need to have a header for hog_device.

This patch also adds the static modifier to functions which are
now used only in hog_device.c.
2012-12-18 17:20:44 +02:00
Andre Guedes
647f42d9f3 hog: Merge hog_manager.c code into hog_device.c
This patch merges hog_manager.c code into hog_device.c and removes
hog_manager.c file. hog_manager.c is a very small file, so there is
no need to keep it separated.
2012-12-18 17:18:50 +02:00
Marcel Holtmann
af506e3a3e build: Limit GATT example plugin to maintainer mode 2012-12-15 14:19:07 +01:00
Johan Hedberg
8bec4a6916 heartrate: Remove useless files 2012-12-14 13:34:33 +02:00
Johan Hedberg
831ae09e35 thermometer: Remove useless files 2012-12-14 13:28:18 +02:00
Johan Hedberg
539a5603e0 scanparam: Remove useless files 2012-12-14 13:15:06 +02:00
Johan Hedberg
12cd2f8eee deviceinfo: Remove useless files 2012-12-14 13:08:18 +02:00
Johan Hedberg
e1cbe31eaa alert: Remove useless files 2012-12-14 13:02:22 +02:00
Johan Hedberg
5be0c6f3b0 time: Remove useless files 2012-12-14 12:57:52 +02:00
Johan Hedberg
c4c9436697 plugins: Remove service plugin (replaced by Profile interface) 2012-12-12 14:01:14 +02:00
Marcel Holtmann
1fc2e51d41 build: Reorder LE plugins and put some into experimental stage 2012-12-11 16:40:11 +01:00
Johan Hedberg
dc288fc658 network: Fix profile connection state notifications 2012-12-11 13:25:26 +02:00