@@ -1076,19 +1076,22 @@ bool WLED::initEthernet()
10761076 #ifdef WLED_QEMU
10771077 // QEMU: Skip hardware initialization - QEMU's open_eth doesn't fully emulate MAC registers
10781078 // The ethernet hardware init crashes with LoadStorePIFAddrError in emac_ll_clock_enable_rmii_output
1079- // espresiv ecample on how to init open_eth:
1079+ // espresif ecample on how to init open_eth:
10801080 // https://github.com/espressif/esp-afr-sdk/blob/release/v4.4/examples/common_components/protocol_examples_common/connect.c - look for esp_eth_mac_new_openeth()
10811081
10821082 // Don't call ETH.begin() - avoids MAC register crash
10831083 // But manually initialize lwIP and DHCP for QEMU
10841084 tcpip_adapter_init ();
1085+ #if !defined(WLED_STATIC_IP_DEFAULT_1)
10851086 tcpip_adapter_dhcpc_start (TCPIP_ADAPTER_IF_ETH);
1087+ #else
10861088 // Or set static IP:
1087- // tcpip_adapter_ip_info_t ip_info;
1088- // IP4_ADDR(&ip_info.ip, 10, 0, 2, 15);
1089- // IP4_ADDR(&ip_info.gw, 10, 0, 2, 2);
1090- // IP4_ADDR(&ip_info.netmask, 255, 255, 255, 0);
1091- // tcpip_adapter_set_ip_info(TCPIP_ADAPTER_IF_ETH, &ip_info);
1089+ tcpip_adapter_ip_info_t ip_info;
1090+ IP4_ADDR (&ip_info.ip , 10 , 0 , 2 , 15 );
1091+ IP4_ADDR (&ip_info.gw , 10 , 0 , 2 , 2 );
1092+ IP4_ADDR (&ip_info.netmask , 255 , 255 , 255 , 0 );
1093+ tcpip_adapter_set_ip_info (TCPIP_ADAPTER_IF_ETH, &ip_info);
1094+ #endif // hack
10921095
10931096 // Network stack will still work via QEMU's user-mode networking (slirp)
10941097 DEBUG_PRINTLN (F (" initC: QEMU mode - skipping ETH.begin() hardware initialization" ));
0 commit comments