B4R Question constant rebooting ESP32 when calling the WifiServerSocket.listen command

sorex

Expert
Licensed User
Longtime User
Hello,

For some reason my ESP32 (lolin32 lite) goes in an endless reboot loop from the moment I call the listen command of the wifiserversocket.

Anyone else here with such device that has this working right?

B4X:
Dim ss As WiFiServerSocket
ss.Initialize("666","ss_NewConnection")
ss.Listen  ' <- commenting this stops the rebooting


Sub ss_NewConnection (NewSocket As WiFiSocket)
'Log("ns",NewSocket.RemoteIp)
End Sub

B4X:
wifi connected:1
wifi ip:192.168.53.168
Guru Meditation Error: Core  1 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x00000007  PS      : 0x00060830  A0      : 0x800d1eaa  A1      : 0x3ffb1f50 
A2      : 0x3ffc1094  A3      : 0x3ffb1eac  A4      : 0x401407b8  A5      : 0x0000029a 
A6      : 0x7ff00000  A7      : 0x7ff4d000  A8      : 0x800d1e61  A9      : 0x3ffb1f30 
A10     : 0x00000001  A11     : 0x3ffb1e20  A12     : 0x3ffc1628  A13     : 0x3ffb1da0 
A14     : 0x00000002  A15     : 0x00000014  SAR     : 0x0000001b  EXCCAUSE: 0x00000014 
EXCVADDR: 0x00000004  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff 
Backtrace: 0x00000007:0x3ffb1f50 0x400d1ea7:0x3ffb1f70 0x400d2402:0x3ffb1f90 0x400d4b09:0x3ffb1fb0 0x40088b7d:0x3ffb1fd0
Rebooting...
ets Jun  8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5816
entry 0x400806ac
AppStart
Firmware Version: 0x92 = v2.0
wifi connected:1
wifi ip:192.168.53.168
Guru Meditation Error: Core  1 panic'ed (InstrFetchProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x00000007  PS      : 0x00060830  A0      : 0x800d1eaa  A1      : 0x3ffb1f50 
A2      : 0x3ffc1094  A3      : 0x3ffb1eac  A4      : 0x80088d90  A5      : 0x3ffb1e70 
A6      : 0x00000000  A7      : 0x3ffb0060  A8      : 0x800d1e61  A9      : 0x3ffb1f30 
A10     : 0x00000001  A11     : 0x00000001  A12     : 0x00000005  A13     : 0x00000020 
A14     : 0x00000020  A15     : 0x00000014  SAR     : 0x0000001b  EXCCAUSE: 0x00000014 
EXCVADDR: 0x00000004  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff 
Backtrace: 0x00000007:0x3ffb1f50 0x400d1ea7:0x3ffb1f70 0x400d2402:0x3ffb1f90 0x400d4b09:0x3ffb1fb0 0x40088b7d:0x3ffb1fd0
Rebooting...
 

sorex

Expert
Licensed User
Longtime User
indeed, good catch.

but it still keeps rebooting after modifying that.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
ok, I figured it out.

I had declared my websocket object in the appstart sub.

It has to be in Process_Globals or it freaks out. Probably because it can't access it on call backs as it was already removed when the sub ended.
 
Upvote 0
Top