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

LwipIntfDev - config static IP auto gw,mask,dns as in Arduino libraries #9040

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

JAndrassy
Copy link
Contributor

so one more, This one is for 'modern' Ethernet libraries W5100lwIP, W5500lwIP and ENC28J60lwIP used without EthernetCompat.
I wrote a test for what I consider a modern Ethernet library (one with config for static IP as in WiFi libraries) and to my surprise these libraries matched my idea. Only the automatic dns, gw, subnet values were not supported here again.

So here is the third PR for auto gw,mask,dns as in Arduino libraries. First was in 'begin' for EthernetCompat, second was config with two parameters in WiFiSTA.
I had to move the clearing of localIP to EthernetCompat.end, because in library with config, disconnect/end should not clear static IP settings. (config(INADDR_NONE) should))

@JAndrassy JAndrassy force-pushed the intfdev_config_auto branch 3 times, most recently from 1e09fa3 to 3152948 Compare November 30, 2023 05:24
for 'modern' Ethernet libraries W5100lwIP, W5500lwIP and ENC28J60lwIP
used without EthernetCompat
@d-a-v
Copy link
Collaborator

d-a-v commented Dec 1, 2023

Thanks for checking and keeping compatibility of the network API across every arduino implementations.

to my surprise these libraries matched my idea.

(what were you thinking ?)

I had to move the clearing of localIP to EthernetCompat.end, because in library with config, disconnect/end should not clear static IP settings. (config(INADDR_NONE) should))

Can you recall where these two requirements are stated (one should not, the other should) ?
Even if you're not arduino official, a link from our documentation to your NetApiHelpers might help anyway.

@JAndrassy
Copy link
Contributor Author

JAndrassy commented Dec 1, 2023

Can you recall where these two requirements are stated (one should not, the other should) ?

It is related to my PR which was then reverted because I found out that all libraries have it as exp8266 WiFi.
relevant comment #9020 (comment)

a link from our documentation to your NetApiHelpers might help anyway

in what context?

(what were you thinking ?)

the surprise is even bigger. there are already 4 libraries which are 'modern Ethernet`: in esp8266 core , in Earle's RP2040 core, in ESP32 and even Arduino's Mbed Core Ethernet (with problems at runtime)

@d-a-v
Copy link
Collaborator

d-a-v commented Dec 1, 2023

Thanks
Given @mcspr's suggestion in the 9020 comment, we'll update the documentation ourselves.

@d-a-v d-a-v merged commit 9e73cf0 into esp8266:master Dec 1, 2023
28 checks passed
@JAndrassy JAndrassy deleted the intfdev_config_auto branch December 1, 2023 11:20
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.

None yet

2 participants