| 87985db2 |
build: Update library version |
Marcel Holtmann |
9 years ago |
1 file, +1, -1 |
| a407d371 |
lib: Update company identifiers |
Marcel Holtmann |
9 years ago |
1 file, +36, -0 |
| ed9a92d6 |
audio/avrcp: Fix not handling Addressed Player Changed error
Some notification are completed in case the addressed player changes:
'On completion of the Addressed Player Changed notification the TG
shall complete all player specific notifications with AV/C C-Type
REJECTED with error code Addressed Player Changed.'
Because reject only has the error code not the event it is necessary to
lookup by transaction to find out which event was completed thus the
transaction needs to be added to the avctp_rsp_cb callback. |
Luiz Augusto von Dentz |
9 years ago |
3 files, +53, -28 |
| 5523fecc |
monitor: Split public key into multiple lines
Printing the entire public key value on a single line requires some
160 characters which ends up wrapping on most terminals. Instead,
print the X and Y components separately, which is also consistent with
how SMP is decoded. |
Johan Hedberg |
9 years ago |
1 file, +3, -1 |
| 40511fa3 |
doc: btsnoop: Document the various BTSnoop opcodes |
Johan Hedberg |
9 years ago |
1 file, +115, -0 |
| 4e0fc87a |
doc: btsnoop: Clarify drop counts. |
Johan Hedberg |
9 years ago |
1 file, +4, -0 |
| 14f93a68 |
profile: Fix accepting connections without an associated service
This fixes the flawed logic from the following commit:
commit b669604f43bbbf04ebaa66dd14ad9cfb005e561b
Author: Hsin-Yu Chao <hychao@chromium.org>
Date: Fri Apr 24 10:36:09 2015 -0700
src/profile: Set service to connecting in ext_connect |
Johan Hedberg |
9 years ago |
1 file, +5, -4 |
| a779ec83 |
doc: Add BTSnoop/Monitor protocol documentation |
Johan Hedberg |
9 years ago |
2 files, +61, -0 |
| 952efea7 |
shared/gatt-client: Fix sending confirmation
Confirmation shall be sent from topmost parent only.
Extra confirmation sent by clone confuses remote side.
> ACL Data RX: Handle 69 flags 0x02 dlen 27
ATT: Handle Value Indication (0x1d) len 22
Handle: 0x001f
Data: 68656c6c6f2027302e302e302e303a3532353332
< ACL Data TX: Handle 69 flags 0x00 dlen 5
ATT: Handle Value Confirmation (0x1e) len 0
< ACL Data TX: Handle 69 flags 0x00 dlen 5
ATT: Handle Value Confirmation (0x1e) len 0 |
Mikhail I. Krivtsov |
9 years ago |
1 file, +1, -1 |
| 28ac54bd |
tools/gatt-service: Update to use new GATT API
This update use of ReadValue and WriteValue to include the options
introduced in the API. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +126, -33 |
| 505f2a42 |
client: Update to use new GATT API
This update use of ReadValue and WriteValue to include the options
introduced in the API. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +25, -2 |
| 206c0c88 |
test: Update GATT examples with the new API |
Luiz Augusto von Dentz |
9 years ago |
3 files, +172, -50 |
| bf370f3b |
doc/gatt-api: Add secure flags
This add secure-{read,write} which shall be used by servers that want
to restrict attribute access to secure connection only (BT_SECURITY_FIPS) |
Luiz Augusto von Dentz |
9 years ago |
5 files, +51, -52 |
| 8357f17d |
doc/gatt-api: Merge RegisterProfile with RegisterApplication
Since RegisterApplication makes use of ObjectManager it is also possible
to verify the existance of GattProfile objects unifying the API for both
services (GATT server) and profiles (GATT client). |
Luiz Augusto von Dentz |
9 years ago |
2 files, +171, -279 |
| 93b64d9c |
doc/gatt-api: Add options dictionary to ReadValue/WriteValue
This adds the possibility to pass an offset to these operations, and
also in the server case to give the device object. |
Luiz Augusto von Dentz |
9 years ago |
3 files, +296, -123 |
| 1055cee3 |
lib: Update company identifiers |
Marcel Holtmann |
9 years ago |
1 file, +71, -1 |
| 8a459053 |
tools: add more entities to company ID parser
This patch adds lower and uppercase u with umlaut. |
Mike Ryan |
9 years ago |
1 file, +2, -0 |
| 40ab317e |
device: Fix invalid memory access when removing a device
The current code uses disconnect_all() outside the disconnection timer
callback but doesn't remove the timer from the list of timeout sources,
making it possible (but tricky) to get into the situation that the
disconnect_all() callback gets called with a device that was already
removed/blocked.
Valgrind log:
bluetoothd[5207]: src/device.c:device_remove() Removing device /org/bluez/hci0/dev_00_1A_7D_DA_71_07
bluetoothd[5207]: src/service.c:change_state() 0x84f0d70: device 00:1A:7D:DA:71:07 profile gap-profile state changed: connecting -> disconnected (-103)
bluetoothd[5207]: src/device.c:device_profile_connected() gap-profile Software caused connection abort (103)
bluetoothd[5207]: src/service.c:change_state() 0x84f0d70: device 00:1A:7D:DA:71:07 profile gap-profile state changed: disconnected -> unavailable (0)
bluetoothd[5207]: profiles/gap/gas.c:gap_driver_remove() GAP profile remove (00:1A:7D:DA:71:07)
bluetoothd[5207]: src/service.c:btd_service_unref() 0x84f0d70: ref=0
bluetoothd[5207]: src/device.c:btd_device_unref() Freeing device /org/bluez/hci0/dev_00_1A_7D_DA_71_07
bluetoothd[5207]: src/gatt-client.c:unregister_service() Removing GATT service: /org/bluez/hci0/dev_00_1A_7D_DA_71_07/service0006
bluetoothd[5207]: src/gatt-client.c:unregister_characteristic() Removing GATT characteristic: /org/bluez/hci0/dev_00_1A_7D_DA_71_07/service0006/char0007
bluetoothd[5207]: src/gatt-client.c:unregister_descriptor() Removing GATT descriptor: /org/bluez/hci0/dev_00_1A_7D_DA_71_07/service0006/char0007/desc0009
bluetoothd[5207]: src/device.c:device_free() 0x8446200
bluetoothd[5207]: src/adapter.c:dev_disconnected() Device 00:1A:7D:DA:71:07 disconnected, reason 2
bluetoothd[5207]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 00:1A:7D:DA:71:07 type 1 status 0xe
bluetoothd[5207]: src/adapter.c:resume_discovery()
bluetoothd[5207]: src/adapter.c:trigger_start_discovery()
bluetoothd[5207]: src/adapter.c:cancel_passive_scanning()
==5207== Invalid read of size 1
==5207== at 0x49E87C: disconnect_all (device.c:1218)
==5207== by 0x50C5FA2: g_timeout_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== by 0x50C5569: g_main_context_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== by 0x50C58E7: g_main_context_iterate.isra.29 (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== by 0x50C5C01: g_main_loop_run (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== by 0x40CA68: main (main.c:687)
==5207== Address 0x8446412 is 530 bytes inside a block of size 616 free'd
==5207== at 0x4C2AEA0: free (vg_replace_malloc.c:530)
==5207== by 0x4A2EA5: device_free (device.c:670)
==5207== by 0x4C7439: remove_interface (object.c:667)
==5207== by 0x4C8051: g_dbus_unregister_interface (object.c:1391)
==5207== by 0x4AAADC: btd_device_unref (device.c:5998)
==5207== by 0x4AAC85: device_remove (device.c:3951)
==5207== by 0x48F541: btd_adapter_remove_device (adapter.c:1180)
==5207== by 0x49136A: connect_failed_callback (adapter.c:7707)
==5207== by 0x4CE139: notify_handler (mgmt.c:292)
==5207== by 0x4CD723: queue_foreach (queue.c:220)
==5207== by 0x4CF568: process_notify (mgmt.c:304)
==5207== by 0x4CF568: can_read_data (mgmt.c:370)
==5207== by 0x4E01EA: watch_callback (io-glib.c:170)
==5207== Block was alloc'd at
==5207== at 0x4C2BD20: calloc (vg_replace_malloc.c:711)
==5207== by 0x4A2F7C: device_new (device.c:3535)
==5207== by 0x4A4F14: device_create (device.c:3623)
==5207== by 0x484A08: adapter_create_device (adapter.c:1115)
==5207== by 0x48EBE2: update_found_devices (adapter.c:5473)
==5207== by 0x48EBE2: device_found_callback (adapter.c:5647)
==5207== by 0x4CE139: notify_handler (mgmt.c:292)
==5207== by 0x4CD723: queue_foreach (queue.c:220)
==5207== by 0x4CF568: process_notify (mgmt.c:304)
==5207== by 0x4CF568: can_read_data (mgmt.c:370)
==5207== by 0x4E01EA: watch_callback (io-glib.c:170)
==5207== by 0x50C5569: g_main_context_dispatch (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== by 0x50C58E7: g_main_context_iterate.isra.29 (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== by 0x50C5C01: g_main_loop_run (in /usr/x86_64-pc-linux-gnu/lib/libglib-2.0.so.0.4800.0)
==5207== |
Vinicius Costa Gomes |
9 years ago |
1 file, +6, -1 |
| 69b477e3 |
tools/bluemoon: Add hardware variant for Intel Bluetooth 8265
This patch adds support for HW variant for Intel Bluetooth 8265
also known as Windstorm Peak (WsP). |
Tedd Ho-Jeong An |
9 years ago |
1 file, +1, -0 |
| 6aa1c448 |
gdbus: Fix the ordering of signals
Consider the following example:
/foo
properties: "A", "B"
/bar
properties: "C", "D"
If during a given mainloop iteration, property "A" of object '/foo' is
changed, then properties "C" and "D" of '/bar', lastly "B" of '/foo',
the current code will emit the PropertiesChanged signals in following
order: "A", "B", "C", "D".
This may confuse applications that have a dependency on the order of
those signals.
This fixes the ordering, so in the example, the order becomes:
"C", "D", "A", B". This is considered not to be a problem, as
applications may use the flag G_DBUS_PROPERTY_CHANGED_FLAG_FLUSH, so
property changed signals are emitted as soon as possible.
The solution is for each object, to reschedule the signals every time a
signal is emitted. |
Vinicius Costa Gomes |
9 years ago |
2 files, +19, -2 |
| 63c8fe7a |
monitor: Pass drop count from TTY to BTSnoop file |
Johan Hedberg |
9 years ago |
1 file, +8, -4 |
| dc5a91ce |
shared/btsnoop: Add support for providing cumulative drops count |
Johan Hedberg |
9 years ago |
4 files, +14, -13 |
| 868a9f11 |
monitor: Add support for writing to BTSnoop file from TTY input |
Johan Hedberg |
9 years ago |
1 file, +3, -1 |
| 1cbe4613 |
monitor: Introduce support for extended TTY header
Add support for packet drops and 32-bit timestamps. |
Johan Hedberg |
9 years ago |
3 files, +135, -10 |
| 49a1a03f |
doc/settings-storage: Add alternative format for descriptors
In case of some descriptors like CEP we must store the actual value since
extended properties are not part of the discovery and btd_gatt_client no
longer attempt to read it the value must be loaded in the db so
gatt_db_attribute_get_char_data is able to retrieve it. |
Luiz Augusto von Dentz |
9 years ago |
2 files, +43, -7 |
| 657b0eb4 |
core/device: Fix not storing GATT attributes
If services has been refreshed the attributes shall be stored so they can
be reloaded properly the next time. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +2, -0 |
| a8eaf1b0 |
core/device: Remove code related to GattServices
GattService has been removed so there shouldn't be any code related to it |
Luiz Augusto von Dentz |
9 years ago |
1 file, +0, -3 |
| 8f39600e |
core/gatt-client: Don't read extended properties
Extended properties are already read and stored in the database and can be
retrieved with gatt_db_attribute_get_char_data. |
Luiz Augusto von Dentz |
9 years ago |
1 file, +3, -52 |
| a03720a1 |
monitor: Disable monitor socket if a TTY is used
For now we don't have a way of resolving index conflicts between a TTY
and a monitor socket. Simply disable the monitor socket for now if a
TTY is used. |
Johan Hedberg |
9 years ago |
1 file, +2, -5 |
| 67e35de9 |
Make use of new tty_get_speed helper |
Johan Hedberg |
9 years ago |
5 files, +19, -194 |
| e0ecf26d |
shared: Add TTY speed helper |
Johan Hedberg |
9 years ago |
2 files, +82, -1 |
| 221ae759 |
monitor: Update to new header format of TTY protocol
The updated TTY protocol content looks like:
uint16 data_len
uint16 opcode
uint8 flags
uint8 hdr_len
uint8 extra_hdr[hdr_len];
uint8 payload[data_len - 4 - hdr_len] |
Johan Hedberg |
9 years ago |
1 file, +31, -13 |
| 180da702 |
monitor: Permit monitor/mgmt socket errors if a TTY is used
One may want to run btmon without special privileges when using it in
TTY mode. Ignore any errors from control_tracing() in such a case. |
Johan Hedberg |
9 years ago |
1 file, +6, -3 |
| 9dc47e65 |
monitor: Add error return value to control_tty() |
Johan Hedberg |
9 years ago |
2 files, +12, -7 |
| dac899f0 |
monitor: Add --tty-speed command line switch |
Johan Hedberg |
9 years ago |
3 files, +67, -4 |
| 1b45686e |
monitor: Fix processing left-over data
If there's enough data in the buffer after processing a packet we
should just continue looping and trying to parse it too. |
Johan Hedberg |
9 years ago |
1 file, +12, -10 |
| 61bad31c |
monitor: Fix checking for sufficient data |
Johan Hedberg |
9 years ago |
1 file, +2, -2 |
| 065e286b |
client: Fix select-attribute behaviour |
Francois Beaufort |
9 years ago |
1 file, +0, -1 |
| a2558173 |
Recognize Eddystone Configuration Service UUIDs |
Francois Beaufort |
9 years ago |
1 file, +32, -1 |
| bfb16c94 |
lib: Add recently introduced SPI & I2C bus defines |
Johan Hedberg |
9 years ago |
3 files, +8, -0 |
| 76295afb |
monitor: Add --tty switch to help text |
Johan Hedberg |
9 years ago |
1 file, +1, -0 |
| d73b25f7 |
HACKING: Fix nit in instructions |
Francois Beaufort |
9 years ago |
1 file, +2, -2 |
| f060c3a5 |
audio/avrcp: Fix uninitialized variable
This fixes the following error:
profiles/audio/avrcp.c:2847:6: error: variable 'num_of_items' is used
uninitialized whenever 'if' condition is true
[-Werror,-Wsometimes-uninitialized]
if (pdu->params[0] == AVRCP_STATUS_OUT_OF_BOUNDS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/avrcp.c:2857:40: note: uninitialized use occurs here
media_player_total_items_complete(mp, num_of_items);
^~~~~~~~~~~~
profiles/audio/avrcp.c:2847:2: note: remove the 'if' if its condition is always
false
if (pdu->params[0] == AVRCP_STATUS_OUT_OF_BOUNDS)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/avrcp.c:2839:23: note: initialize the variable 'num_of_items' to
silence this warning
uint32_t num_of_items;
^
= 0 |
Francois Beaufort |
9 years ago |
1 file, +1, -1 |
| 6b3f0f3a |
gatt-client: Read extended props on service discovery
Now once extended props can be taken with characteristic data
we need to makes sure that after discovery correct value is in
database.
With this patch, value of all the extended properties descriptors
are read during discovery just after discover of descriptors |
Łukasz Rymanowski |
9 years ago |
2 files, +116, -0 |
| 45f0f541 |
shared/gatt-server Check for ext. charact. prop. on reliable session
With this patch we make sure that reliable session is done on
characteristics which does support it. |
Łukasz Rymanowski |
9 years ago |
2 files, +63, -1 |
| 00910a68 |
shared/gatt-db: Extend gatt_db_attribute_get_char_data with ext. prop
This patch adds way to get extended properties from characteristic
extended property descriptor |
Łukasz Rymanowski |
9 years ago |
11 files, +85, -16 |
| cbf002b1 |
test-gatt: Fix characteristic properties
This patch fixes characteristic property for those characteristics
which contains extended characteristic properties descriptor. |
Łukasz Rymanowski |
9 years ago |
1 file, +12, -9 |
| e26df70d |
btgatt-server: Fix GATT device name properties
Since GATT device name characteristic has extended characteristic
property descriptor, that should be set in properties as well.
This patch fixes that. |
Łukasz Rymanowski |
9 years ago |
1 file, +2, -1 |
| 589a360d |
monitor: Add support for TTY based data
Add support for receiving a monitor data stream over a TTY. |
Johan Hedberg |
9 years ago |
3 files, +95, -1 |
| 7f20132c |
audio/media: Fix return NULL to .get_name
Player need to have a name set otherwise it may cause the following
crash:
Invalid read of size 1
at 0x4826BD8: strlen (mc_replace_strmem.c:404)
by 0x138289: avrcp_handle_get_folder_items (in /usr/libexec/bluetooth/bluetoothd)
by 0x13A278: handle_browsing_pdu (in /usr/libexec/bluetooth/bluetoothd)
by 0x1315F2: session_browsing_cb (in /usr/libexec/bluetooth/bluetoothd)
by 0x48C69BB: g_io_unix_dispatch (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x487FB2A: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x487FEB7: g_main_context_iterate.clone.5 (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x48803AA: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3600.0)
by 0x16D008: main (in /usr/libexec/bluetooth/bluetoothd)
Address 0x0 is not stack'd, malloc'd or (recently) free'd |
Luiz Augusto von Dentz |
9 years ago |
1 file, +3, -0 |