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

static wifi_country_t wifi_country = EU is not a valid any more #19

Closed
hansju-11 opened this issue Oct 9, 2022 · 6 comments
Closed

Comments

@hansju-11
Copy link

hansju-11 commented Oct 9, 2022

in wifiscan.cpp line 45 ff
static wifi_country_t wifi_country = {"EU", 1,
WIFI_CHANNEL_MAX, 100,
WIFI_COUNTRY_POLICY_MANUAL};

you use EU as a country code. If you do not change this to eg "DE" or use "EU" in setup, the check in line 105

ESP_ERROR_CHECK(
esp_wifi_set_country(&wifi_country)); // set locales for RF and channels

will fail.
according https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html (read at 09.10.2022)

Chapter 6. Supported country codes are “01”(world safe mode) “AT”,”AU”,”BE”,”BG”,”BR”, “CA”,”CH”,”CN”,”CY”,”CZ”,”DE”,”DK”,”EE”,”ES”,”FI”,”FR”,”GB”,”GR”,”HK”,”HR”,”HU”, “IE”,”IN”,”IS”,”IT”,”JP”,”KR”,”LI”,”LT”,”LU”,”LV”,”MT”,”MX”,”NL”,”NO”,”NZ”,”PL”,”PT”, “RO”,”SE”,”SI”,”SK”,”TW”,”US”

EU is not allowed any more.

In paxcounter V3.3.2 I got the error:

[ 10540][I][main.cpp:289] setup(): [src/main.cpp] BLESCAN: on
ESP_ERROR_CHECK failed: esp_err_t 0x102 (ESP_ERR_INVALID_ARG) at 0x40096120
file: ".pio/libdeps/usb/libpax/lib/libpax/wifiscan.cpp" line 106
func: void wifi_sniffer_init(uint16_t)
expression: esp_wifi_set_country(&wifi_country)

I use a old ttgo Lora32 V1 board. (halfile = ttgov1.h)

@cyberman54
Copy link
Contributor

@hansju-11 Thanks for spotting this. The issue comes up with Arduino ESP32 v2.05. Thus, easiest way is to use v2.04, while the issue is not yet fixed in the libpax library.

As maintainer of paxcounter i downgraded paxcounter app to v2.04 today. Use platform_espressif32 = [email protected] in platformio.ini to enforce this.

cyberman54 added a commit to cyberman54/libpax that referenced this issue Oct 19, 2022
@cyberman54
Copy link
Contributor

cyberman54 commented Oct 19, 2022

@hansju-11 i filed a PR to fix this issue.
You can try it by changing the source of libpax in your platformio.ini to this one:
https://github.com/cyberman54/libpax
Or make own fork of libpax and push the PR to it.

@hansju-11
Copy link
Author

hansju-11 commented Oct 19, 2022 via email

@cyberman54 cyberman54 mentioned this issue Oct 19, 2022
@hansju-11
Copy link
Author

hansju-11 commented Oct 23, 2022 via email

@cyberman54
Copy link
Contributor

This issue can be closed, since it was solved with release 1.1.0

@hansju-11
Copy link
Author

perfect, works for me

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

2 participants