Connect establish with smartfone in peripherial mode. SDK13. S132. Periodic I observe disconnect, than 2-3 advertise packet and new connect again. Where can I see what reason of those disconnect? And how to fix it?
Connect establish with smartfone in peripherial mode. SDK13. S132. Periodic I observe disconnect, than 2-3 advertise packet and new connect again. Where can I see what reason of those disconnect? And how to fix it?
If mobile device (Android?:) is GAP Central you can easily experience bugs in low-level BLE stack, there are thousands of devices and order of magnitude more bugs... If you really want to spend your time with that one device (unless you see the same problem with many others including some well-known reference devices like big-brands' flag ships) then you need to make some BLE trace with sniffer, probably many of them and probably with more expensive device then just Nordic sniffer (but you can start with it and maybe you get lucky).
Do you mean that this bug should just fixed by crutch in nRF? I catched reason.
#define BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION 0x13 /**< Remote User Terminated Connection. */
Does this mean that android sent disconnect?
Sorry, I don't understand this last comment at all.
I catch reason of disconnect. Yes, it is android. The reason is 0x13 - Remote user terminated connection. Do You suggest fix this bug on nRF52 side? Despite that problem, as I understand, on android side? Or this possible on nRF side?
I'm not convinced it is a bug on any side before seeing the radio trace. Without seeing what is happening you can only half-blindly guess (more or less what you do now). If Android API claims to the app that remote host disconnected on LL than you might be doping it in nRF5x FW. Try to debug all BLE events coming to the app and all SD calls you issue. From the sequence you might see when and why you invoke LL_TERMINATE (it should not come out of SoftDevice just like that, there should be request from application level).