| 4ee2b355 |
client: Use case insensitive matching for addresses completion
Allow giving Bluetooth addresses both in upper and lower case. When
address is completed it is capitalized. |
Szymon Janc |
8 years ago |
1 file, +2, -2 |
| 12b4397d |
client: Use case insensitive matching for addresses
Allow giving Bluetooth addresses both in upper and lower case. |
Johan Hedberg |
8 years ago |
1 file, +2, -2 |
| 16d6fe36 |
policy: Fix removing reconnect flag while still connecting
If a service connects it should stop new attempts but the current ones
should continue so reconnection should not be reset. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -1 |
| 9f73b235 |
build: Enable --enable-deprecated in bootstrap-configure
bootstrap-configure shall contain all possible options to be able to
catch any build problems. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -0 |
| 54d05d4c |
Release 5.44 |
Marcel Holtmann |
8 years ago |
2 files, +13, -1 |
| 514f79df |
hog: When no VID&PID also register a DIS notifier
DIS was reading VID & PID but they were not communicated to the HOG due to lack
of registered notifier.
Add a notified also in this case. |
Juha Kuikka |
8 years ago |
1 file, +1, -0 |
| cd1eb0cf |
hog: Move dis_notify around
No functional changes |
Juha Kuikka |
8 years ago |
1 file, +10, -10 |
| 41d605fe |
dis: Fix attribute handle when initializing from db
The handle field in struct bt_dis is initialized to the handle of the DIS gatt
service. It should be the value handle of the PNP ID characteristic.
This patch fixes the issue. |
Juha Kuikka |
8 years ago |
1 file, +20, -1 |
| 34b53b43 |
build: Update library version |
Marcel Holtmann |
8 years ago |
1 file, +1, -1 |
| 237e1e52 |
monitor: Add missing error code for LE Connection Response
This adds missing decoding for 0x000b result code. |
Szymon Janc |
8 years ago |
1 file, +3, -0 |
| 8673a556 |
monitor: Fix LE Connection Response error decoding
"Connection refused - Source CID already allocated" is 0x000a not 0x0010
> ACL Data RX: Handle 76 flags 0x02 dlen 18
LE L2CAP: LE Connection Response (0x15) ident 7 len 10
Destination CID: 0
MTU: 0
MPS: 0
Credits: 0
Result: Connection refused - Source CID already allocated (0x000a) |
Szymon Janc |
8 years ago |
1 file, +1, -1 |
| 09002b8c |
client: fix calling ad_unregister
ad_register shall only be called in case the advertise command has been
called so registered flag should be checked before calling
UnregisterAdvertisement. |
SeulKi Shin |
8 years ago |
1 file, +3, -0 |
| b181536f |
bootstrap-configure: Add --enable-tools
bootstrap-configure shall contain all possible options so it can catch
any build problem in the tree. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -0 |
| 8d8cc36f |
profiles/midi: Moved MIDI UUIDs to library header
This allows other users of libmidi to consistently use MIDI UUIDs. |
Felipe F. Tonello |
8 years ago |
2 files, +3, -3 |
| 2ce08882 |
profiles/midi: Add safer buffer setter function
This function helper makes buffer operations more consistent and adds
boundary check when its available. |
Felipe F. Tonello |
8 years ago |
1 file, +8, -1 |
| 028a3191 |
monitor: Add HCI commands and events for Bluetooth 5.0 |
Marcel Holtmann |
8 years ago |
1 file, +51, -0 |
| e2a7659c |
monitor: Add LMP PDUs for Bluetooth 5.0 |
Marcel Holtmann |
8 years ago |
1 file, +3, -0 |
| 4bbda014 |
monitor: Add link layer control PDUs for Bluetooth 5.0 |
Marcel Holtmann |
8 years ago |
1 file, +4, -0 |
| d71b2618 |
monitor: Add Bluetooth 5.0 features and version information |
Marcel Holtmann |
8 years ago |
1 file, +13, -0 |
| fd06b6b4 |
lib: Add version number for Bluetooth 5.0 |
Marcel Holtmann |
8 years ago |
1 file, +1, -0 |
| 848423c1 |
unit/test-midi: Make unit test compatible with GLIB v2.28
g_assert_memcmp would require to bump the glib version so instead just
use just use g_assert_cmpint and g_assert. |
Brian Gix |
8 years ago |
1 file, +6, -2 |
| 3652220b |
Add test-midi to ignore list |
Brian Gix |
8 years ago |
1 file, +1, -0 |
| 249d5d4c |
policy: Fix not reseting sink source
policy_connect_sink shall reset the sink_timer not source_timer. |
Luiz Augusto von Dentz |
8 years ago |
1 file, +1, -1 |
| 9fd2a587 |
audio/a2dp: Fix possible invalid reads
In case the D-Bus endpoint needs to respond or select a configuration for
SetConfiguration the setup given as user_data needs to be referenced as
the setup can be aborted before there is a reply leading to crash like
following the following:
Invalid read of size 8
at 0x41B45E: select_cb (a2dp.c:1779)
by 0x426881: select_cb (media.c:510)
by 0x427A0F: endpoint_reply (media.c:315)
by 0x53A7391: ??? (in /usr/lib64/libdbus-1.so.3.16.3)
by 0x53AACDE: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.16.3)
by 0x4C54EF: message_dispatch (mainloop.c:72)
by 0x50C88E6: ??? (in /usr/lib64/libglib-2.0.so.0.5000.2)
by 0x50CBE41: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.5000.2)
by 0x50CC1BF: ??? (in /usr/lib64/libglib-2.0.so.0.5000.2)
by 0x50CC4E1: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.5000.2)
by 0x40C85E: main (main.c:708)
Address 0x9704de8 is 56 bytes inside a block of size 88 free'd
at 0x4C2ED4A: free (vg_replace_malloc.c:530)
by 0x50D16BD: g_free (in /usr/lib64/libglib-2.0.so.0.5000.2)
by 0x418FAA: setup_free (a2dp.c:166)
by 0x418FAA: setup_unref (a2dp.c:178)
by 0x41E3DE: a2dp_cancel (a2dp.c:2176)
by 0x418244: sink_disconnect (sink.c:402)
by 0x41C5B7: a2dp_sink_disconnect (a2dp.c:2344) |
Luiz Augusto von Dentz |
8 years ago |
1 file, +13, -5 |
| d507e408 |
audio/avdtp: Fix not aborting SetConfiguration
If for some reason SetConfiguration is cancelled an Abort shall be
generated since it there could be a stream pending. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +1, -1 |
| 14ee4973 |
audio/avdtp: Fix calling abort confirmation
Abort confirmation shall only be called in case an abort has been sent
and the setup has to be unref asynchronously. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +4, -3 |
| df581a1d |
audio/avctp: Match opcode when parsing responses
The transaction may not be unique given the fact that notifications can
take all the outstanding transaction which may cause transactions to be
reused as explained in the errata:
https://www.bluetooth.org/errata/errata_view.cfm?errata_id=3812 |
Luiz Augusto von Dentz |
9 years ago |
1 file, +8, -0 |
| df43b3da |
build: Add testing config option
This adds --enable-testing that can be used to enable emulator and tester
which are no longer experimental but also are not meant for production. |
Luiz Augusto von Dentz |
9 years ago |
4 files, +18, -1 |
| 301904d6 |
build: Promote experiemental tools
This promotes many tools that were behind --enable-experimental which are
in fact used as stable tools for a while. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +93, -105 |
| b1eb2c4c |
build: Hide deprecated tools under --enable-deprecated
This marks the following tools as deprecated as they are not longer
maintained or have been replaced by other tools:
hciattach hciconfig hcitool hcidump rfcomm sdptool ciptool gatttool |
Luiz Augusto von Dentz |
9 years ago |
3 files, +59, -40 |
| 728fba54 |
main.conf: Fix adaper/adapter typo |
Nobuhiro Iwamatsu |
9 years ago |
1 file, +1, -1 |
| 71ca8b5a |
lib/sdp: Remove deprecated VIDEO_CONF profile id
Commit 75e0c32af6bf ("lib/sdp: Replace VIDEO_CONF_SVCLASS_ID with
AV_REMOTE_CONTROLLER_SVCLASS_ID") removed the deprecated
VIDEO_CONF_SVCLASS_ID definition, but left the corresponding profile
definition..
According to the specification linked below A/V_RemoteControlController
UUID can only be used as a service class so its profile definition
should be removed.
https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery |
Tomasz Gorochowik |
9 years ago |
1 file, +0, -1 |
| 28f669ec |
README: Add documentation for --enable-midi |
Luiz Augusto von Dentz |
9 years ago |
1 file, +12, -0 |
| 7a533244 |
doc/mgmt-api: Mark 4.9 kernel as released |
Johan Hedberg |
9 years ago |
1 file, +1, -1 |
| 6f4988bd |
btproxy: Add option to ignore initial zero byte
This helps deal with a broken host that might send an initial zero
byte before any valid data. |
Johan Hedberg |
9 years ago |
1 file, +17, -1 |
| 256fe338 |
build: Add --enable-midi to bootstrap-configure
bootstrap-configure shall have all the possible build options. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +1, -0 |
| 7c35bf90 |
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. |
Felipe F. Tonello |
9 years ago |
2 files, +638, -0 |
| 5b8353e9 |
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/ |
Felipe F. Tonello |
9 years ago |
6 files, +1093, -1 |
| a9c5bb9f |
monitor: Add UUIDs of BBC micro:bit services
This add the UUID of GATT attributes used in BBC micro:bit services as
specified bellow:
https://lancaster-university.github.io/microbit-docs/resources/bluetooth/bluetooth_profile.html |
Luiz Augusto von Dentz |
9 years ago |
1 file, +48, -0 |
| 62bddbe4 |
input/hog-lib: Attempt to read PNP values if not set |
Luiz Augusto von Dentz |
9 years ago |
1 file, +5, -0 |
| c9ec8ef4 |
dis: Add support to gatt-db
This add support of passing a gatt-db to avoid having to discover the
services again, this should also make it easier to port to bt_gatt_client
once Android code support it. |
Luiz Augusto von Dentz |
9 years ago |
3 files, +46, -4 |
| 605efc4a |
input/hog-lib: Add support to gatt-db
This add support of passing a gatt-db to avoid having to discover the
services again, this should also make it easier to port to bt_gatt_client
once Android code support it. |
Luiz Augusto von Dentz |
9 years ago |
5 files, +255, -67 |
| 42bf2a76 |
tools/btgatt-client: Update set-security usage |
Maxime Chevallier |
9 years ago |
1 file, +2, -2 |
| 651a5c1e |
tools/btgatt-client: Fix set-security interactive command
Fix the interactive "set-security" command in btgatt-client, that would
always fail due to bad initialization of argv buffer :
[GATT client]# set-security 2
Usage: set_security <level>
level: 1-3
e.g.:
set-sec-level 2 |
Maxime Chevallier |
9 years ago |
1 file, +1, -2 |
| 42585f29 |
tools/btgatt-client: Fix register-notify prompt
Added missing carriage return in register_notify_cb.
Changed a call to PRLOG to a simple printf to avoid
getting a extra prompt in cmd_register_notify. |
Maxime Chevallier |
9 years ago |
1 file, +2, -2 |
| c272989f |
Remove deprecated UHID_FEATURE API
I believe I have identified an issue with the HID-over-GATT (HoG) where,
through hidraw, the HIDIOCGFEATURE does not work correctly.
The symptom is that the ioctl call returns immediately with bogus data,
before the Read Request to the peripheral has been completed.
I believe the issue is caused by the hog-lib.c registering a handler for
both UHID_FEATURE and UHID_GET_REPORT events, which in the uhid header
file turn out to be the same enum.
This causes the get_report() to get called first, it issues the Read
Request and waits for it's completion. After this the get_feature() is
immediately called with the same uhid message, which sends the
UHID_FEATURE_ANSWER in to the kernel with stale data, which then gets
returned to the hidraw caller.
I have fixed this by removing the get_feature() as it is unnecessary
anyway. See attached patch.
I have tested with against both old and new uhid API (kernels 3.8 and
4.4). |
Juha Kuikka |
9 years ago |
1 file, +0, -33 |
| 96e45db6 |
Uncomment section headers in config file
If a config key under [Policy] section is uncommented right now, it's
assumed to be in [General] section because [Policy] line is commented
out and it won't work. |
Mansour Behabadi |
9 years ago |
1 file, +1, -1 |
| 32641ce1 |
monitor/rfcomm: Fix a potential memory access issue for compatibility with LLVM
This patch removes "packed" attribute from the definition of struct rfcomm_rpn
to prevent the access to an unaligned struct member in mmc_rpn(). This patch
also introduces a temp variable in mcc_pn() to prevent unaligned access without
touching the definition of struct rfcomm_pn, since struct rfcomm_pn is used as
a PDU.
error messages from LLVM build:
monitor/rfcomm.c:238:36: error: taking address of packed member 'pm' of class
or structure 'rfcomm_rpn' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
if (!l2cap_frame_get_le16(frame, &rpn.pm))
monitor/rfcomm.c:287:36: error: taking address of packed member 'mtu' of class
or structure 'rfcomm_pn' may result in an unaligned pointer value
[-Werror,-Waddress-of-packed-member]
if (!l2cap_frame_get_le16(frame, &pn.mtu))
Currently there is no corresponding flag in GCC to generate the same error
messages. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51628. |
Miao-chen Chou |
9 years ago |
1 file, +4, -1 |
| 3f7d7f6d |
doc/test-runner: Add Bluetooth config options
List the build options for Bluetooth necessary to run testers. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +21, -0 |
| d884d778 |
monitor/rfcomm: Fix left over packed struct |
Luiz Augusto von Dentz |
9 years ago |
1 file, +1, -1 |