Merge pull request #907 from zxzxwu/example-gatt-client-and-server

Advertise in run_gatt_client_and_server
This commit is contained in:
Josh Wu
2026-04-13 16:31:19 +08:00
committed by GitHub

View File

@@ -83,6 +83,7 @@ async def main() -> None:
GATT_DEVICE_INFORMATION_SERVICE, [manufacturer_name_characteristic] GATT_DEVICE_INFORMATION_SERVICE, [manufacturer_name_characteristic]
) )
server_device.add_service(device_info_service) server_device.add_service(device_info_service)
await server_device.start_advertising()
# Connect the client to the server # Connect the client to the server
connection = await client_device.connect(server_device.random_address) connection = await client_device.connect(server_device.random_address)