Wifi client won't reconnect after channel switch
Posted: Thu Aug 15, 2024 12:40 pm
INTRO:
I'm working on the custom prototype WiFi device with a reference to "esp32_hardware_design_guidelines_en.pdf" notes.
At the moment, I don't have the pcb antenna connected to the device properly (C15-L4-C14 missing) since the impendance match work is still in progress. However, I tried to go without antenna on a short distance (~20 cm) and still got the device working well.
SETUP:
ESP32 D0WD + (IDF 5.0.1) + wifi_country_t ("JP", ch1 ... ch14, tx_power 80, WIFI_COUNTRY_POLICY_MANUAL or WIFI_COUNTRY_POLICY_AUTO (both options tried)).
STEPS:
- ESP32 operates in SoftAP mode and starts "My_AP" (ch=6)
- client (Win10 laptop) joins "My_AP"
- ESP32 switches to APSTA mode
- ESP32 STA connects to "Neighbour_AP" (ch=12) run on Xiaomi 13T Pro
- naturally, channel switch takes place and ESP32 AP moves from ch=6 to ch=12
- client leaves "My_AP" and I'm always getting three WIFI_EVENT_AP_STADISCONNECTED events one by one:
>> Client left, AID=1, time connected, sec: 37
>> Client left, AID=1, time connected, sec: 37
>> Client left, AID=1, time connected, sec: 38
- ... client never returns
Everything works fine if no channel switch takes place (both channels match).
I can't figure out why my client does not get back...
TO CONSIDER:
The previous prototype run on WROVER kit on IDF 4.4.2 and I don't remember such problems. Yes, client also left after the channel switch but it reconnected back in a while.
POSSIBLE REASON:
Is it a chunked antenna or IDF 5.0.1 issue?
Any ideas to cure this issue highy appreciated!
Also, I'd like to learn how to perform a prior channel switch (before connecting to another AP) without losing a connected client...
I'm working on the custom prototype WiFi device with a reference to "esp32_hardware_design_guidelines_en.pdf" notes.
At the moment, I don't have the pcb antenna connected to the device properly (C15-L4-C14 missing) since the impendance match work is still in progress. However, I tried to go without antenna on a short distance (~20 cm) and still got the device working well.
SETUP:
ESP32 D0WD + (IDF 5.0.1) + wifi_country_t ("JP", ch1 ... ch14, tx_power 80, WIFI_COUNTRY_POLICY_MANUAL or WIFI_COUNTRY_POLICY_AUTO (both options tried)).
STEPS:
- ESP32 operates in SoftAP mode and starts "My_AP" (ch=6)
- client (Win10 laptop) joins "My_AP"
- ESP32 switches to APSTA mode
- ESP32 STA connects to "Neighbour_AP" (ch=12) run on Xiaomi 13T Pro
- naturally, channel switch takes place and ESP32 AP moves from ch=6 to ch=12
- client leaves "My_AP" and I'm always getting three WIFI_EVENT_AP_STADISCONNECTED events one by one:
>> Client left, AID=1, time connected, sec: 37
>> Client left, AID=1, time connected, sec: 37
>> Client left, AID=1, time connected, sec: 38
- ... client never returns
Everything works fine if no channel switch takes place (both channels match).
I can't figure out why my client does not get back...
TO CONSIDER:
The previous prototype run on WROVER kit on IDF 4.4.2 and I don't remember such problems. Yes, client also left after the channel switch but it reconnected back in a while.
POSSIBLE REASON:
Is it a chunked antenna or IDF 5.0.1 issue?
Any ideas to cure this issue highy appreciated!
Also, I'd like to learn how to perform a prior channel switch (before connecting to another AP) without losing a connected client...