I tried to look for complete examples that could help me with the development of the app but on the net I found only parts of code not linked to each other. Is it possible to see a complete example of connection including the communication part between the 2 devices? Also I happen to have a problem with the nRF Connect app: the bluetooth automatically disconnects from the device after about 30 seconds, why?
BLE complete example link to github - contains Android, iOS, ESP32 - 2 apps for each platform, Central and Peripheral. Each Central is compatible with each Peripheral.
This is a great guide: The Ultimate Guide to Android Bluetooth Low Energy by PunchThrough.
About your second question (that automatic disconnection occurs), I remember I've noticed similar disconnections on iOS, but didn't find out the reason. I also noticed that after subscribing to a characteristic notifications/indications it's not disconnecting anymore, that's why I guess it could be operating system optimization for the inactive connections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With