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

esp32-s2: wifi enhancement to include countrycode #3868

Merged
merged 6 commits into from
Dec 28, 2020

Conversation

BennyE
Copy link

@BennyE BennyE commented Dec 23, 2020

This adds support to access the country code as announced by the Wi-Fi access point (if it announces it).

The workaround via esp_wifi_get_country() is necessary as esp_wifi_sta_get_ap_info() returns wifi_ap_record_t where wifi_country_t is empty. Reference to ESP-IDF bug report/issue: espressif/esp-idf#6267

win10-wsl-screenshot

The discussion with @tannewt happened on this commit (so that there is more context, as questions are associated to line numbers):
BennyE@ae3b440
(next time, I'll do this via a draft PR - Thank you! :))

As I haven't added new objects, it should not be necessary to add something to the gc - but I'd love to hear @dhalbert feedback. :)

@tannewt tannewt added enhancement espressif applies to multiple Espressif chips labels Dec 23, 2020
@tannewt tannewt self-requested a review December 23, 2020 20:34
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Just a few requests.

ports/esp32s2/common-hal/wifi/Network.c Outdated Show resolved Hide resolved
ports/esp32s2/common-hal/wifi/Radio.c Show resolved Hide resolved
ports/esp32s2/common-hal/wifi/Radio.c Outdated Show resolved Hide resolved
@BennyE
Copy link
Author

BennyE commented Dec 23, 2020

All suggested changes implemented. I also fixed the trailing line/whitespace that caused the CI to be unhappy.

grafik

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you!

@tannewt tannewt merged commit c3396e4 into adafruit:main Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants