Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wifi Group Event fails to send MGOS_WIFI_EV_AP_STA_DISCONNECTED when device disconnects #20

Open
rtrue983 opened this issue Jan 22, 2019 · 0 comments

Comments

@rtrue983
Copy link
Contributor

Mos Version 2.10.2
Platform ESP32

Setup:
AP+STA mode
Device connected to AP
STA currently searching for stored SSIDs

Symptom:
Device is continually disconnecting and connected... I believe due to the AP jumping channels to match the STA connection attempts or due to the scans that are taking place.

Result:
Mgos event wifi group does not fire a MGOS_WIFI_EV_AP_STA_DISCONNECTED but continually indicate that the device is connected via the MGOS_WIFI_EV_AP_STA_SCONNECTED event.

LOG:

[Jan 22 10:19:46.800] wifi_cb              WiFi Evt: STA Connecting (again)
[Jan 22 10:19:46.807] mgos_net_on_change_c WiFi STA: connecting
[Jan 22 10:19:50.034] I (1779406) wifi: switch to channel 1
[Jan 22 10:19:50.039] I (1779406) wifi: ap channel adjust o:11,0 n:1,0
[Jan 22 10:19:50.044] I (1779416) wifi: n:1 0, o:11 0, ap:1 0, sta:11 0, prof:11
[Jan 22 10:19:50.050] I (1779416) wifi: n:1 0, o:1 0, ap:1 0, sta:1 0, prof:11
[Jan 22 10:19:50.901] I (1780276) wifi: state: init -> auth (b0)
[Jan 22 10:19:50.909] I (1780276) wifi: state: auth -> assoc (0)
[Jan 22 10:19:51.915] I (1781286) wifi: state: assoc -> init (400)
[Jan 22 10:19:51.920] I (1781286) wifi: n:1 0, o:1 0, ap:1 0, sta:1 0, prof:1
[Jan 22 10:19:51.925] I (1781296) wifi: n:1 0, o:1 0, ap:1 0, sta:1 0, prof:1
[Jan 22 10:19:51.929] I (1781306) wifi: state: init -> auth (b0)
[Jan 22 10:19:51.939] I (1781306) wifi: state: auth -> assoc (0)
[Jan 22 10:19:52.944] I (1782316) wifi: state: assoc -> init (400)
[Jan 22 10:19:52.950] I (1782316) wifi: n:1 0, o:1 0, ap:1 0, sta:1 0, prof:1
[Jan 22 10:19:52.955] esp32_wifi_ev        Disconnected from True, reason: 4
[Jan 22 10:19:52.964] mgos_net_on_change_c WiFi STA: disconnected
[Jan 22 10:19:56.603] I (1785976) wifi: n:1 0, o:1 0, ap:1 0, sta:1 0, prof:1
[Jan 22 10:19:56.609] I (1785976) wifi: station: f8:63:3f:ad:a5:bb join, AID=1, bgn, 20
[Jan 22 10:19:56.657] mgos_wifi_on_change_ f8:63:3f:ad:a5:bb connected
[Jan 22 10:19:56.665] wifi_cb              WiFi Evt: AP-STA Connected (devices:1)
[Jan 22 10:19:56.798] mgos_wifi_sta_connec WiFi STA: Connect timeout
[Jan 22 10:19:56.805] mgos_wifi_get_next_s WiFi STA: Using config 2 (TrueMobile)
[Jan 22 10:19:56.811] I (1786186) wpa: WPA2: already disabled
[Jan 22 10:19:56.816] mgos_wifi_setup_sta  WiFi STA: Connecting to TrueMobile
[Jan 22 10:19:56.821] I (1786196) wifi: Set ps type: 0
[Jan 22 10:19:56.821]
[Jan 22 10:19:56.829] wifi_cb              WiFi Evt: STA Connecting (again)
[Jan 22 10:19:56.836] mgos_net_on_change_c WiFi STA: connecting
[Jan 22 10:19:59.669] esp32_wifi_ev        Disconnected from TrueMobile, reason: 201
[Jan 22 10:19:59.677] mgos_net_on_change_c WiFi STA: disconnected
[Jan 22 10:20:06.827] mgos_wifi_sta_connec WiFi STA: Connect timeout
[Jan 22 10:20:06.836] mgos_wifi_get_next_s WiFi STA: Using config 0 (twisthink-LAB)
[Jan 22 10:20:06.842] I (1796216) wpa: WPA2: already disabled
[Jan 22 10:20:06.848] mgos_wifi_setup_sta  WiFi STA: Connecting to twisthink-LAB
[Jan 22 10:20:06.853] I (1796226) wifi: Set ps type: 0
[Jan 22 10:20:06.853]
[Jan 22 10:20:06.862] wifi_cb              WiFi Evt: STA Connecting (again)
[Jan 22 10:20:06.869] mgos_net_on_change_c WiFi STA: connecting
[Jan 22 10:20:10.095] I (1799466) wifi: switch to channel 11
[Jan 22 10:20:10.099] I (1799466) wifi: ap channel adjust o:1,0 n:11,0
[Jan 22 10:20:10.105] I (1799476) wifi: n:11 0, o:1 0, ap:11 0, sta:1 0, prof:1
[Jan 22 10:20:10.111] I (1799486) wifi: n:11 0, o:11 0, ap:11 0, sta:11 0, prof:1
[Jan 22 10:20:10.960] I (1800336) wifi: state: init -> auth (b0)
[Jan 22 10:20:10.969] I (1800336) wifi: state: auth -> assoc (0)
[Jan 22 10:20:10.978] I (1800346) wifi: state: assoc -> run (10)
[Jan 22 10:20:14.984] I (1804356) wifi: state: run -> init (2a0)
[Jan 22 10:20:14.990] I (1804356) wifi: n:11 0, o:11 0, ap:11 0, sta:11 0, prof:11
[Jan 22 10:20:15.648] I (1805016) wifi: n:11 0, o:11 0, ap:11 0, sta:11 0, prof:11
[Jan 22 10:20:15.654] I (1805026) wifi: station: f8:63:3f:ad:a5:bb join, AID=1, bgn, 20
[Jan 22 10:20:15.700] mgos_wifi_on_change_ f8:63:3f:ad:a5:bb connected
[Jan 22 10:20:15.710] wifi_cb              WiFi Evt: AP-STA Connected (devices:1)
[Jan 22 10:20:16.860] mgos_wifi_sta_connec WiFi STA: Connect timeout
[Jan 22 10:20:16.867] mgos_wifi_get_next_s WiFi STA: Using config 1 (True)
[Jan 22 10:20:16.873] I (1806246) wpa: WPA2: already disabled
[Jan 22 10:20:16.877] mgos_wifi_setup_sta  WiFi STA: Connecting to True
[Jan 22 10:20:16.882] I (1806256) wifi: Set ps type: 0
[Jan 22 10:20:16.882]
[Jan 22 10:20:16.891] wifi_cb              WiFi Evt: STA Connecting (again)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant