ESP32 disconnect from AP

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

ESP32 disconnect from AP

Postby axellin » Wed Aug 19, 2020 10:34 am

Test with: v4.3-dev-771-gc77c4ccf6c43
My test code did reconnect if disconnected from AP.
I observed the esp32 (as station) disconnect from AP several times.
The disconnect reason is 8 (WIFI_REASON_ASSOC_LEAVE)
What could be the reason cuase such disconnect from AP? The RSSI looks very good.
I ask this because my laptop also join the same AP but does not has such issue.

Below shows the log:

Code: Select all

I (4810463) wifi:state: run -> init (ce00)
I (4810466) wifi:pm stop, total sleep time: 4040994006 us / 4798061697 us

I (4810467) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
I (4810615) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
I (4810617) wifi:state: init -> auth (b0)
I (4810620) wifi:state: auth -> assoc (0)
I (4810631) wifi:state: assoc -> run (10)
I (4810640) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (4810641) wifi:security: WPA2-PSK, phy: bgn, rssi: -35
I (4810643) wifi:pm start, type: 1

I (5717290) wifi:state: run -> init (ce00)
I (5717292) wifi:pm stop, total sleep time: 635632465 us / 906646117 us

I (5717293) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
I (5717429) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
I (5717431) wifi:state: init -> auth (b0)
I (5717435) wifi:state: auth -> assoc (0)
I (5717446) wifi:state: assoc -> run (10)
I (5717455) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (5717456) wifi:security: WPA2-PSK, phy: bgn, rssi: -37
I (5717458) wifi:pm start, type: 1

I (5717494) wifi:AP's beacon interval = 102400 us, DTIM period = 1

I (7187826) wifi:state: run -> init (ce00)
I (7187829) wifi:pm stop, total sleep time: 1224474415 us / 1470367591 us

I (7187830) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
I (7187977) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
I (7187979) wifi:state: init -> auth (b0)
I (7187983) wifi:state: auth -> assoc (0)
I (7187999) wifi:state: assoc -> run (10)
I (7188008) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (7188009) wifi:security: WPA2-PSK, phy: bgn, rssi: -37
I (7188011) wifi:pm start, type: 1

I (7188034) wifi:AP's beacon interval = 102400 us, DTIM period = 1

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: ESP32 disconnect from AP

Postby axellin » Thu Aug 20, 2020 12:28 am

Below shows the log with wifi debug enabled:

Code: Select all

