Fix for broadcast mode, not to add any AD flags in advertise Data
PATCH 1/1 Fix for broadcast mode, not to add any AD flags in advertise Data
From: Prathibha Madugonde <[email protected]>
src/advertising.c
Include check for broadcast mode:
Need not set flags in AD flags of Advertise Data
Test steps:
From DUT, bluetoothctl go to menu advertise
secondary 1M/2M
name on
back
advertise broadcast
--- src/advertising.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
src/advertising.c +6 -1
@@ -759,10 +759,15 @@ static bool parse_discoverable(DBusMessageIter *iter,dbus_message_iter_get_basic (iter, &discoverable); +/* For broadcast mode, need not add any flags +* just return true without adding flags. +*/ if (discoverable) flags =BT_AD_FLAG_GENERAL ; -else +else if (client->type !=AD_TYPE_BROADCAST ) flags =0x00 ; +else +return true;if (!set_flags (client , flags)) goto fail;
Signature · 1 line
2.17.1
Luiz Augusto von Dentz
maintainerHi,
Quoted 6 lines · On Wed, Nov 20, 2024 at 10:00 AM <[email protected]> wrote:
From: Prathibha Madugonde <[email protected]>
src/advertising.c
Include check for broadcast mode:
Need not set flags in AD flags of Advertise Data
Please reword the last sentence to something like: "AD flags shall never be set for broadcast", also add traces showing what is happening.
Quoted 6 lines
Test steps:
From DUT, bluetoothctl go to menu advertise
secondary 1M/2M
name on
back
advertise broadcast
In case you don't know it, it is possible to call command from submenus directly:
advertise.secondary 1M/2M
advertise.name on
advertise broadcast
Quoted 29 lines
--- src/advertising.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)src/advertising.c +6
-2@@ -759,10 +759,15 @@ static bool parse_discoverable(DBusMessageIter *iter,dbus_message_iter_get_basic (iter, &discoverable); +/* For broadcast mode, need not add any flags +* just return true without adding flags. +*/ if (discoverable) flags =BT_AD_FLAG_GENERAL ; -else +else if (client->type !=AD_TYPE_BROADCAST ) flags =0x00 ; +else +return true;if (!set_flags (client , flags)) goto fail; --2.17.1
Signature · 1 line
Luiz Augusto von Dentz
Quoted 6 lines · Luiz Augusto von Dentz
Hi,
Quoted 3 lines · On Wed, Nov 20, 2024 at 10:00 AM <[email protected]> wrote:
From: Prathibha Madugonde <[email protected]>
Quoted 8 lines
Quoted 3 lines
src/advertising.c
Include check for broadcast mode:
Need not set flags in AD flags of Advertise DataPlease reword the last sentence to something like: "AD flags shall never be set for broadcast", also add traces showing what is happening.
Thanks Luiz for the input, re-framing the sentence and sending in upcoming patch.
Below is the snippet of btmon logs for advertise broadcast failure.
*****************************
@ MGMT Command: Add Extended Advertising Data (0x0055) plen 22
{0x0001} [hci0] 160.010453
Instance: 1
Advertising data length: 3
Flags: 0x04
BR/EDR Not Supported
Scan response length: 8
Name (complete): prathm
@ MGMT Event: Advertising Added (0x0023) plen 1
{0x0002} [hci0] 160.010474
Instance: 1Quoted 1 line
HCI Event: Command Complete (
0x0e) plen 4
#46 [hci0] 160.010849
LE Set Extended Advertising Data (0x08|0x0037) ncmd 2
Status: Invalid HCI Command Parameters (0x12)*******************************
Quoted 7 lines
Quoted 6 lines
Test steps:
From DUT, bluetoothctl go to menu advertise
secondary 1M/2M
name on
back
advertise broadcast
Quoted 7 lines
In case you don't know it, it is possible to call command from submenus directly:
advertise.secondary 1M/2M
advertise.name on
advertise broadcast
Got it. Thank you for info.
Thanks
Prathibha
Quoted 31 lines
Quoted 29 lines
--- src/advertising.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)src/advertising.c +6
-2@@ -759,10 +759,15 @@ static bool parse_discoverable(DBusMessageIter *iter,dbus_message_iter_get_basic (iter, &discoverable); +/* For broadcast mode, need not add any flags +* just return true without adding flags. +*/ if (discoverable) flags =BT_AD_FLAG_GENERAL ; -else +else if (client->type !=AD_TYPE_BROADCAST ) flags =0x00 ; +else +return true;if (!set_flags (client , flags)) goto fail; --2.17.1
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/project/bluetooth/list/?series=911300
---Test result---
Test Summary:
CheckPatch PENDING 0.16 seconds GitLint PENDING 0.26 seconds BuildEll PASS 20.47 seconds BluezMake PASS 1738.71 seconds MakeCheck PASS 13.48 seconds MakeDistcheck PASS 162.46 seconds CheckValgrind PASS 217.29 seconds CheckSmatch PASS 276.36 seconds bluezmakeextell PASS 101.82 seconds IncrementalBuild PENDING 0.37 seconds ScanBuild PASS 865.73 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth