BLE disconnects when setting breakpoints

4 posts / 0 new
Last post
gcblair
Offline
Last seen:4 years 9 months ago
Master
Joined:2014-09-08 10:21
BLE disconnects when setting breakpoints

这可能听起来很奇怪,但我有一个问题if I set or unset a breakpoint anywhere in my code (even somewhere where the breakpoint doesn't get hit) the BLE disconnects.

I have managed to reproduce this every single time I try to set a breakpoint. The breakpoint doesn't need to even hit, if I set or unset it the BLE will disconnect.

Any idea what could cause this problem?

Device:
MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
Joined:2015-06-08 11:34
Hi gcblair

Hi gcblair

When connected and the breakpoint hits, its normal behaviour since the connection losses connection interval. Also if the breakpoint doesn't hit is also normal. When a breakpoint is inserted the debbuger enters a delay into the system, therefore the system looses synchronization with the central. You can go around that if you set your breakpoint before debbugging or before the connection with the central is made.

Thanks MT_dialog

gcblair
Offline
Last seen:4 years 9 months ago
Master
Joined:2014-09-08 10:21
hi MT_dialog,

hi MT_dialog,

I'm glad there is an explanation for it. I never encountered this problem before I think. It could be that I recently added more code to read RFID tags which added more delays etc.

Is there any way to avoid this happening? Sometimes its really useful to be able to set breakpoints whilst connected (even if they don't hit straight away).

I tried increasing the connection interval but with iOS devices it just won't increase past about 40ms - any ideas? To stop disconnections I had to increase the Link supervision timeout to 1s

MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
Joined:2015-06-08 11:34
Hi gcblair

Hi gcblair

Sorry, there is no way as far as we know, to limit the delay the debbuger inputs to the system, after that you should implement different test cases in order to debug your code.

Thanks MT_dialog