Hello,
I’m using a Tracker One to connect to BLE tags and read / write their characteristics. Everything is working fine, however I noticed that the connexion process is very long (10 - 15s depending on the tag’s advertising interval). After investigation it appears that the majority of delay is caused by the characteristics discovery phase, especially for the custom services of this tag (≃ 7s).
This delay seems quite excessive, is there a setting or something I missed ? Or maybe is there a way to directly read a specific characteristic without discovering everything ?
Thank you
You do not need to discover characteristics. Normally you'd use getCharacteristicByUUID() to on the BlePeerDevice object after connecting to read or write the value.
Thanks for the quick answer !
I tried to set the automatic flag of BLE.connect() to false and directly call getCharacteristicByUUID() but it doesn’t seems to find it without calling discoverAllCharacteristics() beforehand, which is the source of my delay.
Sorry, you're right, you can't actually get the characteristic unless you use automatic discovery on connect or discoverAllCharacteristics. There's no way to work around that.
I suspect that it's slow because the tag limits the speed it responds to requests, but that's just a guess.
Okay thank you, I’ll also try to dig on the peripheral side to see if I can find the source of this delay.