Hmm, that's a pain. Are you staying connected to the Bangle as well during this?
If so it might be there's just too much BLE traffic (the UART connection will be in high speed mode so 7.5ms) - you could try NRF.setConnectionInterval(100) which will slow down the BLE communication speed, which might give a bit more room for other things.
I checked those disconnected codes, and:
8 = BLE_HCI_CONNECTION_TIMEOUT
62 = BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED
Which is what it's saying when connecting I guess too - the connection timeout usually happens when the Bangle doesn't see a few bluetooth packets from the device, and then it decides it's lost the connection.
I have just pushed a new update, so if you try the cutting edge firmware now, does it work any better? I increased the 'slave latency' which as I understand it is the number of missing Bluetooth events Bangle.js is willing to put up with.
which definitely makes sense to try and reduce the amount of connection events per second that need to be handled, but I guess it might be causing connection issues if the sensor isn't happy doing exactly 100ms. You could try:
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.
Hmm, that's a pain. Are you staying connected to the Bangle as well during this?
If so it might be there's just too much BLE traffic (the UART connection will be in high speed mode so 7.5ms) - you could try
NRF.setConnectionInterval(100)
which will slow down the BLE communication speed, which might give a bit more room for other things.I checked those disconnected codes, and:
Which is what it's saying when connecting I guess too - the connection timeout usually happens when the Bangle doesn't see a few bluetooth packets from the device, and then it decides it's lost the connection.
I have just pushed a new update, so if you try the cutting edge firmware now, does it work any better? I increased the 'slave latency' which as I understand it is the number of missing Bluetooth events Bangle.js is willing to put up with.
I also notice you're doing:
which definitely makes sense to try and reduce the amount of connection events per second that need to be handled, but I guess it might be causing connection issues if the sensor isn't happy doing exactly 100ms. You could try:
and see if that helps?