Commits

Commit Message Author Age Changes
3d6b237c src: Fix typos Found using codespell. Bastien Nocera 6 months ago 5 files, +25, -23
46e69f12 profiles: Fix typos Found using codespell. Bastien Nocera 6 months ago 11 files, +32, -27
4d68c609 plugins: Fix typos Found using codespell. Bastien Nocera 6 months ago 1 file, +2, -2
a1f82f10 peripheral: Fix typo Found using codespell. Bastien Nocera 6 months ago 1 file, +1, -1
ab2496cb obexd: Fix typos Found using codespell. Bastien Nocera 6 months ago 8 files, +27, -26
27b1e893 monitor: Fix typos Found using codespell. Bastien Nocera 6 months ago 8 files, +24, -24
ce78b15e mesh: Fix typos Found using codespell. Bastien Nocera 6 months ago 8 files, +9, -9
9e9f2705 lib: Fix typos Found using codespell. Bastien Nocera 6 months ago 3 files, +9, -9
a1b1d08d gobex: Fix typos Found using codespell. Bastien Nocera 6 months ago 1 file, +2, -2
e3b9fc5a emulator: Fix typos Found using codespell. Bastien Nocera 6 months ago 1 file, +1, -1
9986633b client: Fix typos Found using codespell. Bastien Nocera 6 months ago 4 files, +7, -7
cb8facbd doc: Fix typos Found using codespell. Bastien Nocera 6 months ago 11 files, +23, -23
87fb2b7b attrib: Fix typos Found using codespell. Bastien Nocera 6 months ago 1 file, +1, -1
d46ec5f4 Fix typos in top-level project docs Found using codespell. Bastien Nocera 6 months ago 3 files, +4, -4
168377c0 shared/bap: Add stream state check in stream_disable Add BT_BAP_STREAM_STATE_CONFIG state check so that stream_disable() is a no-op when the stream is in CONFIG state. This prevents unexpected state transitions or redundant operations during cleanup. Error trace: bluetoothd[2313]: src/shared/bap.c:stream_io_disconnected() stream 0x1f9fc20 io disconnected bluetoothd[2313]: src/shared/bap.c:bap_ucast_set_state() stream 0x1f9fc20 dir 0x01: releasing -> config bluetoothd[2313]: src/shared/bap.c:stream_notify() stream 0x1f9fc20 state 1 bluetoothd[2313]: profiles/audio/transport.c:bap_state_changed() stream 0x1f9fc20: releasing(6) -> config(1) ... bluetoothd[2313]: src/shared/bap.c:stream_disable() stream 0x1f9fc20 bluetoothd[2313]: src/shared/bap.c:bap_ucast_set_state() stream 0x1f9fc20 dir 0x01: config -> qos Yang Li 6 months ago 1 file, +1, -0
655421a9 shared/shell: Fix not calling pre_run for main menu When calling bt_shell_run the main menu pre_run was not being called which cause tools with just one menu to not work as intended. Fixes: https://github.com/bluez/bluez/issues/1319 Luiz Augusto von Dentz 6 months ago 1 file, +3, -0
f0512114 Remove android support Luiz Augusto von Dentz 6 months ago 231 files, +4, -102811
a2156408 unit: Remove dependencies to android This add copies of android specific dependencies used by unit testing. Luiz Augusto von Dentz 6 months ago 9 files, +10688, -4
50fb9042 mesh: node: remove dead function declaration node_attach_io() has been removed in 7cdc215ff5a1 ("mesh: Add finalization of a newly created node") Christian Eggers 6 months ago 1 file, +0, -1
90e2296e advertising: client_remove: use concrete type No need for using a void pointer here. Christian Eggers 6 months ago 1 file, +4, -3
248a671e error: Add dedicated error domain for BREDR This adds dedicated error domain org.bluez.Error.BREDR for BREDR bearer and then use it on the likes of btd_error_profile_unavailable. Luiz Augusto von Dentz 6 months ago 4 files, +5, -5
55a6763c device: Better error when no BR/EDR profiles can be connected to Add a more precise error when there are no BR/EDR profiles to connect to. This is useful when trying to connect to a particular device, and there are no relevant profiles to connect to on the bearer. Bastien Nocera 6 months ago 2 files, +15, -5
2d7f67d8 error: Make errno to string helpers private We're not using them outside the error code itself. Bastien Nocera 6 months ago 2 files, +2, -5
74f3733e device: Use new DbusMessage error helper Bastien Nocera 6 months ago 1 file, +9, -9
33226a0a error: Add helper to return DbusMessage errors from errno This will allow us to start adding more precise errors instead of "Failed" with a string if we're parsing an errno. Bastien Nocera 6 months ago 2 files, +12, -0
0ff45df8 error: Rename device error helper to match retval Rename the helper to show that it outputs a string, and not an error DbusMessage as the other functions do. Bastien Nocera 6 months ago 3 files, +11, -12
476ae809 gatt-client: avoid UAF after acquire notify failure If a disconnect happens during AcquireNotify dbus calls, a lot of debris is left over. Subsequent calls to AcquireNotify will return NotPermitted and StopNotify leads to an UAF, crashing bluetoothd. Fix that by also clean up the socket stuff on failure. This was provoked by putting the device into some RF shielding bag and open and close it quickly. Valgrind output: bluetoothd[26032]: [:1.126:method_call] > org.bluez.GattCharacteristic1.AcquireNotify [#145] bluetoothd[26032]: [:1.126:error] < org.bluez.Error.NotPermitted [#145] bluetoothd[26032]: [:1.74:method_call] > org.freedesktop.DBus.Properties.GetAll [#895] bluetoothd[26032]: [:1.74:method_return] < [#895] bluetoothd[26032]: [:1.74:method_call] > org.bluez.GattCharacteristic1.StopNotify [#896] ==26032== Invalid read of size 8 ==26032== at 0x1A5721: notify_io_destroy (gatt-client.c:1562) ==26032== by 0x1A7290: sock_io_destroy (gatt-client.c:1171) ==26032== by 0x1A7290: destroy_sock (gatt-client.c:1192) ==26032== by 0x1A73D6: characteristic_stop_notify (gatt-client.c:1698) ==26032== by 0x1CF478: process_message (object.c:293) ==26032== by 0x49CB71B: ??? (in /usr/lib/x86_64-linux-gnu/libdbus-1.so.3.32.4) ==26032== by 0x49BB62A: dbus_connection_dispatch (in /usr/lib/x86_64-linux-gnu/libdbus-1.so.3.32.4) ==26032== by 0x1CBCEF: message_dispatch (mainloop.c:59) ==26032== by 0x48BF61E: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x48BF9D7: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x48BFC8E: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x202114: mainloop_run (mainloop-glib.c:65) ==26032== by 0x202501: mainloop_run_with_signal (mainloop-notify.c:196) ==26032== Address 0x5a7a430 is 0 bytes inside a block of size 32 free'd ==26032== at 0x484417B: free (vg_replace_malloc.c:872) ==26032== by 0x1DEC0F: complete_notify_request (gatt-client.c:1663) ==26032== by 0x1DEC0F: enable_ccc_callback (gatt-client.c:1735) ==26032== by 0x1DB8FF: disc_att_send_op (att.c:464) ==26032== by 0x1DB8FF: disconnect_cb (att.c:676) ==26032== by 0x2017A4: watch_callback (io-glib.c:173) ==26032== by 0x48BF61E: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x48BF9D7: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x48BFC8E: g_main_loop_run (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x202114: mainloop_run (mainloop-glib.c:65) ==26032== by 0x202501: mainloop_run_with_signal (mainloop-notify.c:196) ==26032== by 0x12E60C: main (main.c:1535) ==26032== Block was alloc'd at ==26032== at 0x48417B4: malloc (vg_replace_malloc.c:381) ==26032== by 0x1D2F4D: util_malloc (util.c:46) ==26032== by 0x1A5DD3: notify_client_create (gatt-client.c:1426) ==26032== by 0x1A5EFC: characteristic_acquire_notify (gatt-client.c:1588) ==26032== by 0x1CF478: process_message (object.c:293) ==26032== by 0x49CB71B: ??? (in /usr/lib/x86_64-linux-gnu/libdbus-1.so.3.32.4) ==26032== by 0x49BB62A: dbus_connection_dispatch (in /usr/lib/x86_64-linux-gnu/libdbus-1.so.3.32.4) ==26032== by 0x1CBCEF: message_dispatch (mainloop.c:59) ==26032== by 0x48BF61E: g_main_context_dispatch (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) ==26032== by 0x48BF9D7: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7400.6) Andreas Kemnade 6 months ago 1 file, +7, -2
822037fe shared/bap: Set stream to idle when I/O is disconnected When BIG sync is lost, the stream status transitions from Streaming to Idle. > HCI Event: LE Meta Event (0x3e) plen 3 #3189 [hci0] 118.870863 LE Broadcast Isochronous Group Sync Lost (0x1e) BIG Handle: 0x00 Reason: Remote User Terminated Connection (0x13) = bluetoothd: src/shared/bap.c:stream_io_disconnected() stream 0.. 118.871183 = bluetoothd: src/shared/bap.c:bap_bcast_set_state() stream 0xdf.. 118.871227 = bluetoothd: profiles/audio/bap.c:bap_state_bcast_sink() stream.. 118.871258 = bluetoothd: profiles/audio/bass.c:bap_state_changed() stream 0.. 118.871307 = bluetoothd: src/gatt-database.c:send_notification_to_device()... 118.871384 = bluetoothd: profiles/audio/transport.c:bap_state_changed() str.. 118.871452 = bluetoothd: profiles/audio/transport.c:transport_bap_update_li.. 118.871509 = bluetoothd: profiles/audio/transport.c:transport_update_playin.. 118.871555 = bluetoothd: profiles/audio/transport.c:transport_set_state() S.. 118.871610 = bluetoothd: src/shared/bap.c:bap_bcast_sink_detach() stream 0x.. 118.871660 = bluetoothd: profiles/audio/media.c:pac_clear() endpoint 0xdd25.. 118.871689 Fixes: https://github.com/bluez/bluez/issues/1343 Yang Li 6 months ago 1 file, +9, -0
8e2425dc tools: parser: fix printf format errors struct timeval members can be 32 or 64 bits which results in "long long" on some platforms. As there are no printf conversion specifiers for time types, cast them to the longest possible types. Christian Eggers 6 months ago 1 file, +6, -3
2251e6d7 net: packet_received: avoid unnecessary copying Since cca48f305b60 ("mesh: Fix Relaying for multiple nodes"), the packet for relaying is assembled within send_relay_pkt(). So we do not need to assemble a full packet within packet_received(). Additionally remove misleading initialization of 'msg' variable, the value is assigned in all possible branches of mesh_crypto_packet_parse(). Christian Eggers 6 months ago 1 file, +6, -10
2a40b2f8 mesh: remove unused function typedef mesh_io_recv_ext_func_t has been introduced in 6a6fe856a900 ("mesh: rework incoming advertisement filtering"). According to 'git log -p <rev> master' it has never been used. Christian Eggers 6 months ago 1 file, +0, -5
2874aeb4 mesh: node_add_pending_local: use concrete type No need for using a void pointer here. Add const qualifier to passed mesh_prov_node_info. Christian Eggers 6 months ago 6 files, +13, -10
725a72ea mesh: mesh_net_transport_send: simplify No need for internal copy of 'seq'. Christian Eggers 6 months ago 1 file, +2, -3
b913bd1b mesh: util: constify Christian Eggers 6 months ago 2 files, +2, -2
eb8ffa0f mesh: mesh-config: constify removing 2 prototypes where an implementation never existed Christian Eggers 6 months ago 2 files, +18, -22
5651fc8b mesh: keyring: constify Christian Eggers 6 months ago 2 files, +4, -4
6983c985 doc: mesh-api: minor copy&paste fix Christian Eggers 6 months ago 1 file, +1, -1
dc7ca0e3 monitor: Print buffer pool information This prints the number of buffers in transit and total information: < ISO Data TX: Handle 2304 [1/8] flags 0x02 dlen 64 #1363 < ISO Data TX: Handle 2304 [2/8] flags 0x02 dlen 64 #1364 < ISO Data TX: Handle 2304 [3/8] flags 0x02 dlen 64 #1365 < ISO Data TX: Handle 2304 [4/8] flags 0x02 dlen 64 #1367 < ISO Data TX: Handle 2304 [5/8] flags 0x02 dlen 64 #1368 < ISO Data TX: Handle 2304 [6/8] flags 0x02 dlen 64 #1369 < ISO Data TX: Handle 2304 [7/8] flags 0x02 dlen 64 #1370 < ISO Data TX: Handle 2304 [8/8] flags 0x02 dlen 64 #1371 > HCI Event: Number of Completed Packets (0x13) plen 5 Num handles: 1 Handle: 2304 Address: FC:6D:77:BA:CF:A6 (Intel Corporate) Count: 1 Buffers: 7/8 #1363: len 64 (39 Kb/s) Latency: 13 msec (13-13 msec ~13 msec) < ISO Data TX: Handle 2304 [8/8] flags 0x02 dlen 64 Luiz Augusto von Dentz 6 months ago 1 file, +121, -20
ae1b7f6b shared/bap: handle inverted order of stop ready and disabling->qos DISABLING->QOS transition and Receiver Stop Ready reply may arrive in any order. BAP v1.0.2 (Sec. 5.6.5.1): CIS may be terminated by either side after Receiver Stop Ready has successfully completed. However, when we get the reply, the stream may be in either state. Instead of client detaching the IO on stop ready reply, rely on detaching IO on entering QOS, where Receiver Stop Ready has then necessarily completed. On DISABLING, mark stream io as not connecting, so that it gets detached even if CIS was not yet established. Seen to occur with Samsung Galaxy Buds2 Pro, when it refuses Enable for 32/32kHz duplex on one of the earbuds. Pauli Virtanen 6 months ago 1 file, +9, -12
56014755 configure.ac: check for stdarg.h Currently, there is the following compile error while building with -std=gnu23, which is now default for GCC 15: src/shared/shell.c: In function 'rl_cleanup': src/shared/shell.c:1435:9: error: too many arguments to function 'rl_message'; expected 0, have 2 1435 | rl_message("%s", ""); | ^~~~~~~~~~ ~~~~ In file included from src/shared/shell.c:29: /usr/include/readline/readline.h:410:12: note: declared here 410 | extern int rl_message (); | ^~~~~~~~~~ This adds a check for stdarg.h inside the configure script so that HAVE_STDARG_H gets defined and the correct prototype is picked from readline.h. Til Kaiser 6 months ago 1 file, +2, -1
01f3ef3c bap: don't pass in stream's own metadata to enable() Stream owned metadata pointers may be invalidated in bt_bap_stream operations. Just pass in NULL to keep the current value. Fixes: ERROR: AddressSanitizer: heap-use-after-free READ of size 8 at 0x7b86a76f5d18 thread T0 #0 0x000000836745 in util_iov_dup src/shared/util.c:353 #1 0x0000008ea96b in bap_stream_metadata src/shared/bap.c:1991 #2 0x0000008ebfbe in bap_ucast_enable src/shared/bap.c:2072 #3 0x0000009226e7 in bt_bap_stream_enable src/shared/bap.c:6392 #4 0x00000044037d in transport_bap_resume profiles/audio/transport.c:1981 freed by thread T0 here: #0 0x7f66a92e5bcb in free.part.0 (/lib64/libasan.so.8+0xe5bcb) #1 0x000000837002 in util_iov_free src/shared/util.c:392 #2 0x0000008ea94e in bap_stream_metadata src/shared/bap.c:1990 #3 0x0000008ebfbe in bap_ucast_enable src/shared/bap.c:2072 Pauli Virtanen 6 months ago 1 file, +1, -3
a209d697 shared/tester: shutdown tester IO before test teardown Some tests may require shutdown of tester IO for proper teardown. Add function tester_shutdown_io to accomplish that and call it automatically when test finishes. Kirill Samburskiy 6 months ago 2 files, +9, -0
659fc8fa test-micp: remove unnecessary bt_micp allocation Do not create bt_micp in test_server since it is not necessary for this test. Also register bt_micp detached callback to unref and free objects created by micp_get_session. Kirill Samburskiy 6 months ago 1 file, +14, -4
f5a4e95d test-vcp: remove unnecessary bt_vcp allocation Do not create bt_vcp in test_server since it is not necessary for this test. Also register bt_vcp detached callback to unref and free objects created by vcp_get_session. Kirill Samburskiy 6 months ago 1 file, +15, -4
71b5ea9b shared/bap: ignore NULL attach/detach callbacks Allow registering NULL attach/detach callbacks with bt_bap_register for cases when one of callbacks is not needed, e.g. in tests. Kirill Samburskiy 6 months ago 1 file, +6, -0
ab13c24e tester.config: Add config options for USB-passthrough and drivers This adds the necessary options in order to enable USB-passthrough configuration and also enable most of the drivers so they get build-tested. Luiz Augusto von Dentz 6 months ago 1 file, +34, -4
6f67234a test-runner.rst: Add documentation for USB-passthrough This documents the newly added option -U/--usb and adds a dedicated section that explains the required the kernel image to build with some extra config options to enable passing -device qemu-xhci in order to use -device usb-host. Luiz Augusto von Dentz 6 months ago 1 file, +16, -0
b8bbd523 test-runner: Add -U/--usb option This adds option to use a host controller plugged over USB: > tools/test-runner -U "usb-host,vendorid=0x8087,productid=0x0036"... -- /bin/bash > dmesg [ 1.046214] usb 1-1: new full-speed USB device number 2 using xhci_hcd [ 1.192623] Bluetooth: hci0: Firmware timestamp 2025.18 buildtype 2 build 82364 [ 1.192638] Bluetooth: hci0: Firmware SHA1: 0xa66e016b [ 1.197362] Bluetooth: hci0: Fseq status: Success (0x00) [ 1.197368] Bluetooth: hci0: Fseq executed: 00.00.04.196 [ 1.197371] Bluetooth: hci0: Fseq BT Top: 00.00.04.197 > lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:0036 Intel Corp. BE200 Bluetooth Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Luiz Augusto von Dentz 6 months ago 1 file, +17, -3
941dbc5f device: Fix memory leak This frees the LastUsedBearer string to avoid memory leak: Direct leak of 12 byte(s) in 2 object(s) allocated from: #0 0x7ccf538fd9c7 in malloc ../../../../src/libsanitizer/asan/ asan_malloc_linux.cpp:69 #1 0x7ccf53665b09 in g_malloc (/lib/x86_64-linux-gnu/ libglib-2.0.so.0+0x62b09) #2 0x7ccf53659b90 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x56b90) #3 0x7ccf53659cd4 in g_key_file_get_string (/lib/x86_64-linux-gnu/ libglib-2.0.so.0+0x56cd4) #4 0x5c8c691f2811 in load_info src/device.c:4225 Frédéric Danis 6 months ago 1 file, +3, -1
f5fd7efe github: Remove lint workflow Luiz Augusto von Dentz 6 months ago 1 file, +0, -32
Previous Next