Open PaulZC opened 3 weeks ago
@nseidle @LeeLeahy2 :
Before I dive into trying to fix this, is it time to remove the dedicated Configure-Via-Ethernet mode? We had to add that back in the day when the AsyncWebServer needed exclusive access to Ethernet (SPI and Interrupts) to function without crashing. But with the new core and proper support for the W5500, is it time to remove the dedicated mode?
OK. Issue found... We have bad code here:
index
has gone out of scope when networkMulticastDNSStart(index)
is called. I guess the intent was networkMulticastDNSStart(startIndex)
?
Humm. I've tried adding that fix. The crash has gone, but now both Configure-Via-Ethernet and Web Config / WiFi Config are misbehaving... This may be beyond my pay grade...
Starting from today's release_candidate:
Replace line 792 in Network.ino with: networkMulticastDNSStart(startIndex)
Compile and upload
Disconnect Ethernet
Remove the cellular SIM
Factory reset
Firmware has no WiFi SSIDs
EVK is in Rover mode
Wait for Starting Cellular
Wait more to allow the SIM check to fail
Put the firmware into WiFi Config mode
Connect my PC to to RTK Config
Open 192.168.4.1. It loads... So far so good.
Wait a bit. Then boom:
STATE_WIFI_CONFIG_NOT_STARTED --> STATE_WIFI_CONFIG, 2024-10-31 08:18:30.493
notFound: Client:192.168.4.2 /connecttest.txt
notFound: Client:192.168.4.2 /connecttest.txt
notFound: Client:192.168.4.2 /src/bootstrap.min.js.map
notFound: Client:192.168.4.2 /src/bootstrap.bundle.min.js.map
notFound: Client:192.168.4.2 /src/bootstrap.min.css.map
Error: Please enter at least one SSID before using WiFi
E (243596) wifi:NAN WiFi stop
httpd_ws_recv_frame failed to get frame len with -1
WiFi Off
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x400ea197 PS : 0x00060430 A0 : 0x800fd5b9 A1 : 0x3ffd2640
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x3ffc87ac A7 : 0x3ffd269c A8 : 0x80137bf8 A9 : 0x3ffd2680
A10 : 0x0003a139 A11 : 0x00000000 A12 : 0x0000a139 A13 : 0x00003ec0
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x0000000a EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x4008544d LEND : 0x40085455 LCOUNT : 0x00000027
Backtrace: 0x400ea194:0x3ffd2640 0x400fd5b6:0x3ffd26c0 0x40105acd:0x3ffd2740 0x4013a340:0x3ffd2760
ELF file SHA256: dddbcb80d0bca83b
Rebooting...
ets Jul 29 2019 12:21:46
I think the critical bit is the SSID check. When the SSID check finds no SSIDs, it has a hissy fit and turns WiFi off. Except WiFi is running in AP mode, and the PC is connected. And it goes boom.
Yeah. I think it is this code. It doesn't respect that WiFi may be running in AP mode - where it doesn't need SSIDs.
I'm seeing a crash when Configure via Ethernet mode is started: