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.
This commit is contained in:
jxltom 2020-05-09 14:34:15 +08:00 committed by Damien George
parent 8b7ae4e099
commit 834b482e67

View File

@ -30,7 +30,7 @@ def advertising_payload(limited_disc=False, br_edr=False, name=None, services=No
_append( _append(
_ADV_TYPE_FLAGS, _ADV_TYPE_FLAGS,
struct.pack("B", (0x01 if limited_disc else 0x02) + (0x00 if br_edr else 0x04)), struct.pack("B", (0x01 if limited_disc else 0x02) + (0x18 if br_edr else 0x04)),
) )
if name: if name: