org.bluez.LEAdvertisement: Add broadcast name support
cover org.bluez.LEAdvertisement: Add broadcast name support
From: Alexander Sarmanow (Televic) <[email protected]>
This series adds dedicated support for setting the broadcast name via DBus to the org.bluez.LEAdvertisement object. Should make it easier for upper layers to set this advertisement property.
The Public Broadcast Profile (PBP v1.0, see section 5.1.1) restricts the string length to a minimum of 4 and a maximum of 32 characters. If the provided name is shorter than the minimum, pasring returns an error.If it exceeds the maximum, it is truncated, consistent with the behavior for the local name.
The BroadcastName property will be parsed in any case, but only added to the advertisement data in case it's of type broadcast.
Tested by setting a broadcast name via pipewire bluez spa plugin.
Alexander Sarmanow (2):
doc/org.bluez.LEAdvertisement: Add broadcast name
advertising: Add broadcast name property support
doc/org.bluez.LEAdvertisement.rst | 7 +++++ src/advertising.c | 44 +++++++++++++++++++++++++++++++ src/shared/ad.h | 3 +++ 3 files changed, 54 insertions(+)
Signature · 1 line
2.30.2
PATCH 1/2 doc/org.bluez.LEAdvertisement: Add broadcast name
--- doc/org.bluez.LEAdvertisement.rst | 7 +++++++ 1 file changed, 7 insertions(+)
doc/org.bluez.LEAdvertisement.rst +7 -0
@@ -172,6 +172,13 @@ fit into the packet it will be truncated. If this property is available 'local-name' cannot be present in the **Includes**. +string BroadcastName [readonly, optional] +````````````````````````````````````` + +Broadcast name to be used in the advertising report. If the string is shorter +than 4 chars an error will be returned. If it is longer than 32 chars it will +be truncated. + uint16 Appearance [readonly, optional] ``````````````````````````````````````
Signature · 1 line
2.30.2
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1173237/
---Test result---
Test Summary:
CheckPatch PASS 1.05 seconds GitLint PASS 0.72 seconds BuildEll PASS 20.02 seconds BluezMake FAIL 368.69 seconds MakeCheck FAIL 176.76 seconds MakeDistcheck FAIL 10.94 seconds CheckValgrind FAIL 91.82 seconds CheckSmatch FAIL 181.47 seconds bluezmakeextell FAIL 63.58 seconds TestFunctional ERROR 360.06 seconds IncrementalBuild FAIL 363.47 seconds ScanBuild FAIL 326.88 seconds
Details
##############################
Test: BluezMake - FAIL
Desc: Build BlueZ
Output:
tools/mgmt-tester.c: In function ‘main’:tools/mgmt-tester.c:13218:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 13218 | int main(int argc, char *argv[])
| ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
766 | int main(int argc, char *argv[])
| ^~~~doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
`````````````````````````````````````
Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1
make[1]: *** Waiting for unfinished jobs....
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:1382:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
1382 | int main(int argc, char *argv[])
| ^~~~
unit/test-rap.c: In function ‘main’:
unit/test-rap.c:997:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
997 | int main(int argc, char *argv[])
| ^~~~
make: *** [Makefile:4322: all] Error 2
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:
doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
`````````````````````````````````````Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1
make: *** [Makefile:11196: check] Error 2
##############################
Test: MakeDistcheck - FAIL
Desc: Run Bluez Make Distcheck
Output:
doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
`````````````````````````````````````
Exiting due to level-2 (WARNING) system message.
make[2]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:11017: distdir] Error 2
make: *** [Makefile:11101: dist] Error 2
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:13218:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
13218 | int main(int argc, char *argv[])
| ^~~~
doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
`````````````````````````````````````Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:11196: check] Error 2
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
src/shared/crypto.c:271:21: warning: Variable length array is used.src/shared/crypto.c:272:23: warning: Variable length array is used.src/shared/gatt-helpers.c:764:31: warning: Variable length array is used.src/shared/gatt-helpers.c:842:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1335:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1366:23: warning: Variable length array is used.src/shared/bap.c:318:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/shell.c: note: in included file (through /usr/include/x86_64-linux-gnu//sys/ioctl.h, /usr/include/x86_64-linux-gnu//sys/epoll.h, src/shared/mainloop.h):/usr/include/x86_64-linux-gnu//sys/ttydefaults.h:55:9: warning: preprocessor token CTRL redefinedsrc/shared/shell.c: note: in included file (through /usr/include/readline/keymaps.h, /usr/include/readline/readline.h):/usr/include/readline/chardefs.h:51:9: this was the original definitionsrc/shared/crypto.c:271:21: warning: Variable length array is used.src/shared/crypto.c:272:23: warning: Variable length array is used.src/shared/gatt-helpers.c:764:31: warning: Variable length array is used.src/shared/gatt-helpers.c:842:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1335:31: warning: Variable length array is used.src/shared/gatt-helpers.c:1366:23: warning: Variable length array is used.src/shared/bap.c:318:25: warning: array of flexible structuressrc/shared/bap.c: note: in included file:./src/shared/ascs.h:88:25: warning: array of flexible structuressrc/shared/shell.c: note: in included file (through /usr/include/x86_64-linux-gnu//sys/ioctl.h, /usr/include/x86_64-linux-gnu//sys/epoll.h, src/shared/mainloop.h):/usr/include/x86_64-linux-gnu//sys/ttydefaults.h:55:9: warning: preprocessor token CTRL redefinedsrc/shared/shell.c: note: in included file (through /usr/include/readline/keymaps.h, /usr/include/readline/readline.h):/usr/include/readline/chardefs.h:51:9: this was the original definitiontools/mesh-cfgtest.c:1453:17: warning: unknown escape sequence: '\%'tools/sco-tester.c: note: in included file:./lib/bluetooth/bluetooth.h:232:15: warning: array of flexible structures./lib/bluetooth/bluetooth.h:237:31: warning: array of flexible structurestools/bneptest.c:634:39: warning: unknown escape sequence: '\%'tools/seq2bseq.c:57:26: warning: Variable length array is used.client/btpclient/gatt.c: note: in included file:./src/shared/btp.h:338:41: warning: array of flexible structures./src/shared/btp.h:343:55: warning: array of flexible structures./src/shared/btp.h:366:47: warning: array of flexible structures./src/shared/btp.h:395:42: warning: array of flexible structuressrc/agent.c: note: in included file:src/shared/queue.h:19:20: error: redefinition of struct queue_entrysrc/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilitysrc/adv_monitor.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilityunit/avctp.c:505:34: warning: Variable length array is used.unit/avctp.c:556:34: warning: Variable length array is used.unit/test-avrcp.c:374:26: warning: Variable length array is used.unit/test-avrcp.c:399:26: warning: Variable length array is used.unit/test-avrcp.c:415:24: warning: Variable length array is used.unit/avrcp-lib.c:1085:34: warning: Variable length array is used.unit/avrcp-lib.c:1583:34: warning: Variable length array is used.unit/avrcp-lib.c:1612:34: warning: Variable length array is used.unit/avrcp-lib.c:1638:34: warning: Variable length array is used.src/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilitysrc/agent.c: note: in included file:src/shared/queue.h:19:20: error: redefinition of struct queue_entrysrc/adv_monitor.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilitysrc/main.c: note: in included file (through src/device.h):./src/shared/queue.h:19:20: error: redefinition of struct queue_entrymesh/mesh-io-mgmt.c:525:67: warning: Variable length array is used.doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
````````````````````````````````````` Exiting due to level-2 (WARNING) system message. make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:4322: all] Error 2 ############################## Test: bluezmakeextell - FAIL Desc: Build Bluez with External ELL Output: doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short. string BroadcastName [readonly, optional] `````````````````````````````````````
Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4322: all] Error 2
##############################
Test: TestFunctional - ERROR
Desc: Run test-functional
Output:
Failed to build BlueZ:
Failed to build BlueZ
##############################
Test: IncrementalBuild - FAIL
Desc: Incremental build with the patches in the series Output:
tools/mgmt-tester.c: In function ‘main’:tools/mgmt-tester.c:13218:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 13218 | int main(int argc, char *argv[])
| ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
766 | int main(int argc, char *argv[])
| ^~~~doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
`````````````````````````````````````
Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1
make[1]: *** Waiting for unfinished jobs....
unit/test-avrcp.c: In function ‘main’:
unit/test-avrcp.c:1382:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
1382 | int main(int argc, char *argv[])
| ^~~~
unit/test-rap.c: In function ‘main’:
unit/test-rap.c:997:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
997 | int main(int argc, char *argv[])
| ^~~~
make: *** [Makefile:4322: all] Error 2
[BlueZ,1/2] doc/org.bluez.LEAdvertisement: Add broadcast name
tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:13218:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
13218 | int main(int argc, char *argv[])
| ^~~~
unit/test-avdtp.c: In function ‘main’:
unit/test-avdtp.c:766:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
766 | int main(int argc, char *argv[])
| ^~~~
doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional]
`````````````````````````````````````Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1
make[1]: *** Waiting for unfinished jobs....unit/test-avrcp.c: In function ‘main’:unit/test-avrcp.c:1382:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
1382 | int main(int argc, char *argv[])
| ^~~~
unit/test-rap.c: In function ‘main’:
unit/test-rap.c:997:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
997 | int main(int argc, char *argv[])
| ^~~~make: *** [Makefile:4322: all] Error 2
##############################
Test: ScanBuild - FAIL
Desc: Run Scan Build
Output:
src/shared/gatt-client.c:447:21: warning: Use of memory after it is freed [unix.Malloc]
447 | gatt_db_unregister(op->client->db, op->db_id);
| ^~~~~~~~~~
src/shared/gatt-client.c:692:2: warning: Use of memory after it is freed [unix.Malloc]
692 | discovery_op_complete(op, false, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1098:2: warning: Use of memory after it is freed [unix.Malloc]
1098 | discovery_op_complete(op, success, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1292:2: warning: Use of memory after it is freed [unix.Malloc]
1292 | discovery_op_complete(op, success, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1357:2: warning: Use of memory after it is freed [unix.Malloc]
1357 | discovery_op_complete(op, success, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1632:6: warning: Use of memory after it is freed [unix.Malloc]
1632 | if (read_db_hash(op)) {
| ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1637:2: warning: Use of memory after it is freed [unix.Malloc]
1637 | discover_all(op);
| ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1693:56: warning: Use of memory after it is freed [unix.Malloc]
1693 | notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
| ~~~~~~~~~~~~~~~~~~~ ^
src/shared/gatt-client.c:2146:6: warning: Use of memory after it is freed [unix.Malloc]
2146 | if (read_db_hash(op)) {
| ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2154:8: warning: Use of memory after it is freed [unix.Malloc]
2154 | discovery_op_ref(op),
| ^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3332:2: warning: Use of memory after it is freed [unix.Malloc]
3332 | complete_write_long_op(req, success, 0, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3354:2: warning: Use of memory after it is freed [unix.Malloc]
3354 | request_unref(req);
| ^~~~~~~~~~~~~~~~~~12 warnings generated.src/shared/rap.c:3322:30: warning: Assigned value is uninitialized [core.uninitialized.Assign]
3322 | out->tone_pct[k].i_sample = tone_pct_i[k];
| ^ ~~~~~~~~~~~~~src/shared/rap.c:4269:13: warning: Use of memory after it is freed [unix.Malloc]
4269 | attached = queue_find(sessions, NULL, rap);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/shared/bap.c:1543:8: warning: Use of memory after it is freed [unix.Malloc]
1543 | bap = bt_bap_ref_safe(bap);
| ^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2359:20: warning: Use of memory after it is freed [unix.Malloc]
2359 | return queue_find(stream->bap->streams, NULL, stream);
| ^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/shared/gatt-client.c:447:21: warning: Use of memory after it is freed [unix.Malloc]
447 | gatt_db_unregister(op->client->db, op->db_id);
| ^~~~~~~~~~
src/shared/gatt-client.c:692:2: warning: Use of memory after it is freed [unix.Malloc]
692 | discovery_op_complete(op, false, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1098:2: warning: Use of memory after it is freed [unix.Malloc]
1098 | discovery_op_complete(op, success, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1292:2: warning: Use of memory after it is freed [unix.Malloc]
1292 | discovery_op_complete(op, success, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1357:2: warning: Use of memory after it is freed [unix.Malloc]
1357 | discovery_op_complete(op, success, att_ecode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1632:6: warning: Use of memory after it is freed [unix.Malloc]
1632 | if (read_db_hash(op)) {
| ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1637:2: warning: Use of memory after it is freed [unix.Malloc]
1637 | discover_all(op);
| ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:1693:56: warning: Use of memory after it is freed [unix.Malloc]
1693 | notify_data->chrc->ccc_write_id = notify_data->att_id = att_id;
| ~~~~~~~~~~~~~~~~~~~ ^
src/shared/gatt-client.c:2146:6: warning: Use of memory after it is freed [unix.Malloc]
2146 | if (read_db_hash(op)) {
| ^~~~~~~~~~~~~~~~
src/shared/gatt-client.c:2154:8: warning: Use of memory after it is freed [unix.Malloc]
2154 | discovery_op_ref(op),
| ^~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3332:2: warning: Use of memory after it is freed [unix.Malloc]
3332 | complete_write_long_op(req, success, 0, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/shared/gatt-client.c:3354:2: warning: Use of memory after it is freed [unix.Malloc]
3354 | request_unref(req);
| ^~~~~~~~~~~~~~~~~~12 warnings generated.src/shared/rap.c:3322:30: warning: Assigned value is uninitialized [core.uninitialized.Assign]
3322 | out->tone_pct[k].i_sample = tone_pct_i[k];
| ^ ~~~~~~~~~~~~~src/shared/rap.c:4269:13: warning: Use of memory after it is freed [unix.Malloc]
4269 | attached = queue_find(sessions, NULL, rap);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
tools/hciattach_ath3k.c:530:9: warning: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream]
530 | if (!fgets(byte, 3, stream))
| ^~~~~~~~~~~~~~~~~~~~~~
tools/hciattach_ath3k.c:530:9: warning: Read function called when stream is in EOF state. Function has no effect [unix.Stream]
530 | if (!fgets(byte, 3, stream))
| ^~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
tools/hciattach.c:817:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' [deadcode.DeadStores]
817 | if ((n = read_hci_event(fd, resp, 10)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:865:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' [deadcode.DeadStores]
865 | if ((n = read_hci_event(fd, resp, 4)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:887:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' [deadcode.DeadStores]
887 | if ((n = read_hci_event(fd, resp, 10)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:909:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' [deadcode.DeadStores]
909 | if ((n = read_hci_event(fd, resp, 4)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:930:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' [deadcode.DeadStores]
930 | if ((n = read_hci_event(fd, resp, 4)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach.c:974:7: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' [deadcode.DeadStores]
974 | if ((n = read_hci_event(fd, resp, 6)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
src/oui.c:50:2: warning: Value stored to 'hwdb' is never read [deadcode.DeadStores]
50 | hwdb = udev_hwdb_unref(hwdb);
| ^ ~~~~~~~~~~~~~~~~~~~~~
src/oui.c:53:2: warning: Value stored to 'udev' is never read [deadcode.DeadStores]
53 | udev = udev_unref(udev);
| ^ ~~~~~~~~~~~~~~~~
2 warnings generated.
src/shared/bap.c:1543:8: warning: Use of memory after it is freed [unix.Malloc]
1543 | bap = bt_bap_ref_safe(bap);
| ^~~~~~~~~~~~~~~~~~~~
src/shared/bap.c:2359:20: warning: Use of memory after it is freed [unix.Malloc]
2359 | return queue_find(stream->bap->streams, NULL, stream);
| ^~~~~~~~~~~~~~~~~~~~
2 warnings generated.
tools/rfcomm.c:234:3: warning: Value stored to 'i' is never read [deadcode.DeadStores]
234 | i = execvp(cmdargv[0], cmdargv);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:234:7: warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker]
234 | i = execvp(cmdargv[0], cmdargv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:354:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd' [deadcode.DeadStores]
354 | if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:473:6: warning: The 1st argument to 'getsockname' is -1 but should be >= 0 [unix.StdCLibraryFunctions]
473 | if (getsockname(nsk, (struct sockaddr *)&laddr, &alen) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm.c:497:14: warning: Assigned value is uninitialized [core.uninitialized.Assign]
497 | req.channel = raddr.rc_channel;
| ^ ~~~~~~~~~~~~~~~~
tools/rfcomm.c:515:8: warning: Although the value stored to 'fd' is used in the enclosing expression, the value is never actually read from 'fd' [deadcode.DeadStores]
515 | if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
tools/ciptool.c:351:7: warning: 5th function call argument is an uninitialized value [core.CallAndMessage]
351 | sk = do_connect(ctl, dev_id, &src, &dst, psm, (1 << CMTP_LOOPBACK));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/sdptool.c:941:26: warning: Result of 'malloc' is converted to a pointer of type 'uint32_t', which is incompatible with sizeof operand type 'int' [unix.MallocSizeof]
941 | uint32_t *value_int = malloc(sizeof(int));
| ~~~~~~~~~~ ^~~~~~ ~~~~~~~~~~~
tools/sdptool.c:980:4: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
980 | free(allocArray[i]);
| ^~~~~~~~~~~~~~~~~~~
tools/sdptool.c:3777:2: warning: Potential leak of memory pointed to by 'si.name' [unix.Malloc]
3777 | return add_service(0, &si);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
tools/sdptool.c:4112:4: warning: Potential leak of memory pointed to by 'context.svc' [unix.Malloc]
4112 | return -1;
| ^~~~~~~~~
4 warnings generated.
src/sdp-xml.c:129:10: warning: Assigned value is uninitialized [core.uninitialized.Assign]
129 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
src/sdp-xml.c:309:11: warning: Assigned value is uninitialized [core.uninitialized.Assign]
309 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
src/sdp-xml.c:347:11: warning: Assigned value is uninitialized [core.uninitialized.Assign]
347 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
3 warnings generated.
tools/rfcomm-tester.c:410:6: warning: The 1st argument to 'bind' is -1 but should be >= 0 [unix.StdCLibraryFunctions]
410 | if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/rfcomm-tester.c:428:8: warning: The 1st argument to 'connect' is -1 but should be >= 0 [unix.StdCLibraryFunctions]
428 | err = connect(sk, (struct sockaddr *) &addr, sizeof(addr));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
tools/avtest.c:243:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
243 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:253:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
253 | len = write(sk, buf, 4);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:262:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
262 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:276:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
276 | len = write(sk, buf,
| ^ ~~~~~~~~~~~~~~
277 | 3 + sizeof(media_transport));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:283:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
283 | len = write(sk, buf,
| ^ ~~~~~~~~~~~~~~
284 | 1 + media_transport_size);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:290:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
290 | len = write(sk, buf,
| ^ ~~~~~~~~~~~~~~
291 | 1 + media_transport_size);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:297:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
297 | len = write(sk, buf,
| ^ ~~~~~~~~~~~~~~
298 | 2 + media_transport_size);
| ~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:309:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
309 | len = write(sk, buf, 4);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:313:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
313 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:322:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
322 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:326:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
326 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:335:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
335 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:342:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
342 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:364:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
364 | len = write(sk, buf, 4);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:368:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
368 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:377:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
377 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:381:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
381 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:394:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
394 | len = write(sk, buf, 4);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:398:5: warning: Value stored to 'len' is never read [deadcode.DeadStores]
398 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:405:4: warning: Value stored to 'len' is never read [deadcode.DeadStores]
405 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:415:4: warning: Value stored to 'len' is never read [deadcode.DeadStores]
415 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:580:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
580 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:588:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
588 | len = write(sk, buf, invalid ? 2 : 3);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:602:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
602 | len = write(sk, buf, 4 + media_transport_size);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/avtest.c:615:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
615 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:625:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
625 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:637:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
637 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:652:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
652 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:664:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
664 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:673:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
673 | len = write(sk, buf, 3);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:680:3: warning: Value stored to 'len' is never read [deadcode.DeadStores]
680 | len = write(sk, buf, 2);
| ^ ~~~~~~~~~~~~~~~~~
tools/avtest.c:716:2: warning: Value stored to 'len' is never read [deadcode.DeadStores]
716 | len = write(sk, buf, AVCTP_HEADER_LENGTH + sizeof(play_pressed));
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 warnings generated.
tools/create-image.c:76:3: warning: Value stored to 'fd' is never read [deadcode.DeadStores]
76 | fd = -1;
| ^ ~~
tools/create-image.c:84:3: warning: Value stored to 'fd' is never read [deadcode.DeadStores]
84 | fd = -1;
| ^ ~~
tools/create-image.c:92:3: warning: Value stored to 'fd' is never read [deadcode.DeadStores]
92 | fd = -1;
| ^ ~~
tools/create-image.c:105:2: warning: Value stored to 'fd' is never read [deadcode.DeadStores]
105 | fd = -1;
| ^ ~~
tools/create-image.c:108:2: warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker]
108 | fprintf(fp, HDR_FMT, HDR_MAGIC, ino, mode, 0, 0, 1, 0,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109 | (uintmax_t) st.st_size, 0, 0, 0, 0, namelen + 1, 0, name);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/create-image.c:188:2: warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker]
188 | fclose(fp);
| ^~~~~~~~~~
6 warnings generated.
tools/btgatt-client.c:1822:2: warning: Value stored to 'argv' is never read [deadcode.DeadStores]
1822 | argv += optind;
| ^ ~~~~~~
1 warning generated.
tools/btgatt-server.c:1204:2: warning: Value stored to 'argv' is never read [deadcode.DeadStores]
1204 | argv -= optind;
| ^ ~~~~~~
1 warning generated.
tools/check-selftest.c:42:3: warning: Value stored to 'ptr' is never read [deadcode.DeadStores]
42 | ptr = fgets(result, sizeof(result), fp);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
tools/gatt-service.c:294:2: warning: 2nd function call argument is an uninitialized value [core.CallAndMessage]
294 | chr_write(chr, value, len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~1 warning generated.
In file included from tools/obex-server-tool.c:17:
In file included from /usr/include/fcntl.h:342:/usr/include/x86_64-linux-gnu/bits/fcntl2.h:76:10: warning: Null pointer passed to 1st parameter expecting 'nonnull' [core.NonNullParamChecker]
76 | return __open_alias (__path, __oflag, __mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
client/btpclient/btpclientctl.c:402:3: warning: Value stored to 'bit' is never read [deadcode.DeadStores]
402 | bit = 0;
| ^ ~
client/btpclient/btpclientctl.c:1655:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull' [core.NonNullParamChecker]
1655 | memcpy(cp->data, ad_data, ad_len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
src/sdp-client.c:353:14: warning: Access to field 'cb' results in a dereference of a null pointer [core.NullDereference]
353 | (*ctxt)->cb = cb;
| ~~~~~~~~~~~~^~~~
1 warning generated.
src/sdpd-request.c:209:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint16_t' [unix.MallocSizeof]
209 | pElem = malloc(sizeof(uint16_t));
| ^~~~~~ ~~~~~~~~~~~~~~~~
src/sdpd-request.c:237:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint32_t' [unix.MallocSizeof]
237 | pElem = malloc(sizeof(uint32_t));
| ^~~~~~ ~~~~~~~~~~~~~~~~
2 warnings generated.
src/gatt-client.c:1569:2: warning: Use of memory after it is freed [unix.Malloc]
1569 | notify_client_unref(client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/sdp-xml.c:129:10: warning: Assigned value is uninitialized [core.uninitialized.Assign]
129 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
src/sdp-xml.c:309:11: warning: Assigned value is uninitialized [core.uninitialized.Assign]
309 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
src/sdp-xml.c:347:11: warning: Assigned value is uninitialized [core.uninitialized.Assign]
347 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
3 warnings generated.
unit/avdtp.c:756:25: warning: Use of memory after it is freed [unix.Malloc]
756 | session->prio_queue = g_slist_remove(session->prio_queue, req);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unit/avdtp.c:763:24: warning: Use of memory after it is freed [unix.Malloc]
763 | session->req_queue = g_slist_remove(session->req_queue, req);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
unit/avrcp-lib.c:1968:3: warning: 1st function call argument is an uninitialized value [core.CallAndMessage]
1968 | g_free(text[i]);
| ^~~~~~~~~~~~~~~
unit/avrcp-lib.c:3510:4: warning: Address of stack memory associated with local variable 'val' is still referred to by the caller variable 'iov' upon returning to the caller. This will be a dangling reference [core.StackAddressEscape]
3503 | struct media_item val[AVRCP_MEDIA_ATTRIBUTE_LAST];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3504 |
3505 | for (i = 0; i < number; i++) {
3506 | uint16_t len = 0;
3507 |
3508 | if (attrs[i] > AVRCP_MEDIA_ATTRIBUTE_LAST ||
3509 | attrs[i] == AVRCP_MEDIA_ATTRIBUTE_ILLEGAL)
3510 | return false;
| ^~~~~~~~~~~~
unit/avrcp-lib.c:3526:2: warning: Address of stack memory associated with local variable 'val' is still referred to by the caller variable 'iov' upon returning to the caller. This will be a dangling reference [core.StackAddressEscape]
3503 | return true;
| ^~~~~~~~~~~
3 warnings generated.
unit/test-util.c:33:8: warning: Potential leak of memory pointed to by 'p1' [unix.Malloc]
33 | p2[0] = 1;
| ~~~~~~^~~
unit/test-util.c:36:3: warning: Potential leak of memory pointed to by 'p2' [unix.Malloc]
36 | _cleanup_free_ uint8_t *data = NULL;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~./src/shared/util.h:134:24: note: expanded from macro '_cleanup_free_'
134 | #define _cleanup_free_ _cleanup_(freep)
| ^./src/shared/util.h:132:22: note: expanded from macro '_cleanup_'
132 | #define _cleanup_(f) __attribute__((cleanup(f)))
| ^unit/test-util.c:42:3: warning: Potential leak of memory pointed to by 'data' [unix.Malloc]
42 | assert(is_null_too == NULL);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/assert.h:170:11: note: expanded from macro 'assert'
170 | ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ \
| ^~~~~~~~~~~~~~~~~~~~~~~
3 warnings generated.
profiles/audio/media.c:1125:7: warning: Use of memory after it is freed [unix.Malloc]
1125 | if (req->cb != pac_select_cb) {
| ^~~~~~~
1 warning generated.
profiles/audio/avctp.c:1589:3: warning: Use of memory after it is freed [unix.Malloc]
1589 | avctp_disconnected(server->sessions->data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
profiles/audio/a2dp.c:442:8: warning: Use of memory after it is freed [unix.Malloc]
442 | if (!cb->resume_cb)
| ^~~~~~~~~~~~~
profiles/audio/a2dp.c:3390:20: warning: Access to field 'starting' results in a dereference of a null pointer (loaded from variable 'stream') [core.NullDereference]
3390 | stream->starting = TRUE;
| ~~~~~~ ^
profiles/audio/a2dp.c:3393:8: warning: Access to field 'suspending' results in a dereference of a null pointer (loaded from variable 'stream') [core.NullDereference]
3393 | if (!stream->suspending && stream->suspend_timer) {
| ^~~~~~~~~~~~~~~~~~
profiles/audio/a2dp.c:3453:22: warning: Access to field 'suspending' results in a dereference of a null pointer (loaded from variable 'stream') [core.NullDereference]
3453 | stream->suspending = TRUE;
| ~~~~~~ ^
4 warnings generated.
profiles/audio/avdtp.c:895:25: warning: Use of memory after it is freed [unix.Malloc]
895 | session->prio_queue = g_slist_remove(session->prio_queue, req);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
profiles/audio/avdtp.c:902:24: warning: Use of memory after it is freed [unix.Malloc]
902 | session->req_queue = g_slist_remove(session->req_queue, req);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
profiles/audio/avrcp.c:1934:2: warning: Value stored to 'operands' is never read [deadcode.DeadStores]
1934 | operands += sizeof(*pdu);
| ^ ~~~~~~~~~~~~
1 warning generated.
attrib/gatt.c:970:2: warning: Potential leak of memory pointed to by 'long_write' [unix.Malloc]
970 | return prepare_write(long_write);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
src/sdpd-request.c:209:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint16_t' [unix.MallocSizeof]
209 | pElem = malloc(sizeof(uint16_t));
| ^~~~~~ ~~~~~~~~~~~~~~~~
src/sdpd-request.c:237:13: warning: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'uint32_t' [unix.MallocSizeof]
237 | pElem = malloc(sizeof(uint32_t));
| ^~~~~~ ~~~~~~~~~~~~~~~~
2 warnings generated.
src/sdp-client.c:353:14: warning: Access to field 'cb' results in a dereference of a null pointer [core.NullDereference]
353 | (*ctxt)->cb = cb;
| ~~~~~~~~~~~~^~~~
1 warning generated.
src/sdp-xml.c:129:10: warning: Assigned value is uninitialized [core.uninitialized.Assign]
129 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
src/sdp-xml.c:309:11: warning: Assigned value is uninitialized [core.uninitialized.Assign]
309 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
src/sdp-xml.c:347:11: warning: Assigned value is uninitialized [core.uninitialized.Assign]
347 | buf[1] = data[i + 1];
| ^ ~~~~~~~~~~~
3 warnings generated.
src/gatt-client.c:1569:2: warning: Use of memory after it is freed [unix.Malloc]
1569 | notify_client_unref(client);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gobex/gobex-header.c:95:2: warning: Null pointer passed to 2nd parameter expecting 'nonnull' [core.NonNullParamChecker]
95 | memcpy(to, from, count);
| ^~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
gobex/gobex-transfer.c:424:7: warning: Use of memory after it is freed [unix.Malloc]
424 | if (!g_slist_find(transfers, transfer))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
mesh/main.c:162:3: warning: Value stored to 'optarg' is never read [deadcode.DeadStores]
162 | optarg += strlen("auto");
| ^ ~~~~~~~~~~~~~~1 warning generated.doc/org.bluez.LEAdvertisement.rst:176: (WARNING/2) Title underline too short.
string BroadcastName [readonly, optional] `````````````````````````````````````
Exiting due to level-2 (WARNING) system message.
make[1]: *** [Makefile:12700: doc/org.bluez.LEAdvertisement.5] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:4322: all] Error 2
https://github.com/bluez/bluez/pull/2579
---
Regards,
Linux Bluetooth
This is an automated email and please do not reply to this email.
Dear Submitter,
This series was picked up by the CI more than 2 weeks ago and the pull request created for it is still open, which means the series was never applied to the tree.
Series: org.bluez.LEAdvertisement: Add broadcast name support
Pull Request: https://github.com/bluez/bluez/pull/2579
Created: 2026-09-24 18:32:08+00:00
The pull request has been closed and no further action is taken on this series.
If the change should still be considered, it must be resent to the Linux Bluetooth mailing list ([email protected]) so that it is picked up again.
---
Regards,
Linux Bluetooth
PATCH 2/2 advertising: Add broadcast name property support
In reply to Alexander SarmanowThis update enables setting the BROADCAST_NAME property via the LEAdvertisement1 object.
--- src/advertising.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/shared/ad.h | 3 +++ 2 files changed, 47 insertions(+)
src/advertising.c +44 -0
@@ -69,6 +69,7 @@ struct btd_adv_client {char *owner;char *path;char *name; +char *bcast_name;uint16_t appearance;uint16_t duration;uint16_t timeout;
@@ -153,6 +154,7 @@ static void client_free(void *data)g_free (client->path);free (client->name); +free (client->bcast_name);free (client); }
@@ -674,6 +676,42 @@ static bool parse_local_name(DBusMessageIter *iter,return true; } +static bool parse_bcast_name (DBusMessageIter *iter, +struct btd_adv_client *client) +{ +const char *bcast_name; +size_t len; + +if (!iter) { +free (client->bcast_name); + client->bcast_name =NULL ; +return true; + } + +if (dbus_message_iter_get_arg_type (iter) !=DBUS_TYPE_STRING ) +return false; + +dbus_message_iter_get_basic (iter, &bcast_name); + + len =strlen (bcast_name); +if (len <BT_AD_BC_NAME_MIN_LEN ) { +error ("Broacast name %s too short" , bcast_name); +return false; + } + +if (len >BT_AD_BC_NAME_MAX_LEN ) { +warn ("Broacast name %s too long. Truncating..." , bcast_name); + len =BT_AD_BC_NAME_MAX_LEN ; + } + +free (client->bcast_name); + client->bcast_name =strndup (bcast_name, len); + +DBG ("Adding Broadcast Name %s to adv data" , client->bcast_name); + +return true; +} +static bool parse_appearance (DBusMessageIter *iter,struct btd_adv_client *client) {
@@ -934,6 +972,11 @@ static uint8_t *generate_adv_data(struct btd_adv_client *client,bt_ad_add_name (client->data, client->name); } +if ((client->type ==AD_TYPE_BROADCAST ) && client->bcast_name) { +bt_ad_add_data (client->data,BT_AD_BC_NAME , client->bcast_name, +strlen (client->bcast_name)); + } +return bt_ad_generate (client->data, len); }
@@ -1329,6 +1372,7 @@ static struct adv_parser { { "ServiceData", parse_service_data_ad }, { "ScanResponseServiceData", parse_service_data_sr, true }, { "Includes", parse_includes }, + { "BroadcastName", parse_bcast_name }, { "LocalName", parse_local_name }, { "Appearance", parse_appearance }, { "Duration", parse_duration },
src/shared/ad.h +3 -0
@@ -15,6 +15,8 @@#include "bluetooth/uuid.h" #define BT_AD_MAX_DATA_LEN 31 +#define BT_AD_BC_NAME_MIN_LEN 4 +#define BT_AD_BC_NAME_MAX_LEN 32#define BT_EA_MAX_DATA_LEN 251#define BT_PA_MAX_DATA_LEN 252
@@ -60,6 +62,7 @@#define BT_AD_MESH_DATA 0x2a#define BT_AD_MESH_BEACON 0x2b#define BT_AD_CSIP_RSI 0x2e +#define BT_AD_BC_NAME 0x30#define BT_AD_3D_INFO_DATA 0x3d#define BT_AD_MANUFACTURER_DATA 0xff
Signature · 1 line
2.30.2
Luiz Augusto von Dentz
maintainerHi Alexander,
Quoted 22 lines · Alexander Sarmanow
From: Alexander Sarmanow (Televic) <[email protected]>
This series adds dedicated support for setting the broadcast name via DBus to the org.bluez.LEAdvertisement object. Should make it easier for upper layers to set this advertisement property.
The Public Broadcast Profile (PBP v1.0, see section 5.1.1) restricts the string length to a minimum of 4 and a maximum of 32 characters. If the provided name is shorter than the minimum, pasring returns an error.If it exceeds the maximum, it is truncated, consistent with the behavior for the local name.
The BroadcastName property will be parsed in any case, but only added to the advertisement data in case it's of type broadcast.
Tested by setting a broadcast name via pipewire bluez spa plugin.
Alexander Sarmanow (2):
doc/org.bluez.LEAdvertisement: Add broadcast name
advertising: Add broadcast name property support
Quoted 7 lines
doc/org.bluez.LEAdvertisement.rst | 7 +++++ src/advertising.c | 44 +++++++++++++++++++++++++++++++ src/shared/ad.h | 3 +++ 3 files changed, 54 insertions(+)--
2.30.2
This is already supported on bluetoothctl; see:
commit 278f3439c45ffcb1309f9fe961be1b120bdde459
Author: raghavendra <[email protected]> Date: Wed Apr 29 13:16:05 2026 +0530
client: make advertise.name use public broadcast name
Now it doesn't seem to have the string limits you pointed out, so perhaps it is worth extending it. We could, in theory move the detection of the PBP uuid to bluetoothd and then automatically use the advertising name as the broadcast name, or if the name is included, use the adapter name as the broadcast name. However, that is sort of client business, I'd say, which is why we left it at bluetoothctl.
Signature · 1 line
Luiz Augusto von Dentz
Hi Luiz,
thank you for your quick reply.
Quoted 1 line
This is already supported on bluetoothctl; see:
I was aware of the blutoothctl implementation, but my motiviation came from pipewire where to my knowledge no such mechanism is existing yet and thought it would be nice to shift it to bluetoothd. However I understand your perspective of what's the role of the client!
Quoted 3 lines
Now it doesn't seem to have the string limits you pointed out, so perhaps it is worth extending it. We could, in theory move the detection of the PBP uuid to bluetoothd
I will take a look on both the extension of the string limits and moving the PBP UUID detection to the daemon.
Thanks for your time.
Best,
Alexander