-
Notifications
You must be signed in to change notification settings - Fork 20
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
Can edge-dhcp be used as dhcp client with esp-wifi instead of the default there using smoltcp? #55
Comments
Let's start here. Ultimately, you are connected to one and only one access point. Now, if you have multiple access points with the same SSID, the one with the strongest signal should be chosen when connecting, but this you can control I think by specifying concrete BSSID. There also something called "roaming" where you can switch from one access point to another without the IP-stack even realizing this and provided that all of your access points have a single DHCP server and are bridged in the same L2 subnet. If you just created multiple access points with the same SSID which are not bridged and each has its own separate DHCP server and subnet, this is a wrong setup. But with that said, I also don't believe roaming to be your issue. If it is, you should see the esp disconnecting from one BSSID and connecting to another. But then your problem is either on the Wifi level, or a wrong IP config, as per above, where your access points are not bridged. By the way, I am myself running in a setup with multiple access points which are bridged and have the same SSID, and I've never seen any problems with that, including on baremetal and with esp32s3, esp32, esp32c3 c6 etc. I was also running the latest drivers recently (on c3, esp32 and s3) and didn't notice a huge delay or reconnections.
That's not easy. To use it, you need an IP+ethernet layer (Wifi is still "ethernet") that will give you access to the payload of the ethernet frames, so that you can construct your own IP messages. Unfortunately, I don't think smoltcp has hooks for that (yet).
Sure but your request is very generic. Basically help me figure out what is going on. It is very unlikely that folks will have enough time to spend in debugging the issue together with you and having a lot of back-and-forth. I think your best bet is what you have already started: debug with wireshark what is going on in terms of sent received packets. And make really sure, that the Esp is not disconnecting from one access point and connecting to another. If this happens, then you have a different problem altogether, especially if your access points are not in the correct (bridged) setup.
As I said above my first instinct is to check if you have properly bridged the access points, and they are all running with the same single subnet and a single DHCP server. And if you get reconnections in a rapid cycle. |
Thanks! I have a TPLink Omada system and all AP's are wired using ethernet, managed and configured centrally as a single configuration so I guess that means are are bridged properly. There is a single DHCP server. In the logs it seemed like the client is not behaving correctly, and that's a smoltcp issue, so I thought edge-dhcp might be a solution. I exhausted my knowledge with that issue, looks like for now I'll take care of it using the network configuration and will have to wait until it becomes a larger audience issue and they face it with some large paying customer 😄 |
OK. esp-rs/esp-hal#2345 (reply in thread) - this comment is a bit of a key. Why don't you try to figure out why smoltcp is not reusing the transaction id when sending the "request" message? That's indeed weird? |
Background:
I'm using esp32s3 and esp-wifi and face issues getting IP via dhcp when using esp-wifi when several access points serve the SSID (when there is coverage from several AP's). If I enable that SSID on only one of the access points it works.
I discussed this with the esp-hal team in esp-rs/esp-hal#2345 and eventually after a long discussion it looked like unclear behavior in processing dhcp messages on my network and I was told that to debug need to start from smoltcp (esp-rs/esp-hal#2345 (reply in thread)).
I filed an issue with smoltcp at smoltcp-rs/smoltcp#1017 but there was no response for some time.
And the question is:
I noticed this repo has edge-dhcp which is supposed to provide also a dhcp client. So I wondered if I could try and use it instead of the smoltcp one that's in use by esp-wifi by default?
Or maybe, given you have the expertise, you can think of reasons why would DHCP fail under multiple AP's when it's working when only one is serving the SSID?
The text was updated successfully, but these errors were encountered: