DCC-EX / CommandStation-EX

EX-CommandStation firmware from DCC-EX. Includes support for WiFi and a standalone WiThrottle server. A complete re-write of the original DCC++.
https://dcc-ex.github.io/
GNU General Public License v3.0
153 stars 103 forks source link

Bug Report: ethernet hostname not set #313

Open prchal opened 1 year ago

prchal commented 1 year ago

Version

4.2.18

Bug description

This version don't set hostname from config.h when ethernet is enabled. It sends to DHCP "WIZnet161208" which is probably default.

Steps to reproduce the bug

  1. connect W5500
  2. define ENABLE_ETHERNET true

  3. define WIFI_HOSTNAME "DCCEX"

  4. turn on
  5. wait for dhcp lease

Expected behaviour

Should set hostname defined in config.h. Previous version 4.1.* did it.

Screenshots

No response

Hardware in use

mega2560, W5500

Additional context

No response

habazut commented 1 year ago

Om Ethernet (not Wifi) the hostname presented in the DHCP request is set by the Ethernet library and I do not see any way to override that. See #define HOST_NAME line 45 of libraries/Ethernet/src/Dhcp.h and line 191 of Dhcp.cpp. To change that, the ethernet library has to be changed.

Or do you want that the Withrottle service is announced with mDNS? In that case someone has to implement that for Ethernet (s in "find library and integrate the code").

Regards, Harald.