I (1474) wifi:wifi driver task: 3ffc6bf8, prio:23, stack:6656, core=0
I (1499) wifi:wifi firmware version: 9c89486
I (1499) wifi:wifi certification version: v7.0
I (1499) wifi:config NVS flash: enabled
I (1500) wifi:config nano formating: disabled
I (1504) wifi:Init data frame dynamic rx buffer num: 32
I (1509) wifi:Init management frame dynamic rx buffer num: 32
I (1514) wifi:Init management short buffer num: 32
I (1519) wifi:Init dynamic tx buffer num: 32
I (1523) wifi:Init static rx buffer size: 1600
I (1527) wifi:Init static rx buffer num: 10
I (1531) wifi:Init dynamic rx buffer num: 32
I (10412) wifi:set country: cc=US schan=1 nchan=11 policy=0
D (10416) wifi:clear blacklist
D (10510) wifi:filter: set rx policy=0
I (10511) wifi:mode : sta (f0:08:d1:79:8c:28)
D (10512) wifi:filter: set rx policy=1
D (10516) wifi:connect status 0 -> 0
D (10523) wifi:Start wifi connect
D (10526) wifi:connect status 0 -> 0
D (10529) wifi:connect chan=0
D (10532) wifi:first chan=1
D (10534) wifi:connect status 0 -> 1
D (10538) wifi:filter: set rx policy=3
D (10541) wifi:clear scan ap list
D (10544) wifi:start scan: type=0x50f, priority=2, cb=0x40164534, arg=0x0, ss_state=0x1, time=35459, index=0
0x40164534: cnx_start_handoff_cb at ??:?
D (10554) wifi:perform scan: ss_state=0x9, chan<1,0>, dur<0,120>
D (10680) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (10680) wifi:perform scan: ss_state=0x9, chan<2,0>, dur<0,120>
D (10802) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (10802) wifi:perform scan: ss_state=0x9, chan<3,0>, dur<0,120>
D (10923) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (10923) wifi:perform scan: ss_state=0x9, chan<4,0>, dur<0,120>
D (11044) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11045) wifi:perform scan: ss_state=0x9, chan<5,0>, dur<0,120>
D (11165) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11166) wifi:perform scan: ss_state=0x9, chan<6,0>, dur<0,120>
D (11287) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11287) wifi:perform scan: ss_state=0x9, chan<7,0>, dur<0,120>
D (11408) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11409) wifi:perform scan: ss_state=0x9, chan<8,0>, dur<0,120>
D (11529) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11530) wifi:perform scan: ss_state=0x9, chan<9,0>, dur<0,120>
D (11651) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11651) wifi:perform scan: ss_state=0x9, chan<10,0>, dur<0,120>
D (11772) wifi:scan end: arg=0x0, status=0, ss_state=0x3
D (11773) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120>
D (11779) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11781) wifi:profile match: ss_state=0x7
D (11801) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11801) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (11802) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (11808) wifi:profile match: ss_state=0x7
D (11893) wifi:scan end: arg=0x0, status=0, ss_state=0x7
D (11894) wifi:find first mathched ssid, scan done
D (11894) wifi:filter: set rx policy=4
D (11896) wifi:first chan=1
D (11898) wifi:handoff_cb: status=0
D (11901) wifi:ap found, mac=18:a6:f7:ab:ca:66
D (11905) wifi:new_bss=0x3ffb7d58, cur_bss=0x0, new_chan=<11,2>, cur_chan=1
D (11912) wifi:filter: set rx policy=5
I (11916) wifi:new:<11,2>, old:<1,0>, ap:<255,255>, sta:<11,2>, prof:1
D (11922) wifi:connect_op: status=0, auth=5, cipher=3 
D (11927) wifi:auth mode is not none
D (12461) wifi:connect_bss: auth=1, reconnect=0
I (12461) wifi:state: init -> auth (b0)
D (12462) wifi:start 1s AUTH timer
D (12462) wifi:clear scan ap list
D (12465) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (12469) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (12474) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (12478) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (12483) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (12490) wifi:recv auth: seq=2, status=0
I (12491) wifi:state: auth -> assoc (0)
D (12495) wifi:restart connect 1s timer for assoc
D (12515) wifi:recv assoc: type=0x10
D (12515) wifi:filter: set rx policy=6
I (12515) wifi:state: assoc -> run (10)
D (12516) wifi:start 10s connect timer for 4 way handshake
D (12520) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
I (12532) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (12532) wifi:security: WPA2-PSK, phy: bgn, rssi: -35
D (12537) wifi:remove all except 18:a6:f7:ab:ca:66 from rc list
D (12543) wifi:clear blacklist
D (12546) wifi:filter: set rx policy=7
I (12549) wifi:pm start, type: 1
D (12552) wifi:Send sta connected event
D (12556) wifi:connect status 1 -> 5
D (12559) wifi:obss scan is disabled
D (12562) wifi:start obss scan: obss scan is stopped
I (12620) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (14474) wifi:Set ps type: 1
I (1597530) wifi:state: run -> init (ce00)
D (1597531) wifi:connect status 5 -> 6
D (1597531) wifi:stop beacon/connect timer, send diassoc(8)
D (1597533) wifi:sta leave
I (1597535) wifi:pm stop, total sleep time: 1347002455 us / 1584983019 us
D (1597542) wifi:stop CSA timer
D (1597545) wifi:remove 18:a6:f7:ab:ca:66 from rc list
I (1597549) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
D (1597557) wifi:filter: set rx policy=8
D (1597560) wifi:Send disconnect event, reason=8, AP number=0
D (1597588) wifi:Start wifi connect
D (1597591) wifi:connect status 6 -> 0
D (1597594) wifi:connect chan=0
D (1597597) wifi:first chan=11
D (1597600) wifi:connect status 0 -> 1
D (1597604) wifi:filter: set rx policy=3
D (1597607) wifi:clear scan ap list
D (1597610) wifi:start scan: type=0x50f, priority=2, cb=0x40164534, arg=0x0, ss_state=0x1, time=1595304308, index=0
0x40164534: cnx_start_handoff_cb at ??:?
D (1597620) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120>
D (1597633) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (1597634) wifi:profile match: ss_state=0x7
D (1597636) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (1597640) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (1597648) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (1597655) wifi:profile match: ss_state=0x7
D (1597735) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (1597735) wifi:profile match: ss_state=0x7
D (1597747) wifi:scan end: arg=0x0, status=0, ss_state=0x7
D (1597747) wifi:find first mathched ssid, scan done
D (1597747) wifi:filter: set rx policy=4
D (1597750) wifi:first chan=1
D (1597752) wifi:handoff_cb: status=0
D (1597756) wifi:ap found, mac=18:a6:f7:ab:ca:66
D (1597760) wifi:new_bss=0x3ffb7d58, cur_bss=0x0, new_chan=<11,2>, cur_chan=11
D (1597767) wifi:filter: set rx policy=5
I (1597771) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
D (1597778) wifi:connect_op: status=0, auth=5, cipher=3 
D (1597782) wifi:auth mode is not none
D (1597786) wifi:connect_bss: auth=1, reconnect=0
I (1597790) wifi:state: init -> auth (b0)
D (1597794) wifi:start 1s AUTH timer
D (1597797) wifi:clear scan ap list
D (1597805) wifi:recv auth: seq=2, status=0
I (1597805) wifi:state: auth -> assoc (0)
D (1597809) wifi:restart connect 1s timer for assoc
D (1597823) wifi:recv assoc: type=0x10
D (1597823) wifi:filter: set rx policy=6
I (1597824) wifi:state: assoc -> run (10)
D (1597824) wifi:start 10s connect timer for 4 way handshake
D (1597837) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
I (1597839) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (1597842) wifi:security: WPA2-PSK, phy: bgn, rssi: -36
D (1597847) wifi:remove all except 18:a6:f7:ab:ca:66 from rc list
D (1597853) wifi:clear blacklist
D (1597856) wifi:filter: set rx policy=7
I (1597860) wifi:pm start, type: 1
D (1597863) wifi:Send sta connected event
D (1597867) wifi:connect status 1 -> 5
D (1597870) wifi:obss scan is disabled
D (1597873) wifi:start obss scan: obss scan is stopped
I (1597939) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (11603449) wifi:state: run -> init (ce00)
D (11603450) wifi:connect status 5 -> 6
D (11603450) wifi:stop beacon/connect timer, send diassoc(8)
D (11603453) wifi:sta leave
I (11603454) wifi:pm stop, total sleep time: 7966078594 us / 10005591542 us
D (11603461) wifi:stop CSA timer
D (11603464) wifi:remove 18:a6:f7:ab:ca:66 from rc list
I (11603469) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
D (11603476) wifi:filter: set rx policy=8
D (11603479) wifi:Send disconnect event, reason=8, AP number=0
D (11603508) wifi:Start wifi connect
D (11603511) wifi:connect status 6 -> 0
D (11603515) wifi:connect chan=0
D (11603518) wifi:first chan=11
D (11603520) wifi:connect status 0 -> 1
D (11603524) wifi:filter: set rx policy=3
D (11603528) wifi:clear scan ap list
D (11603531) wifi:start scan: type=0x50f, priority=2, cb=0x40164534, arg=0x0, ss_state=0x1, time=-1233280566, index=0
0x40164534: cnx_start_handoff_cb at ??:?
D (11603541) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120>
D (11603552) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11603553) wifi:profile match: ss_state=0x7
D (11603557) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11603562) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (11603569) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (11603576) wifi:profile match: ss_state=0x7
D (11603653) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11603654) wifi:profile match: ss_state=0x7
D (11603668) wifi:scan end: arg=0x0, status=0, ss_state=0x7
D (11603668) wifi:find first mathched ssid, scan done
D (11603669) wifi:filter: set rx policy=4
D (11603671) wifi:first chan=1
D (11603674) wifi:handoff_cb: status=0
D (11603677) wifi:ap found, mac=18:a6:f7:ab:ca:66
D (11603682) wifi:new_bss=0x3ffb7d58, cur_bss=0x0, new_chan=<11,2>, cur_chan=11
D (11603689) wifi:filter: set rx policy=5
I (11603693) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
D (11603700) wifi:connect_op: status=0, auth=5, cipher=3 
D (11603704) wifi:auth mode is not none
D (11603708) wifi:connect_bss: auth=1, reconnect=0
I (11603712) wifi:state: init -> auth (b0)
D (11603717) wifi:start 1s AUTH timer
D (11603720) wifi:clear scan ap list
D (11603725) wifi:recv auth: seq=2, status=0
I (11603727) wifi:state: auth -> assoc (0)
D (11603731) wifi:restart connect 1s timer for assoc
D (11603745) wifi:recv assoc: type=0x10
D (11603746) wifi:filter: set rx policy=6
I (11603746) wifi:state: assoc -> run (10)
D (11603747) wifi:start 10s connect timer for 4 way handshake
D (11603756) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
I (11603761) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (11603765) wifi:security: WPA2-PSK, phy: bgn, rssi: -38
D (11603770) wifi:remove all except 18:a6:f7:ab:ca:66 from rc list
D (11603776) wifi:clear blacklist
D (11603779) wifi:filter: set rx policy=7
I (11603783) wifi:pm start, type: 1
D (11603787) wifi:Send sta connected event
D (11603790) wifi:connect status 1 -> 5
D (11603794) wifi:obss scan is disabled
D (11603797) wifi:start obss scan: obss scan is stopped
I (11603860) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (11644072) wifi:state: run -> init (ce00)
D (11644073) wifi:connect status 5 -> 6
D (11644073) wifi:stop beacon/connect timer, send diassoc(8)
D (11644076) wifi:sta leave
I (11644077) wifi:pm stop, total sleep time: 30399387 us / 40290930 us
D (11644084) wifi:stop CSA timer
D (11644087) wifi:remove 18:a6:f7:ab:ca:66 from rc list
I (11644092) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
D (11644099) wifi:filter: set rx policy=8
D (11644102) wifi:Send disconnect event, reason=8, AP number=0
D (11644118) wifi:Start wifi connect
D (11644121) wifi:connect status 6 -> 0
D (11644125) wifi:connect chan=0
D (11644128) wifi:first chan=11
D (11644131) wifi:connect status 0 -> 1
D (11644134) wifi:filter: set rx policy=3
D (11644138) wifi:clear scan ap list
D (11644141) wifi:start scan: type=0x50f, priority=2, cb=0x40164534, arg=0x0, ss_state=0x1, time=-1192471841, index=0
0x40164534: cnx_start_handoff_cb at ??:?
D (11644152) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120>
D (11644164) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11644165) wifi:profile match: ss_state=0x7
D (11644173) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11644174) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (11644180) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (11644186) wifi:profile match: ss_state=0x7
D (11644276) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (11644277) wifi:profile match: ss_state=0x7
D (11644278) wifi:scan end: arg=0x0, status=0, ss_state=0x7
D (11644280) wifi:find first mathched ssid, scan done
D (11644285) wifi:filter: set rx policy=4
D (11644288) wifi:first chan=1
D (11644291) wifi:handoff_cb: status=0
D (11644295) wifi:ap found, mac=18:a6:f7:ab:ca:66
D (11644299) wifi:new_bss=0x3ffb7d58, cur_bss=0x0, new_chan=<11,2>, cur_chan=11
D (11644306) wifi:filter: set rx policy=5
I (11644310) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
D (11644317) wifi:connect_op: status=0, auth=5, cipher=3 
D (11644321) wifi:auth mode is not none
D (11644325) wifi:connect_bss: auth=1, reconnect=0
I (11644329) wifi:state: init -> auth (b0)
D (11644334) wifi:start 1s AUTH timer
D (11644337) wifi:clear scan ap list
D (11644342) wifi:recv auth: seq=2, status=0
I (11644344) wifi:state: auth -> assoc (0)
D (11644348) wifi:restart connect 1s timer for assoc
D (11644362) wifi:recv assoc: type=0x10
D (11644363) wifi:filter: set rx policy=6
I (11644363) wifi:state: assoc -> run (10)
D (11644364) wifi:start 10s connect timer for 4 way handshake
D (11644379) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
I (11644381) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (11644382) wifi:security: WPA2-PSK, phy: bgn, rssi: -38
D (11644388) wifi:remove all except 18:a6:f7:ab:ca:66 from rc list
D (11644393) wifi:clear blacklist
D (11644397) wifi:filter: set rx policy=7
I (11644400) wifi:pm start, type: 1
D (11644404) wifi:Send sta connected event
D (11644408) wifi:connect status 1 -> 5
D (11644411) wifi:obss scan is disabled
D (11644415) wifi:start obss scan: obss scan is stopped
I (11644480) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (27854225) wifi:state: run -> init (ce00)
D (27854226) wifi:connect status 5 -> 6
D (27854226) wifi:stop beacon/connect timer, send diassoc(8)
D (27854229) wifi:sta leave
I (27854230) wifi:pm stop, total sleep time: 13207842995 us / 16209826507 us
D (27854237) wifi:stop CSA timer
D (27854240) wifi:remove 18:a6:f7:ab:ca:66 from rc list
I (27854245) wifi:new:<11,0>, old:<11,2>, ap:<255,255>, sta:<11,2>, prof:1
D (27854252) wifi:filter: set rx policy=8
D (27854255) wifi:Send disconnect event, reason=8, AP number=0
D (27854272) wifi:Start wifi connect
D (27854275) wifi:connect status 6 -> 0
D (27854278) wifi:connect chan=0
D (27854281) wifi:first chan=11
D (27854284) wifi:connect status 0 -> 1
D (27854288) wifi:filter: set rx policy=3
D (27854291) wifi:clear scan ap list
D (27854295) wifi:start scan: type=0x50f, priority=2, cb=0x40164534, arg=0x0, ss_state=0x1, time=-2079088348, index=0
0x40164534: cnx_start_handoff_cb at ??:?
D (27854305) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120>
D (27854317) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (27854319) wifi:profile match: ss_state=0x7
D (27854327) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (27854327) wifi:set max rate: from <rate=130, phy=3, sig=0> to <rate=144, phy=3 sig=0>
D (27854333) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144
D (27854340) wifi:profile match: ss_state=0x7
D (27854429) wifi:rsn valid: gcipher=3 ucipher=3 akm=5
D (27854430) wifi:profile match: ss_state=0x7
D (27854432) wifi:scan end: arg=0x0, status=0, ss_state=0x7
D (27854433) wifi:find first mathched ssid, scan done
D (27854437) wifi:filter: set rx policy=4
D (27854441) wifi:first chan=1
D (27854444) wifi:handoff_cb: status=0
D (27854447) wifi:ap found, mac=18:a6:f7:ab:ca:66
D (27854452) wifi:new_bss=0x3ffb7d58, cur_bss=0x0, new_chan=<11,2>, cur_chan=11
D (27854459) wifi:filter: set rx policy=5
I (27854463) wifi:new:<11,2>, old:<11,0>, ap:<255,255>, sta:<11,2>, prof:1
D (27854470) wifi:connect_op: status=0, auth=5, cipher=3 
D (27854474) wifi:auth mode is not none
D (27854478) wifi:connect_bss: auth=1, reconnect=0
I (27854482) wifi:state: init -> auth (b0)
D (27854487) wifi:start 1s AUTH timer
D (27854490) wifi:clear scan ap list
D (27854496) wifi:recv auth: seq=2, status=0
I (27854497) wifi:state: auth -> assoc (0)
D (27854501) wifi:restart connect 1s timer for assoc
D (27854521) wifi:recv assoc: type=0x10
D (27854522) wifi:filter: set rx policy=6
I (27854522) wifi:state: assoc -> run (10)
D (27854523) wifi:start 10s connect timer for 4 way handshake
I (27854579) wifi:connected with TEST-AP, aid = 1, channel 11, 40D, bssid = 18:a6:f7:ab:ca:66
I (27854579) wifi:security: WPA2-PSK, phy: bgn, rssi: -40
D (27854581) wifi:remove all except 18:a6:f7:ab:ca:66 from rc list
D (27854587) wifi:clear blacklist
D (27854591) wifi:filter: set rx policy=7
I (27854594) wifi:pm start, type: 1
D (27854598) wifi:Send sta connected event
D (27854602) wifi:connect status 1 -> 5
D (27854605) wifi:obss scan is disabled
D (27854608) wifi:start obss scan: obss scan is stopped
I (27854736) wifi:AP's beacon interval = 102400 us, DTIM period = 1


