WIFI scanning - doesn't find 13 channel

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
0_djek
Posts: 11
Joined: Mon Dec 28, 2020 2:40 pm

WIFI scanning - doesn't find 13 channel

Post by 0_djek » Mon Apr 26, 2021 1:52 pm

Hello, when scanning wifi networks, I can't seem to find networks, that are in 13 channel. Is this normal, and is it possible to fix that?
Thanks for any help.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: WIFI scanning - doesn't find 13 channel

Post by pythoncoder » Mon Apr 26, 2021 5:24 pm

Permitted channels vary between countries. For example if your ESP32 has been localised for the USA it won't see channels 12 or 13 which are not permitted there. Japan has an extra channel 14.
Peter Hinch
Index to my micropython libraries.

outsidewall
Posts: 7
Joined: Mon Apr 20, 2020 9:27 pm

Re: WIFI scanning - doesn't find 13 channel

Post by outsidewall » Mon Apr 26, 2021 9:55 pm

Hello,
Did a search on this forum/docs, could not find anything on setting the region.

Is there away to set the wifi region? ideally from micropython...

John

0_djek
Posts: 11
Joined: Mon Dec 28, 2020 2:40 pm

Re: WIFI scanning - doesn't find 13 channel

Post by 0_djek » Tue Apr 27, 2021 6:27 am

pythoncoder wrote:
Mon Apr 26, 2021 5:24 pm
Permitted channels vary between countries. For example if your ESP32 has been localised for the USA it won't see channels 12 or 13 which are not permitted there. Japan has an extra channel 14.
Hello, I live in usa, so shouldn't the microcontroller see that (13th) channel? Thank you!

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: WIFI scanning - doesn't find 13 channel

Post by pythoncoder » Tue Apr 27, 2021 7:13 am

My understanding is that channels 12 and 13 are not allowed in the USA. Equipment intended for sale there is supposed to be configured to disallow those channels, firstly to comply with the rules and secondly because, if set to use one of those channels it would be unable to communicate with other US equipment.

That is my take on it, but as a Brit I don't claim expertise on US regulations ;)
Peter Hinch
Index to my micropython libraries.

0_djek
Posts: 11
Joined: Mon Dec 28, 2020 2:40 pm

Re: WIFI scanning - doesn't find 13 channel

Post by 0_djek » Tue Apr 27, 2021 12:02 pm

I made a mistake, I live in EU, so shouldn't there would be possible?

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: WIFI scanning - doesn't find 13 channel

Post by karfas » Tue Apr 27, 2021 10:13 pm

Regardless where the OP lives, blocking a channel in a device like the ESP32 intended for embedded use on hardware level is - at least - very unusual (not to say harakiri for the chip maker).

The ESP32 datasheet regarding the Wifi frequencies read
Device should operate in the frequency range allocated by regional regulatory authorities. Target operating frequency range is configurable by software.
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: WIFI scanning - doesn't find 13 channel

Post by pythoncoder » Wed Apr 28, 2021 12:06 pm

I am not a lawyer. But my understanding of the regulations is that, to achieve approval in most countries, a WiFi device should be incapable of transmitting on unauthorised channels. Special factory programming can be used to customise devices for their intended jurisdiction.

There are many devices that break the rules. Nevertheless it should be no surprise if a device designed for USA approval won't see channels 12 and 13.
Peter Hinch
Index to my micropython libraries.

0_djek
Posts: 11
Joined: Mon Dec 28, 2020 2:40 pm

Re: WIFI scanning - doesn't find 13 channel

Post by 0_djek » Wed Apr 28, 2021 12:14 pm

Ok, so I did some testing, and I found that my device can see the 12 and 13 channels, but it can't connect to them (it just tries without any result). Is there something that's not allowing it to connect? Or is it intended?

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: WIFI scanning - doesn't find 13 channel

Post by karfas » Wed Apr 28, 2021 1:07 pm

pythoncoder wrote:
Wed Apr 28, 2021 12:06 pm
to achieve approval in most countries, a WiFi device should be incapable of transmitting on unauthorised channels. Special factory programming can be used to customise devices for their intended jurisdiction.
This might be true for consumer devices. What do you think is the "intended jurisdiction" for an ESP32 chip/module, built in China, shipped to the EU and re-exported (as part of a larger solution) to - say - Canada ? My common sense tells me that this can't be true for modules(!) like the ESP32.

There must be some reason for the settings found in https://docs.espressif.com/projects/esp ... untry-code
Call esp_wifi_set_country() to set the country info. The table below describes the fields in detail, please consult local 2.4 GHz RF operating regulations before configuring these fields.
.....
The default country info is {.cc=”CN”, .schan=1, .nchan=13, policy=WIFI_COUNTRY_POLICY_AUTO}, if the Wi-Fi Mode is station/AP coexist mode, they share the same configured country info
However, this doesn't help 0_djek, as there is no call to esp_wifi_set_country() anywhere in the current micropython sources.
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

Post Reply