Commit Graph

508 Commits

Author SHA1 Message Date
Jan Engelhardt
56a5098002 build: add missing BACKTRACE_CFLAGS
Some targets use BACKTRACE_LIBS, hence need BACKTRACE_CFLAGS.
2018-11-26 11:24:36 +02:00
Jan Engelhardt
b5c6746cbc build: add missing ALSA_CFLAGS
Some targets use ALSA_LIBS, hence need ALSA_CFLAGS.
2018-11-26 11:24:36 +02:00
Jan Engelhardt
eb81f12e4a build: add missing ELL_CFLAGS
Some targets link ELL_LIBS, which means they also need ELL_CFLAGS
in their (or the global) CPPFLAGS.
2018-11-26 11:24:35 +02:00
Jan Engelhardt
06dbb223fb build: -D/-I arguments go into CPPFLAGS
-D and -I are preprocessor directives, they are therefore to appear
in CPPFLAGS, not CFLAGS. (It is unfortunate that pkg-config does not
make the distinction / or it was misnamed, because only -D/-I make
sense to be emitted by pkg-config in the first place — anything else
(-f/-m) has the potential to mess up someone's compilation. So
pkg-config's Cflags is actually used to convery Cppflags.)
2018-11-26 11:24:35 +02:00
Jan Engelhardt
bfede2a086 build: change @foo@ to $(foo) in automake makefiles
When using automake, all AC_SUBSTed variables are made available as
make variables, so that they can also be set at make time. Therefore,
they need not use the @harcoded@ style.
2018-11-26 11:24:34 +02:00
Jan Engelhardt
3a74874c6d build: rename includedir to pkgincludedir
This change is similar to commit 5.50-130-g78bce4800 and does the
same, but for includedir.
2018-11-26 11:24:33 +02:00
Jan Engelhardt
78bce48009 build: rename libexecdir to pkglibexecdir
When files are to be placed not in libexecdir but a subdirectory of
it, automake has a variable name reserved for exactly that purpose
(and a default value, which Makefile.am will override), called
pkglibexecdir. Let's use it.
2018-11-21 13:22:33 +02:00
Luiz Augusto von Dentz
430f2b7790 shared/log: Add common code to interface with logging channel
This enables any code using shared to log information using the logging
channel which can then be decoded by the likes of btmon.
2018-11-20 15:31:22 +02:00
Inga Stotland
77d7625e8c Makefile for meshd 2018-08-20 13:05:14 -07:00
Marcel Holtmann
294ebd5486 build: Fix issues with building dist packages 2018-05-29 15:32:09 +02:00
Luiz Augusto von Dentz
5852a75d79 build: Fix requiring ell
Make sure libshared-ell is only build if ell is available.
2018-05-17 13:04:52 +03:00
Inga Stotland
499ad5dca0 shared/io-ell: Add support for ELL based IO handling 2018-05-16 10:23:57 +03:00
Luiz Augusto von Dentz
24f3162e35 build: Make bt_shell conditional to readline
bt_shell APIs shall only be build if readline is present on the system
since it currently depend on it.
2018-04-26 15:48:19 +03:00
Luiz Augusto von Dentz
e8ae7a4f2d build: Fix make distcheck 2018-03-22 11:16:26 +02:00
Luiz Augusto von Dentz
bff0c2ae9f build: Fix not disabling obexd when given --disable-obex
--disable-obex shall disable building obexd daemon.
2018-03-22 10:35:17 +02:00
Luiz Augusto von Dentz
a287cb4229 shared/mainloop: Add GLIB wrapper
This adds wrappers function to interface with GLIB mainloop so
applications can use mainloop functions no matter what is the underline
implementation.

Note: Most functions are not actually implemented on purpose since both
io and timeout functions already exists for GLIB covering the same
functionality.
2018-02-22 11:52:16 +02:00
Luiz Augusto von Dentz
7a03b61ee8 tools: Remove monitor/uuid.{c,h}
Use the shared/util.h helpers instead.
2017-12-21 10:08:22 -02:00
Luiz Augusto von Dentz
c3a336d898 gatt: Use monitor code to decode service name
This makes the daemon reuse the code for decoding service names that
the monitor uses.
2017-12-04 10:27:50 -02:00
Luiz Augusto von Dentz
bee3796113 build: Move shell.{c,h} to libshared
bt_shell instance should be available to any code linked with
libshared.
2017-11-20 11:34:15 +02:00
Yunhan Wang
725d47ba57 build: use abspath for lib/bluetooth
When building from out of tree, and the top build dir was specified as
an absolute path, the linked headers in ${builddir}/lib/bluetooth were
broken.  This patch fixes it by relying on make's abspath macro as
opposed to the path concatenation.
2017-09-25 16:14:07 +03:00
Marcel Holtmann
5dfcfc4d1f build: Update library version 2017-09-14 10:27:17 +02:00
Luiz Augusto von Dentz
161691ae36 build: Cleanup GATT profiles
Alert, cyclingspeed, heartrate and proximity can all be implemented
using the GATT D-Bus API so they no longer need dedicated APIs.
2017-09-06 17:22:08 +03:00
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