Sampling failed: Timeout when waiting

I have switched to using WebUSB to record audio samples and on three consecutive occasions after recording exactly 6 samples in a row it hangs on “Sampling… (1s left)” and the Nano 33 BLE Sense is then alternating a slow/rapid blink with the orange LED. Following which there is an alert informing of a timeout at 140 seconds.

sampling_failed

This is a new board that I don’t believe has been subjected to ESD. I am not entirely sure if this is a bug or something on my end. If it is the latter I would greatly appreciate some troubleshooting help. Please let me know if there is any additional information I could provide.

Hi @datameta,

Which sample length are you using? Also could you try the beta firmware provided in this post: Browser Crash When Using WebUSB and Nano33?

If you still reproduce the issue it would be great to get the logs from the console (Chrome -> View -> Developer -> Javascript Console).

Thanks,
Aurelien

@datameta If you have screen or another serial terminal application, could you open a connection (e.g. screen /dev/tty.usbm then press TAB on macOS, if you have another OS let me know) and run:

> AT+SAMPLESETTINGS=test,0.0625,6000
OK
> AT+SAMPLESTART=Built-in microphone
Sampling settings:
        Interval: 0.06250 ms.
        Length: 6000 ms.
        Name: test
        HMAC Key: please-set-me
        File name: /fs/test
Starting in 4140 ms... (or until all flash was erased)
Sampling...
Done sampling, total bytes collected: 192512
[1/1] Uploading file to Edge Impulse...
Not uploading file, not connected to WiFi. Used buffer, from=0, to=192756.
[1/1] Uploading file to Edge Impulse OK (took 0 ms.)
OK
> 

Wonder if there’s a message there. The blinking LEDs is hardfault, which errors are not printed over USB, so might very well that there’s nothing…

Hi @aurel, I’m using an 11 second sample length. I went ahead and tried the beta firmware - unfortunately it failed under the same conditions: (at / before?) upload of 6th consecutive 11 second sample.
Here is the console log: https://pastebin.com/ajKyEspi

Hi @janjongboom. I’m on Win10 and I could use RealTerm. What commands shall I run?

@datameta,

Is it always after the 6th sample that it fails? Even if you change the sampling length?
From the start of your first sampling and the timeout error. Is it possible that it the elapsed time was around 140 seconds? If so, I suspect that the timeout is not reset at the beginning of the sampling.

I tried to have a deeper look at https://github.com/edgeimpulse/edge-impulse-cli/blob/b3d44200ca29a5925e41c76f5f99db484c93e1a5/shared/daemon/ei-serial-protocol.ts#L809

But I haven’t seen anything strange so far.

Regards,

@louis, I have now tried 6x 22s samples spread out over a period of 25 minutes, and also 6 consecutive 1s samples. Surprisingly, the 6th sample failed for both tests… Given that it looks so predictable I can work around the issue but if there’s any way I can help diagnose this I am willing and curious.

Edit: I’ve encountered a 6th sample fail in serial recording as well. However it may be sheer coincidence since in serial it I could also make well over a dozen 1-3s samples before a hard fault occurred