summaryrefslogtreecommitdiff
path: root/examples/bluetooth/ble_advertising.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/bluetooth/ble_advertising.py')
-rw-r--r--examples/bluetooth/ble_advertising.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/bluetooth/ble_advertising.py b/examples/bluetooth/ble_advertising.py
index a49611996..eed527f55 100644
--- a/examples/bluetooth/ble_advertising.py
+++ b/examples/bluetooth/ble_advertising.py
@@ -47,7 +47,8 @@ def advertising_payload(limited_disc=False, br_edr=False, name=None, services=No
_append(_ADV_TYPE_UUID128_COMPLETE, b)
# See org.bluetooth.characteristic.gap.appearance.xml
- _append(_ADV_TYPE_APPEARANCE, struct.pack("<h", appearance))
+ if appearance:
+ _append(_ADV_TYPE_APPEARANCE, struct.pack("<h", appearance))
return payload