-
-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with NRF.setScan() on ESP32 #2138
Comments
I'm afraid Bluetooth support on ESP32 is pretty flakey right now. PRs would be hugely appreciated for it :) |
Small update. Sometimes setScan() thread stopts with MEMORY_BUSY error when I use filters, such as {filters:[{ serviceData:{'f000':{}} }]}...
|
This is now fixed |
Excellent - thanks! |
This will still cause unexpected errors if the number of scans isn't limited! Check this sample: http://www.espruino.com/Reference#l_NRF_setScan // called in an environmet with lots of ble devices, reboots after 210 outputs
NRF.setScan(function(d) {
console.log(d);
})
.......
BluetoothDevice: {
"id": "28:11:a5:a5:37:ae",
"rssi": -80,
"data": new Uint8Array([2, 1, 26, 3, 3, 190, 254, 7, 255, 16, 3, 64, 10, 1, 16]).buffer,
"manufacturer": 784,
"manufacturerData": new Uint8Array([]).buffer
}
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x401e95d7 PS : 0x00060630 A0 : 0x8011a087 A1 : 0x3ffe9cd0
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x00000030 A7 : 0x00000030 A8 : 0x3ffccdc4 A9 : 0x00000001
A10 : 0x00000000 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00000000
A14 : 0x00000001 A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000007 LBEG : 0x4009230c LEND : 0x40092328 LCOUNT : 0xffffffff
ELF file SHA256: 0000000000000000
Backtrace: 0x401e95d4:0x3ffe9cd0 0x4011a084:0x3ffe9cf0 0x4013ae1a:0x3ffe9d10 0x4011c133:0x3ffe9d40 0x40120051:0x3ffe9dc0 0x4011d589:0x3ffe9ed0 0x4011d685:0x3ffe9f00 0x4011d734:0x3ffe9f20 0x4011db3b:0x3ffe9f40 0x4011db4f:0x3ffe9f60 0x4011db5f:0x3ffe9f80 0x4011e83c:0x3ffe9fa0 0x4011edf4:0x3ffe9fc0 0x4011efd0:0x3ffe9fe0 0x401204f8:0x3ffea000 0x40120b4c:0x3ffea0c0 0x4014d0eb:0x3ffea100 0x4011c133:0x3ffea180 0x40120051:0x3ffea200 0x40120b4c:0x3ffea2e0 0x401224a4:0x3ffea320 0x40122570:0x3ffea350 0x401225db:0x3ffea390 0x401244a1:0x3ffea3b0 0x4012463d:0x3ffea460 0x40133d50:0x3ffea480
Rebooting... Edit: This was running on ESP32 with esp-idf 3.3.6 |
Interesting, thanks! I guess that's some kind of buffer overflow then? Does:
Fail for you? eg if it can handle the devices fast enough, does it still break? |
This simple function always halts with different reasons. Usually last received packet contains zero ID and impossible RSSI. Also filters (and another versions of SW) does not affect result - it always halts.
Some times I see this and function just stopts.
or this
Sometimes ESP32 reboots by WDT
The text was updated successfully, but these errors were encountered: