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

WiFi.BSSID and scan result BSSID with parameter as in WiFi libraries by Arduino #8853

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

JAndrassy
Copy link
Contributor

Arduino doc on BSSID getters: https://www.arduino.cc/reference/en/libraries/wifi/wifi.bssid/

I compared more than a dozen of Arduino Networking libraries to find the common API for Arduino networking. Then I wrote a test sketch which checks how a library complies to this common API.

ESP32 Arduino WiFi library was based on ESP8266 Arduino WiFi library which was based on the first WiFi library by Arduino. Arduino later created more WiFi libraries and the API diverged, but at least with the most recent library they looked at the ESP32 WiFi library for new method names (for example dnsIP(n)).

While doing the research and tests I do PR in Arduino networking libraries repositories with in most cases simple modifications to unify the API where it doesn't break the library (for example I will not ask esp8266 and esp32 maintainers to make WiFi.begin blocking :-) ).

Similar PR by me was recently merged in esp8266 Arduino repository.

Copy link
Collaborator

@SuGlider SuGlider left a comment

Choose a reason for hiding this comment

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

@JAndrassy - It sounds good to make it compatible to upstream Arduino WiFi API.
I'd suggest to unify the APIs, instead of creating a second one.

Something like:
unique API would be just uint8_t * BSSID(uint8_t networkItem, uint8_t* bssid = NULL); and uint8_t * BSSID(uint8_t* bssid = NULL);
The code shall test bssid != NULL before copying the information into it.

@JAndrassy JAndrassy force-pushed the wifi_bssid_param branch 2 times, most recently from be44621 to 309a13a Compare November 9, 2023 17:14
@SuGlider SuGlider self-requested a review November 9, 2023 17:34
Copy link
Collaborator

@SuGlider SuGlider left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@me-no-dev me-no-dev merged commit 0b6d20e into espressif:master Nov 10, 2023
37 checks passed
@JAndrassy JAndrassy deleted the wifi_bssid_param branch November 11, 2023 04:00
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

Successfully merging this pull request may close these issues.

3 participants