-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Access DHCP options in STA mode? #1263
Comments
Whatever is implemented in LwIP, we have access to. |
Thanks - looks like it only parses DHCP options it really needs. If anyone else is interested, I'm looking to extend it to over things like syslog, ntp and so forth. |
I m interested |
I would like to have access to DHCP option 42 (NTP server). Unfortunately LWIP discards this option currently. But as the code in /tools/sdk/lwip/src/ is apparently not being compiled in the Arduino IDE.
|
I'm interested as well. I'd like to be able to set the The Captive-Portal DHCPv4 option (160). |
Can esp8266 be used to automatically connect to a router. The router is a dhcp server and I want esp8266 to act as a dhcp client. Any suggestions on how to do this and if this is possible? Thanks in advance. |
Yes, it's standard usage. Study the examples included with the core, they
are accessible from the arduino ide menu. Please close this issue, this is
an issue tracker, not a support forum.
…On Aug 10, 2017 4:11 PM, "Shyam Balasubramanian" ***@***.***> wrote:
Can esp8266 be used to automatically connect to a router. The router is a
dhcp server and I want esp8266 to act as a dhcp client.
Any suggestions on how to do this and if this is possible?
Thanks in advance.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1263 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQC6BoQF-Zq5bYoE397_3knJfvnnH8kXks5sW2QJgaJpZM4G46ZP>
.
|
@devyte, was that a response to my query? What is accessible from arduino ide menu, could you clarify? This issue is already closed. Thanks. |
@samacumen ah yes, I was responding via email, so I couldn't tell the issue is already closed. |
@samacumen Did you find the way to change between DHCP and StaticIP in Station mode? |
The examples are available from the Arduino IDE. |
Is there any clue on how to change DHCP Server default IP range from 192.168.244.x or 192.168.4.x to other custom range such as 192.168.43.x? I can not find any documentation on this, I need to change the default DHCP Server options on AP Mode. Please help.. |
I would like to see this reopened (unless there is some other issue or implementation for this already) |
@d-a-v what I'm looking for in this case is dhcp-client hook to get these options when connection to a network that might have them. (so not dhcp-server mode when ESP is running in AP mode,) The reason for mention that here is because OP asked about the use case I'm after so it feels wrong to open duplicate issues for this. But yes, i will try to do so in the correct repo, thanks (unless there already exists). To clearify: the usecase is to get things like syslog ip, or ntp ip in ESP client mode. One thing to note tho is that the dhcp-client code also needs to know that these options should to be requested from dhcp-server (some dhcp servers send all options regardless, while others only sends what was asked from it) |
@NiKiZe Thanks. About your request, lwip2 (through lwIP-v2) already takes care of NTP servers in current master. Check the example esp8266/NTP-TZ-DST. lwIP-v2 does not take care of option 7 syslog IP. We could make a compile-time-patch that would put there a user callback for unparsed options. |
@d-a-v ntp and syslog are just examples, again it should be possible to get any dhcp options. If you only send thru unparsed options you will risk breaking user code if any new options are implemented. So again send on all options parsed or not. I have rolled quite a few NTP solutions on my own since it wasn't available, now the question is how does one get the ntp server provided. (the above approach would solve that as well, and in a generic manner so I don't have to read sources for every option that I want to know about) Also it is very confusing that you link to your private lwip2 repo, shouldnt that be under the esp8266 org? |
@NiKiZe lwip2 is currently experimental, and @d-a-v is handling the implementation pretty much as a one-man army. That's why the odd linking. Lwip2 won't become default for a while to come, but it's being made available because it is known to fix several issues to some specific users. |
I think the easier is to make a callback, either for all dhcp options or only the unhandled ones. The live patch at compile time would be straightforward. About the lwip2 repo, it is currently linked as esp8266/Arduino's submodule and selectable in menus. |
Can I access the additional DHCP options that my DHCP server is supplying to client ?
Things like sys log server can be provided to the clients and I'd really like to be able to access them.
Thanks !
The text was updated successfully, but these errors were encountered: