Debugging wifi connection issues
Posted: Sun Mar 18, 2018 12:47 pm
I'm having a problem where sometimes it takes a long time (a minute or two) to connect to wifi. My setup is I have 3 access points, distributed around the house, and all have the same SSID and are broadcasting on different channels:
If I force connection to one particular AP (by setting wifi_sta_cfg.sta.bssid_set=1 and wifi_sta_cfg.sta.bssid) it is quick and simple. But, if I let it choose it's own AP, it sometimes takes a minute or two to connect. Here is some of the output I get:
Needless to say, I don't get any issue connecting with other WIFI devices (such as phones, tablets, etc).
I had a look in ESP-IDF components/esp32/wifi*, but not much there and no clues as to what those messages mean.
Any pointers / suggestions as to how I can go about diagnosing this particular problem, as well as wifi connectivity issues in general?
If I force connection to one particular AP (by setting wifi_sta_cfg.sta.bssid_set=1 and wifi_sta_cfg.sta.bssid) it is quick and simple. But, if I let it choose it's own AP, it sometimes takes a minute or two to connect. Here is some of the output I get:
Code: Select all
I (140428) wifi: wifi firmware version: ebd3e5d
I (140438) wifi: config NVS flash: enabled
I (140438) wifi: config nano formating: disabled
I (140448) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (140448) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (140458) wifi: Init dynamic tx buffer num: 16
I (140458) wifi: Init data frame dynamic rx buffer num: 16
I (140468) wifi: Init management frame dynamic rx buffer num: 16
I (140468) wifi: wifi driver task: 3ffe3464, prio:23, stack:4096
I (140468) wifi: Init static rx buffer num: 4
I (140478) wifi: Init dynamic rx buffer num: 16
I (140478) wifi: wifi power manager task: 0x3ffed774 prio: 21 stack: 2560
I (140488) wifi: mode : sta (da:ta:re:da:ct:ed)
I (142908) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (143568) wifi: state: init -> auth (b0)
I (143578) wifi: state: auth -> assoc (0)
I (143588) wifi: state: assoc -> run (10)
I (143608) wifi: state: run -> auth (ec0)
I (143608) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (153438) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (153448) wifi: state: auth -> auth (b0)
I (153448) wifi: state: auth -> assoc (0)
I (153468) wifi: state: assoc -> run (10)
I (153468) wifi: state: run -> auth (ec0)
I (153478) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (163438) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (163448) wifi: state: auth -> auth (b0)
I (163458) wifi: state: auth -> assoc (0)
I (163458) wifi: state: assoc -> run (10)
I (163468) wifi: state: run -> auth (ec0)
I (163478) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (173438) wifi: n:8 2, o:1 0, ap:255 255, sta:8 2, prof:1
I (173448) wifi: state: auth -> auth (b0)
I (173448) wifi: state: auth -> assoc (0)
I (174458) wifi: state: assoc -> init (4)
I (174468) wifi: n:8 0, o:8 2, ap:255 255, sta:8 2, prof:1
I (183438) wifi: n:1 0, o:8 0, ap:255 255, sta:1 0, prof:1
I (183448) wifi: state: init -> auth (b0)
I (183448) wifi: state: auth -> assoc (0)
I (183458) wifi: state: assoc -> run (10)
I (183468) wifi: state: run -> auth (ec0)
I (183478) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (193438) wifi: n:8 2, o:1 0, ap:255 255, sta:8 2, prof:1
I (193448) wifi: state: auth -> auth (b0)
I (193468) wifi: state: auth -> assoc (0)
I (194228) event: station ip lost
I (194478) wifi: state: assoc -> init (4)
I (194488) wifi: n:8 0, o:8 2, ap:255 255, sta:8 2, prof:1
I (203438) wifi: n:8 2, o:8 0, ap:255 255, sta:8 2, prof:1
I (203448) wifi: state: init -> auth (b0)
I (203458) wifi: state: auth -> assoc (0)
I (203468) wifi: state: assoc -> run (10)
I (203488) wifi: connected with MYSSID, channel 8
I (206478) wifi: pm start, type:0
I (207058) event: sta ip: a.b.c.212, mask: 255.255.255.0, gw: a.b.c.1
I had a look in ESP-IDF components/esp32/wifi*, but not much there and no clues as to what those messages mean.
Any pointers / suggestions as to how I can go about diagnosing this particular problem, as well as wifi connectivity issues in general?