NordicSemiconductor / Android-BLE-Library

A library that makes working with Bluetooth LE on Android a pleasure. Seriously.
BSD 3-Clause "New" or "Revised" License
2.03k stars 417 forks source link

[Test app] Test app starts testing with first connected device #488

Open philips77 opened 1 year ago

philips77 commented 1 year ago

I have a watch connected to my phone. When I run the test app and select Advertise it sets up the GATT server and even before it starts advertising the server will immediately receive onConnectionStateChange event for the connected watch. The app displays Service Discovery and Device Connected as success and nothing happens afterwards.

I have to disconnect all BLE devices before starting the test as server. Otherwise the test is started with the device that was first reported.

philips77 commented 1 year ago

Ideally, the client impl should also have a GATT service (which may be empty) and the server should verify that the service is there. Otherwise it shall ignore the connection and wait for another one.