eriknorth
Posts: 6
Joined: Mon Nov 16, 2020 7:34 pm

Re: ESP32 disconnect from AP

Postby eriknorth » Mon Nov 16, 2020 7:40 pm

Hi axellin,

We are seeing the same behavior, that Wifi randomly disconnects. Did you ever manage to solve the problem?
Here is the sample of the log, which pretty much looks like what you were getting:

Code: Select all

I (10231579) wifi:state: run -> init (ce00)
D (10231579) wifi:connect status 5 -> 6
D (10231579) wifi:stop beacon/connect timer, send diassoc(8)
D (10231579) wifi:sta leave
I (10231589) wifi:pm stop, total sleep time: 3006714474 us / 3277611240 us
D (10231599) wifi:stop CSA timer
D (10231599) wifi:remove 54:67:51:57:aa:23 from rc list
I (10231609) wifi:new:<11,0>, old:<11,0>, ap:<255,255>, sta:<11,0>, prof:1
D (10231609) wifi:filter: set rx policy=8
D (10231619) wifi:Send disconnect event, reason=8, AP number=0
We are running ESP-IDF 4.1 [7b7c641076ef4c5dff7b994170d445bbb46f81ab]

/Erik

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: ESP32 disconnect from AP

Postby axellin » Tue Nov 17, 2020 6:29 am

eriknorth wrote:
Mon Nov 16, 2020 7:40 pm
Hi axellin,

We are seeing the same behavior, that Wifi randomly disconnects. Did you ever manage to solve the problem
We are running ESP-IDF 4.1 [7b7c641076ef4c5dff7b994170d445bbb46f81ab]

/Erik
Check if upgrading v4.1 branch (git pull) helps which includes https://github.com/espressif/esp32-wifi ... 5e31234334

eriknorth
Posts: 6
Joined: Mon Nov 16, 2020 7:34 pm

Re: ESP32 disconnect from AP

Postby eriknorth » Tue Nov 17, 2020 7:57 am

Hi Axellin,

Thanks! Updated 4.1 release branch and the failure disappeared.

/Erik

Who is online

Users browsing this forum: No registered users and 187 guests