问题
When I try to reconnect, immediate and automatic [disconnect-connect-disconnect-...] happens before they truly connect and read/write/subscribe.
PC: Windows10(1903), using CSR 4.0 dongle + UWP app for BLE pairing/connection
Mobile: LG V40, Galaxy Note5, LG X Power, Galaxy S9+, Galaxy S10
V40 ALMOST ALWAYS: automatic quick discon-con happens 10 times or more
S10 ALMOST ALWAYS: similar to V40. *First connection (step 3 below) doesn't work. Takes forever to find the services that I get timeout disconnect.
Note5 HALF OF THE TIME: similar to V40
The above 3 devices sometimes never truly connects (I waited 70 times and just disconnected by myself)
X Power SOMETIMES: usually less than 10 times
S9+ RARELY: similar to X Power
Here are the etl files I traced bluetooth logs.
- Please refer to V40 and Note5 logs (IGNORE X Power; I traced it for different issue)
I want to know if mobile does it or PC does it or both and HOW TO FIX THIS ISSUE (if I can...)
Any help is appreciated!!
More Info. Just in Case:
Client(PC) searches for the Server(Mobile)
Pair
Connect (reading/writing/subscribing notification works PERFECTLY)
Disconnect (Unsubscription done before disposing)
Connect (automatic and quick [discon-con-discon-con-discon-...] happens before they truly connect that PC can write/subscribe so on)
来源:https://stackoverflow.com/questions/59062163/automatic-ble-disconnect-connect-windows10-android