Skip to content

Commit 834b482

Browse files
jxltomdpgeorge
authored andcommitted
examples/bluetooth: Fix incorrect value of BR/EDR flag in advertising.
According to Supplement to the Bluetooth Core Specification v8 Part A 1.3.1, to support BR/EDR the code should set the fifth bit (Simultaneous LE and BR/EDR to Same Device Capable (Controller)) and fourth bit (Simultaneous LE and BR/EDR to Same Device Capable (Host)) of the flag.
1 parent 8b7ae4e commit 834b482

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/bluetooth/ble_advertising.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _append(adv_type, value):
3030

3131
_append(
3232
_ADV_TYPE_FLAGS,
33-
struct.pack("B", (0x01 if limited_disc else 0x02) + (0x00 if br_edr else 0x04)),
33+
struct.pack("B", (0x01 if limited_disc else 0x02) + (0x18 if br_edr else 0x04)),
3434
)
3535

3636
if name:

0 commit comments

Comments
 (0)