mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2025-05-19 10:32:56 +00:00
Move setHostname because it is overwritten
This commit is contained in:
parent
c6088646e0
commit
6f1c5c7c34
1 changed files with 3 additions and 4 deletions
|
@ -102,7 +102,7 @@ void setup()
|
|||
|
||||
WiFi.macAddress(mac);
|
||||
char hostname[30];
|
||||
snprintf(hostname, sizeof(hostname), "ChaosDMX %02X%02X", mac[4], mac[5]);
|
||||
snprintf(hostname, sizeof(hostname), "ChaosDMX-%02X%02X", mac[4], mac[5]);
|
||||
Serial.print("Hostname: ");
|
||||
Serial.println(hostname);
|
||||
|
||||
|
@ -151,14 +151,13 @@ void setup()
|
|||
Serial.println("Initialize as ETH");
|
||||
ESP32_W5500_onEvent();
|
||||
|
||||
ETH.setHostname(hostname);
|
||||
|
||||
|
||||
if (ETH.begin( ETH_MISO, ETH_MOSI, ETH_SCK, ETH_SS, ETH_INT, ETH_SPI_CLOCK_MHZ, ETH_SPI_HOST, mac )) { // Dynamic IP setup
|
||||
Serial.println("ETH initialized");
|
||||
}else{
|
||||
Serial.println("Failed to configure Ethernet");
|
||||
}
|
||||
|
||||
ETH.setHostname(hostname);
|
||||
|
||||
//ESP32_W5500_waitForConnect();
|
||||
uint8_t timeout = 5; // in s
|
||||
|
|
Loading…
Add table
Reference in a new issue