diff options
author | jxltom <jxltom@gmail.com> | 2020-05-09 14:34:15 +0800 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-06-05 14:24:09 +1000 |
commit | 834b482e67ebb1b9ad250d62ddfa1275824a7e19 (patch) | |
tree | c481d0d8a70e2fc22f54ad19d12bc9b9657cf3e9 | |
parent | 8b7ae4e099c18d839d1999c49dd8a1795bf9d1ae (diff) |
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.
-rw-r--r-- | examples/bluetooth/ble_advertising.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/bluetooth/ble_advertising.py b/examples/bluetooth/ble_advertising.py index 3fb1281f6..a49611996 100644 --- a/examples/bluetooth/ble_advertising.py +++ b/examples/bluetooth/ble_advertising.py @@ -30,7 +30,7 @@ def advertising_payload(limited_disc=False, br_edr=False, name=None, services=No _append( _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: |