format (+3 squashed commits)

Squashed commits:
[60e610f] wip
[eeab73d] wip
[3cdd5b8] basic first pass
This commit is contained in:
Gilles Boccon-Gibod
2023-12-18 09:49:57 -08:00
parent 071fc2723a
commit d3273ffa8c
11 changed files with 1118 additions and 577 deletions
+13 -1
View File
@@ -19,9 +19,11 @@ import asyncio
import logging
import sys
import os
import struct
from bumble.core import AdvertisingData
from bumble.device import AdvertisingType, Device
from bumble.hci import Address
from bumble.transport import open_transport_or_link
@@ -52,6 +54,16 @@ async def main():
print('<<< connected')
device = Device.from_config_file_with_hci(sys.argv[1], hci_source, hci_sink)
if advertising_type.is_scannable:
device.scan_response_data = bytes(
AdvertisingData(
[
(AdvertisingData.APPEARANCE, struct.pack('<H', 0x0340)),
]
)
)
await device.power_on()
await device.start_advertising(advertising_type=advertising_type, target=target)
await hci_source.wait_for_termination()