@@ -113,12 +113,11 @@ bool EthConfig::begin(int8_t& espMode) {
113
113
esp3d_log (" ETH spi PHY Type %d" , ESP3D_ETH_PHY_TYPE);
114
114
ETH_SPI.begin (ETH_SPI_SCK, ETH_SPI_MISO, ETH_SPI_MOSI);
115
115
_started = ETH.begin (ETH_PHY_W5500, ESP3D_ETH_PHY_ADDR, ETH_PHY_CS,
116
- ETH_PHY_IRQ, ETH_PHY_RST, ETH_SPI);
117
-
118
-
116
+ ETH_PHY_IRQ, ETH_PHY_RST, ETH_SPI);
119
117
#endif // ESP3D_ETH_PHY_TYPE == TYPE_ETH_PHY_W5500
120
118
121
119
if (_started) {
120
+ esp3d_log (" Starting ethernet success" );
122
121
if (ESP3DSettings::isVerboseBoot ()) {
123
122
esp3d_commands.dispatch (" Starting ethernet" , ESP3DClientType::all_clients,
124
123
no_id, ESP3DMessageType::unique,
@@ -131,31 +130,37 @@ bool EthConfig::begin(int8_t& espMode) {
131
130
ESP3DClientType::all_clients, no_id,
132
131
ESP3DMessageType::unique, ESP3DClientType::system,
133
132
ESP3DAuthenticationLevel::admin);
133
+ esp3d_log (" Failed starting ethernet failed" );
134
+ return false ;
134
135
}
135
136
ETH.setHostname (NetConfig::hostname (true ));
136
-
137
137
// DHCP is only for Client
138
138
if (espMode == ESP_ETH_STA) {
139
139
if (!StartSTA ()) {
140
140
if (ESP3DSettings::isVerboseBoot ()) {
141
+ esp3d_log (" Starting fallback mode" );
141
142
esp3d_commands.dispatch (
142
143
" Starting fallback mode" , ESP3DClientType::all_clients, no_id,
143
144
ESP3DMessageType::unique, ESP3DClientType::system,
144
145
ESP3DAuthenticationLevel::admin);
145
146
}
146
147
espMode = ESP3DSettings::readByte (ESP_ETH_STA_FALLBACK_MODE);
147
- res = true ;
148
+ res = false ;
149
+ return res;
148
150
} else {
151
+ esp3d_log (" Client started" );
149
152
if (ESP3DSettings::isVerboseBoot ()) {
150
153
esp3d_commands.dispatch (" Client started" , ESP3DClientType::all_clients,
151
154
no_id, ESP3DMessageType::unique,
152
155
ESP3DClientType::system,
153
156
ESP3DAuthenticationLevel::admin);
154
157
}
158
+ res = true ;
155
159
}
156
160
}
157
161
// Static IP or DHCP client ?
158
162
if ((ESP3DSettings::readByte (ESP_ETH_STA_IP_MODE) != DHCP_MODE)) {
163
+ esp3d_log (" Show IP" );
159
164
esp3d_commands.dispatch (ETH.localIP ().toString ().c_str (),
160
165
ESP3DClientType::all_clients, no_id,
161
166
ESP3DMessageType::unique, ESP3DClientType::system,
0 commit comments