python-ble-scanner.py
Python script using the Bleak library to detect nearby BLE devices.
Requires Python 3 and the 'bleak' library. The HL9 exposes its Bluetooth interface via the internal bus. Run with sudo if radio access permissions are needed. Useful for identifying asset tags.
python-ble-scanner.py
import asyncio
from bleak import BleakScanner
async def main():
print("Scanning for BLE devices...")
devices = await BleakScanner.discover(timeout=10.0)
for d in devices:
print(f"{d.address}: {d.name}")
if __name__ == "__main__":
asyncio.run(main())