Commit Graph

486 Commits

Author SHA1 Message Date
Marcel Holtmann
0da5161154 build: Include health, mesh and midi into distcheck testing 2017-08-21 13:40:51 +02:00
Marcel Holtmann
34b53b43eb build: Update library version 2017-02-24 19:14:45 +01:00
Felipe F. Tonello
7c35bf902b unit/test-midi: Added libmidi use-case tests
I tried to test all basic and most common use-case scenarios here and
some more weird as well. It tests cases where the parser needs to handle
problematic MIDI messages as well as ALSA Sequencer events.

It is really simple to add new tests, so others are welcome to do so.
2017-01-04 12:05:14 +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
82666b345e core: Remove attio callbacks 2016-09-27 11:01:10 +03:00
Marcel Holtmann
da89677b22 build: Update library version 2016-09-26 12:11:00 +02:00
Marcel Holtmann
8caffd414e build: Update library version 2016-07-17 22:56:55 +02:00
Marcel Holtmann
87985db21c build: Update library version 2016-05-26 18:50:03 +02:00
Johan Hedberg
a779ec83c9 doc: Add BTSnoop/Monitor protocol documentation 2016-05-24 10:36:25 +03:00
Johan Hedberg
e0ecf26de2 shared: Add TTY speed helper 2016-04-27 21:02:22 +03:00
Marcel Holtmann
fde1929ffb build: Update library version 2016-03-18 00:57:32 +01:00
Marcel Holtmann
60b400ad38 build: Update library version 2015-12-27 23:08:44 +01:00
Luiz Augusto von Dentz
714daa5589 hog: Move code from android to profiles
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
2015-11-13 14:00:29 +02:00
Luiz Augusto von Dentz
fadcbdcc39 dis: Move code from android to profiles
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
2015-11-13 14:00:29 +02:00
Luiz Augusto von Dentz
d0a77e68d7 scpp: Move code from android to profiles
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
2015-11-13 14:00:29 +02:00
Luiz Augusto von Dentz
b6cb2d3ec3 bas: Move code from android to profiles
This is a place holder until the code is ported to use shared API so it
can be shared by android and D-Bus daemon.
2015-11-13 14:00:28 +02:00
Marcel Holtmann
16669134e1 core: Add support for basic stack backtrace helper 2015-11-08 14:44:24 +01:00
Marcel Holtmann
7e239803c9 build: Update library version 2015-10-30 04:19:05 +01:00
Marcel Holtmann
7b0f3bb314 build: Update library version 2015-09-28 13:22:50 +02:00
Marcel Holtmann
7dd976a6ac build: Update library version 2015-09-04 02:56:25 +02:00
Marcel Holtmann
4eeb9f495a build: Move valgrind.supp into tools directory 2015-09-04 02:27:26 +02:00
Luiz Augusto von Dentz
a21b661c7a build: Add support for running make check with valgrind
This check if valgrind tool is available adding it to be run with make
check.
2015-08-26 13:42:34 +03:00
Gowtham Anandha Babu
a44c89dfb8 doc/pts: Add OPP PTS 6.2 results for Linux
This patch adds test case list and results for OPP profile
tested against Linux-kernel-4.1 (Ubuntu 14.04).
2015-08-10 13:37:52 +03:00
Marcel Holtmann
a67403b35f build: Update library version 2015-07-30 19:03:04 +02:00
Marcel Holtmann
8e15496255 build: Update library version 2015-07-07 19:17:47 +02:00
Marcel Holtmann
60f68ab8d5 build: Update library version 2015-06-15 11:21:43 +02:00
Gowtham Anandha Babu
f5fcdf45a6 unit/test-uuid: Use tester framework 2015-05-22 13:52:48 +03:00
Gowtham Anandha Babu
068dcecd44 unit/test-lib: Use tester framework 2015-05-22 13:52:47 +03:00
Gowtham Anandha Babu
bce027cedb unit/test-textfile: Use tester framework 2015-05-22 13:52:47 +03:00
Luiz Augusto von Dentz
65f10c8537 build: Check if dbus-run-session for unit tests
This checks if dbus-run-session is available and then add it to
AM_TESTS_ENVIRONMENT so tests using D-Bus run in its own session.
2015-05-18 21:35:40 +03:00
Marcel Holtmann
a08f1baa24 build: Always build Android support for releases 2015-05-17 01:08:37 +02:00
Luiz Augusto von Dentz
6a920ea803 unit/test-gdbus-client: Use tester framework 2015-04-12 19:06:46 +03:00
Luiz Augusto von Dentz
410b780ac2 unit/test-eir: Use tester framework 2015-04-12 19:06:46 +03:00
Luiz Augusto von Dentz
1e664a793c unit/test-crc: Use tester framework 2015-04-12 19:06:45 +03:00
Michael Janssen
729e9c0355 shared: add bt_ad structure
The bt_ad structure provides an abstraction for easy translation of defined
Advertisement Data fields into the resulting raw bytes needed by the Bluetooth
HCI LE Set Advertising Data command.
2015-04-07 17:45:10 +03:00
Marcel Holtmann
b29bcb6e1b doc: Add minimal sample kernel config for test-runner tool 2015-04-04 13:33:13 -07:00
Stefan Seyfried
0aa12f8377 build: enable glibc's malloc checks for the test suite
Setting MALLOC_CHECK_=3 causes additional checks in glibc for malloc()
usage errors, abort()ing the test if those trigger. MALLOC_PERTURB_=69
causes free()'d memory to be poisoned with 0x45, leading to crashes in
case of use-after-free.
Together, both are useful for spotting more errors during "make check"
2015-04-02 11:04:35 +03:00
Marcel Holtmann
e30f102315 build: Update library version 2015-03-31 13:58:22 -07:00
Michael Janssen
59c8313ddb core: advertising: add LEAdvertisingManager stubs
Introducing src/advertising which will implement the
org.bluez.LEAdvertisingManager1 D-Bus interface defined in
doc/advertising-api.txt.  Each LE-capable controller gets
an instance of the interface.
2015-03-27 17:01:11 +02:00
Luiz Augusto von Dentz
fdf0ec006e build: Add advertising-api.txt to EXTRA_DIST
This ensure it is included in the release tarball.
2015-03-25 12:34:48 +02:00
Luiz Augusto von Dentz
853bd60568 build: Add missing docs to EXTRA_DIST
This adds doc/gatt-api.txt and doc/input-api.txt to EXTRA_DIST so they
get included in make dist tarball.
2015-03-18 11:07:31 +02:00
Mariusz Skamra
605fbd5396 unit/test-hog: Add TC/HGRF/RH/BV-01-I test
Verify that all Report Map characteristics can be read by
Report Host IUT
2015-03-17 12:52:16 +01:00
Marcel Holtmann
d72b3760b3 build: Update library version 2015-03-11 16:18:26 +01:00
Arman Uguray
aeb3feefd4 core/gatt: Add GattManager1 stubs
This patch introduces src/gatt-manager, which will implement the
org.bluez.GattManager1 API outlined in doc/gatt-api.txt. The old
src/gatt-dbus code has been removed to start from a clean slate.
2015-03-02 15:19:20 +02:00
Marcel Holtmann
4a5c9e636c build: Remove include option for gdbus directory 2015-03-01 00:35:28 -08:00
Arman Uguray
d330725947 core: Introduce btd_gatt_database
This patch introduces src/gatt-database.* which handles incoming ATT
connections, manages per-adapter shared/gatt-db instances, and routes
connections to the corresponding device object. This is the layer that
will perform all the CCC management and Service Changed handling.
2015-02-17 13:46:17 +02:00
Johan Hedberg
649215b62f shared: Move mainloop implementation from monitor to shared 2015-02-12 12:32:07 +02:00
Marcel Holtmann
41304925a6 build: Update library version 2015-02-02 09:14:12 +01:00
Marcel Holtmann
f8dae865be build: Update library version 2014-12-26 19:42:09 +01:00
Arman Uguray
2780741f23 core/gatt: Introduce gatt-client
This patch introduces src/gatt-client, which will implement the D-Bus
API outlined in doc/gatt-api.txt for the GATT client role.
2014-12-23 12:59:27 -02:00