Can't connect to hidden network

aferran
Posts: 3
Joined: Fri Dec 22, 2017 9:36 am

Can't connect to hidden network

Postby aferran » Thu Mar 01, 2018 2:54 pm

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

aferran
Posts: 3
Joined: Fri Dec 22, 2017 9:36 am

Re: Can't connect to hidden network

Postby aferran » Fri Mar 02, 2018 1:28 pm

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

coyote32
Posts: 11
Joined: Mon Mar 01, 2021 7:22 am

Re: Can't connect to hidden network

Postby coyote32 » Tue Apr 13, 2021 12:18 pm

Hi,

The same problem here.
Did you find solution?
Regards,
coyote

coyote32
Posts: 11
Joined: Mon Mar 01, 2021 7:22 am

Re: Can't connect to hidden network

Postby coyote32 » Tue Apr 13, 2021 12:51 pm

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.
Regards,
coyote

Who is online

Users browsing this forum: Baidu [Spider] and 149 guests