Turns out it's not trivial to test this. Bluetooth LE support was only added in Android 4.3, so my old Android 4.0 phone won't do it!
However as you suggest, by trying to connect loads of times I can eventually trigger this - and I have now fixed the issue you were having. It was actually an error in Nordic's connection negotiation library - it looks like it it doesn't like it if you disconnect at just the right time during the connection.
A build with the fix in should soon be available at:
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Turns out it's not trivial to test this. Bluetooth LE support was only added in Android 4.3, so my old Android 4.0 phone won't do it!
However as you suggest, by trying to connect loads of times I can eventually trigger this - and I have now fixed the issue you were having. It was actually an error in Nordic's connection negotiation library - it looks like it it doesn't like it if you disconnect at just the right time during the connection.
A build with the fix in should soon be available at:
http://www.espruino.com/binaries/travis/10d203a64892263b7c9ac95758b291fd7166080c