Page 1 of 1
Can't connect to hidden network
Posted: Thu Mar 01, 2018 2:54 pm
by aferran
Hello,
I'm not able to connect to my AP which is not broadcasting its network name.
I'm providing the proper SSID and password in the wifi_config_t structure, but I keep receiving the SYSTEM_EVENT_STA_DISCONNECTED event with reason WIFI_REASON_NO_AP_FOUND.
If I configure my router to broadcast SSID, then I can connect without issue.
Is there something specific to do to be able to connect to a hidden network?
I'm up to date on the master branch as of March 1st, 2018
Thanks,
Antoine
Re: Can't connect to hidden network
Posted: Fri Mar 02, 2018 1:28 pm
by aferran
Hi again,
So, it seems that the issue is there when trying to connect to a network that is hidden AND on channel 13.
If I enable SSID broadcast on my router, I can connect, even if the channel is set to 13.
If I switch to channel 1, I can connect even if the network is hidden.
Country is set to default value ("CN") which should allow connections to channel 13.
Antoine
Re: Can't connect to hidden network
Posted: Tue Apr 13, 2021 12:18 pm
by coyote32
Hi,
The same problem here.
Did you find solution?
Re: Can't connect to hidden network
Posted: Tue Apr 13, 2021 12:51 pm
by coyote32
I find this:
(
https://docs.espressif.com/projects/esp ... untry-code)
If the connected AP has country IE in its beacon, the country info equals to the country info in beacon, otherwise, use default country info.
For scan:
-If schan+nchan-1 >11 :
Use active scan from schan to 11 and use passive scan from 12 to schan+nchan-1.
-If schan+nchan-1 <= 11 :
Use active scan from schan to schan+nchan-1.
Always keep in mind that if an AP with hidden SSID is set to a passive scan channel, the passive scan will not find it. In other words, if the application hopes to find the AP with hidden SSID in every channel, the policy of country info should be configured to WIFI_COUNTRY_POLICY_MANUAL.
So change the default country settings WIFI_COUNTRY_POLICY_AUTO to WIFI_COUNTRY_POLICY_MANUAL with esp_wifi_set_country() solve the problem.
I don't know the side effect of this.
Re: Can't connect to hidden network
Posted: Mon Jun 17, 2024 11:07 am
by endi83
Hello, I have the same issue.
I've tried Coyote's solution but the outcome remains unchanged.
I'm unable to connect to a hidden network on channels 12 or 13.
My current configuration is:
// Set the region
wifi_country_t wifi_country = {
.cc = "EU",
.schan = 1,
.nchan = 13,
.max_tx_power = 20,
.policy = WIFI_COUNTRY_POLICY_AUTO,
};
Can anyone help me out?
Thank you very much.