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 and Ethernet - config static IP auto gw,mask,dns as in Arduino libs #1862

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

JAndrassy
Copy link
Contributor

@JAndrassy JAndrassy commented Dec 1, 2023

The 'config' functions with not all parameters specified should use default values for gw IP, subnet mask and DNS server IP. The first Arduino Ethernet library has this (with begin), I guess the first Arduino WiFi library had it too, but the default values were implemented in the firmware. Then WiFi101 and WiFiNINA are written base on WiFi lib's source code, but without the defaults implemented in firmware. (My PR are waiting to fix that.) The new WiFiS3 and WiFiC3 libraries by Arduino have it right.

This PR adds the default values for gateway, subnet mask and DNS. The solution in LwipIntfDev is the same as in ESP8266 core. And the WiFi library now redirects all versions of config to LwipIntfDev.

Tested with Pico W and W5500

@earlephilhower earlephilhower merged commit abd3547 into earlephilhower:master Dec 1, 2023
12 checks passed
@JAndrassy JAndrassy deleted the net_config_auto branch December 1, 2023 18:26
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.

2 participants