@@ -147,7 +147,7 @@ bool gnssHardReset()
147147}
148148
149149// Initialize GNSS
150- // Disable PPS. Set clock sync threshold. Set output messages. Copy config file.
150+ // Disable PPS. Set clock sync threshold. Set output messages. Enable Ethernet. Copy config file.
151151// This only needs to be done once.
152152bool initializeGNSS ()
153153{
@@ -161,7 +161,9 @@ bool initializeGNSS()
161161
162162 int retries = 3 ; // GNSS is already begun. We shouldn't need to retry.
163163
164- while (!sendWithResponse (" eccf, RxDefault, Current\n\r " , " CopyConfigFile" ) && (retries > 0 )) // Restore defaults
164+ // Restore default configuration
165+ // Note: the IP settings set by the setIPSettings and setIPPortSettings commands keep their value
166+ while (!sendWithResponse (" eccf, RxDefault, Current\n\r " , " CopyConfigFile" ) && (retries > 0 ))
165167 {
166168 systemPrintln (" No response from mosaic. Retrying - with escape sequence..." );
167169 sendWithResponse (" SSSSSSSSSSSSSSSSSSSS\n\r " , " COM4>" ); // Send escape sequence
@@ -211,6 +213,13 @@ bool initializeGNSS()
211213 return false ;
212214 }
213215
216+ if (!sendWithResponse (" seth, on\n\r " , " EthernetMode" ))
217+ {
218+ systemPrintln (" GNSS FAIL (EthernetMode)" );
219+ return false ;
220+ }
221+
222+ // Copy current configuration into boot
214223 if (!sendWithResponse (" eccf, Current, Boot\n\r " , " CopyConfigFile" ))
215224 {
216225 systemPrintln (" GNSS FAIL (CopyConfigFile)" );
0 commit comments