- Notifications
You must be signed in to change notification settings - Fork13.3k
Add callback to allow Static IP per SSID in WiFiMulti#9232
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
Callback before WiFi.begin allows user to configure selected SSID
mcspr commentedFeb 27, 2025
Wouldn't extending 'add' method arguments be more a appropriate solution? Internally, only ssid & pass are stored. No reason not to keep 'IPAddress'es for static config as well |
Sojourneer commentedFeb 28, 2025
That is the more obvious solution. But it has a higher impact on existing API and is less flexible. This solution adds two lines to the code (and two lines of declaration), and zero impact on existing API. |
mcspr commentedFeb 28, 2025
Meaning, there are other use-cases besides config() call? fwiw, default arguments passed at the end of the method can be omitted and .add() call stays the same. IPAddress has default constructor, ::isSet() would notify whether IPAddress was set by the user or not. |
Sojourneer commentedMar 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In my use-case, I am setting the config parameters based on the MAC address (because of various router issues). Yes, that could be done upfront rather than when the SSID is decided. |
mcspr commentedMar 1, 2025
Ok, agreed Style suggestion then - use |
Sojourneer commentedMar 1, 2025
Ok, I'll do it, and change the name as you recommend. Do I need to redo the pull (I'm a noobie at this process)? |
mcspr commentedMar 2, 2025
Just push more commits to Sojourneer:master |
- callback has no return type- private types for the wifimulti class- explici WiFi.config(0U, 0U, 0U); for other APs- formatting, whitespace, uppercase SSID
Callback before WiFi.begin allows user to configure selected SSID.