Ahh, yes - that's probably due to a large number of advertisements coming in - more than can be handled by your code at one time. That will often end up causing a FIFO_FULL error message as well.
I'm very surprised that just calling NRF.setScan() doesn't stop scanning and return things to normal though.
Are you just trying to connect to a single device with a known ID? If so, why not just call NRF.connect(addr) every so often? If the device isn't there then it'll just error.
or, you could use NRF.requestDevice, which will do the scanning and checking for you automatically. While in 1v99 it's not much different to findDevices, in the latest versions of the firmware it's much faster and more efficient.
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.
Ahh, yes - that's probably due to a large number of advertisements coming in - more than can be handled by your code at one time. That will often end up causing a FIFO_FULL error message as well.
I'm very surprised that just calling
NRF.setScan()
doesn't stop scanning and return things to normal though.Are you just trying to connect to a single device with a known ID? If so, why not just call
NRF.connect(addr)
every so often? If the device isn't there then it'll just error.or, you could use
NRF.requestDevice
, which will do the scanning and checking for you automatically. While in 1v99 it's not much different to findDevices, in the latest versions of the firmware it's much faster and more efficient.