-
Notifications
You must be signed in to change notification settings - Fork 88
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
running two nodes = duplicate hostname/dns name on DHCP server #167
Comments
this is confirmed causing a problem, as DDNS is unable to handle duplicate hostnames and as such will refuse to offer an IP address if the forward map cannot be set. |
Which part of the above is the hostname? Looks like a fix is possible downstream- micropython/micropython#10635 I guess we could change the hostname to include part of the Pico's UUID. Something like (note:
You might be able to make this change early in your board's edit: I guess this gives us a clue: Lines 27 to 28 in b5bff82
|
the hostname being advertised by the network interface is "PYBD" so in essence 2 devices are called PYBD I was looking to mirror the 'nickname' set in the setup interface into the hostname parameter, but on the current platform I couldn't see a possible way to do it. |
(Attempt to) make the hostname unique per board, by using the last four chars of the unique ID (flash chip ID) as a suffix. Fixes #167
Weird, I thought ours was always configured to be
I'd wondered, this should be doable but needs some changes and a good place to put the hostname wrangling. I added some basic disambiguation here - 33ab1a2 Test builds for that change- and all the other networking fixes, and a much newer build of MicroPython - are available here: https://github.com/pimoroni/enviro/actions/runs/8803662645 |
@Gadgetoid As my board is misbehaving on my custom branch code, I've flashed it with this UF2 to properly test the new firmware and wifi updates. I can confirm that now I've taken my MAC reservation off the DHCP server I immediately get a hostname of EnviroW-7822. Assuming you have picked the end of the UUID that is likely to change most (I have no idea how it's allocated to the flash chip), then this looks to be successful. Providing no one else finds they have the same suffix, this should be enough for the use case. |
I don't know for sure, but I think it's convention to have the bit that changes most on the right. I think this is safer, and easier to implement without extensive testing, than taking user input as the hostname. Though the latter is still possible. |
(Attempt to) make the hostname unique per board, by using the last four chars of the unique ID (flash chip ID) as a suffix. Fixes #167
I've got 2 enviro local on the same wlan, the dhcp see's them both ask for addresses and updates dns successfully, however both of them have the same default hostname that doesn't seem to be able to be changed
eg:
DHCPDISCOVER from 28:c1:05:02:9d (PYBD) via enp2s0
DHCPDISCOVER from 28:c1:05:22:82 (PYBD) via enp2s0
is there anyway to get them to identify themselves differently.
I'm also not sure if this is causing any problems in terms of wifi stability either due to conflicting FQDN as dhcp will also update DDNS with FQDN from dhcp requests.
The text was updated successfully, but these errors were encountered: