Commit 01a5df1
Fix HTTP server startup by bypassing uninitialized ETH object in QEMU
Root cause: Network.isConnected() relied on ETH.localIP() which returned 0.0.0.0
because ETH.begin() was skipped to avoid MAC register crash. This prevented
initInterfaces() and server.begin() from being called.
Solution: Modified Network.cpp to check tcpip_adapter directly when WLED_QEMU
is defined, bypassing the uninitialized ETH object. This allows WLED to detect
the network connection established via DHCP and start the HTTP server.
Changes:
- Added tcpip_adapter.h and esp_system.h includes for QEMU mode
- Modified localIP(), subnetMask(), gatewayIP() to query tcpip_adapter directly
- Modified isConnected() to check tcpip_adapter IP assignment
- Modified isEthernet() to always return true in QEMU mode
This completes the QEMU networking fix recommended by @coderabbitai analysis
Co-authored-by: netmindz <[email protected]>1 parent f0ee919 commit 01a5df1
1 file changed
+51
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
5 | 20 | | |
6 | 21 | | |
7 | 22 | | |
| |||
15 | 30 | | |
16 | 31 | | |
17 | 32 | | |
| 33 | + | |
18 | 34 | | |
19 | 35 | | |
20 | 36 | | |
21 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
22 | 47 | | |
23 | 48 | | |
24 | 49 | | |
| |||
28 | 53 | | |
29 | 54 | | |
30 | 55 | | |
| 56 | + | |
31 | 57 | | |
32 | 58 | | |
33 | 59 | | |
34 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
35 | 70 | | |
36 | 71 | | |
37 | 72 | | |
| |||
41 | 76 | | |
42 | 77 | | |
43 | 78 | | |
| 79 | + | |
44 | 80 | | |
45 | 81 | | |
46 | 82 | | |
| |||
73 | 109 | | |
74 | 110 | | |
75 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
76 | 122 | | |
77 | 123 | | |
78 | 124 | | |
79 | 125 | | |
80 | 126 | | |
| 127 | + | |
81 | 128 | | |
82 | 129 | | |
83 | 130 | | |
84 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
85 | 135 | | |
86 | 136 | | |
87 | 137 | | |
88 | 138 | | |
| 139 | + | |
89 | 140 | | |
90 | 141 | | |
91 | 142 | | |
0 commit comments