import asyncio
from bleak import BleakClient
# address = "24:71:89:cc:09:05"
address = "54:6C:0E:53:35:F1"
MODEL_NBR_UUID = "00002a24-0000-1000-8000-00805f9b34fb"
# MODEL_NBR_UUID ='F000XXXX-0451-4000-B000-000000000000'
async def main(address):
async with BleakClient(address) as client:
model_number = await client.read_gatt_char(MODEL_NBR_UUID)
print("Model Number: {0}".format("".join(map(chr, model_number))))
asyncio.run(main(address))
版权声明:本文为weixin_43012796原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。