Hello, I'm using SDK 5.10.00.02 and "at_commands" example for my project.
When I turn the connected AP's power off, main MCU received "+eventwlan:disconnect".
I turned the AP's power on and the device attempts a new connection. IP is acquired but receives ipv4_lost while opening the socket.
It messed up the following procedures. This is 100% reproduced. I guess the previous "+eventwlan:disconnect" affects next connection.
When I receive the "+eventwlan:disconnect", do I need to do something to prevent the CC3235 sending "ipv4_lost" event on next connection?
Below is the log.
[2021-01-01T00:01:21][DBG][wifi.c:1378] [ATRx:28]-["at+close=0 // <- Previous communication end normally
+close:0
OK
// Unplugged the power cable of the AP.
"]
[2021-01-01T00:01:26][DBG][wifi.c:1378] [ATRx:68]-["+eventwlan:disconnect,TEST_AP,0x90:0x9f:0x33:0xbb:0x6:0xb8,109
"]
// Plugged the power cable after received "+eventwlan:disconnect".
// Device tried new connection and ip acquired but received "+eventnetapp:ipv4_lost" while opening socket.
// It messed up the following procedures.
[2021-01-01T00:01:58][DBG][wifi.c:1378] [ATRx:31]-["at+wlanget=connection,
+wlanget"]
[2021-01-01T00:01:59][DBG][wifi.c:1378] [ATRx:65]-[":sta,disconnected,,TEST_AP,0x90:0x9f:0x33:0xbb:0x6:0xb8
OK
"]
[2021-01-01T00:01:59][INFO][wifi.c:1866] >> WiFi_PrepareToSend: wifi status(5), connected(0)
[2021-01-01T00:01:59][DBG][wifi.c:1378] [ATRx:39]-["at+wlanconnect="TEST_AP",,open,,,,
"]
[2021-01-01T00:01:59][DBG][wifi.c:1378] [ATRx:4]-["OK
"]
[2021-01-01T00:02:02][DBG][wifi.c:1378] [ATRx:128]-["+eventwlan:connect,TEST_AP,0x90:0x9f:0x33:0xbb:0x6:0xb8
+eventnetapp:ipv4_acquired,192.168.0.53,192.168.0.1,164.124.101.2
"]
[2021-01-01T00:02:02][DBG][wifi.c:1378] [ATRx:26]-["at+socket=inet,stream,tcp
"]
[2021-01-01T00:02:02][DBG][wifi.c:1378] [ATRx:41]-["+eventnetapp:ipv4_lost,0
+socket:1
OK
"]
[2021-01-01T00:02:02][ERR][dm_comm.c: 129] >> DMComm_EndBy: Error (dmStatus:0,dmCommPath:2,wifiStatus:9)
[2021-01-01T00:02:02][DBG][wifi.c:1378] [ATRx:41]-["at+setsockopt=1,socket,rcvtimeo,30,0
OK
"]
[2021-01-01T00:02:02][DBG][wifi.c:1378] [ATRx:43]-["at+connect=1,inet,3000,192.168.0.57
OK
"]
[2021-01-01T00:02:04][DBG][wifi.c:1378] [ATRx:67]-["+eventnetapp:ipv4_acquired,192.168.0.53,192.168.0.1,164.124.101.2
"]
[2021-01-01T00:02:04][DBG][wifi.c:1378] [ATRx:28]-["+connect:3000,192.168.0.57
"]
[2021-01-01T00:02:05][DBG][wifi.c:1378] [ATRx:4]-["OK
Thanks,
Calvin