We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0c4011 commit 293471fCopy full SHA for 293471f
main.py
@@ -28,14 +28,11 @@ async def read_sensor():
28
29
async def communicate_readings():
30
print("Constructing advertising payload")
31
- while True:
32
- async with await aioble.advertise(
33
- BLE_ADV_INTERVAL_uS,
34
- adv_data = bthome.pack_advertisement(bthome.TEMPERATURE_SINT16, bthome.HUMIDITY_UINT16)
35
- ) as connection:
36
- print("Client connect:", connection.device)
37
- await connection.disconnected(timeout_ms=None)
38
- print("Client disconnect.")
+ await aioble.advertise(
+ BLE_ADV_INTERVAL_uS,
+ adv_data = bthome.pack_advertisement(bthome.TEMPERATURE_SINT16, bthome.HUMIDITY_UINT16),
+ connectable = False
+ )
39
40
41
async def main():
0 commit comments