@@ -189,6 +189,13 @@ bool initializeGNSS()
189189 return false ;
190190 }
191191
192+ // Configure COM3 for daisy chain to IPS1
193+ if (!sendWithResponse (" sdio, COM3, DC1, DC2\n\r " , " DataInOut" ))
194+ {
195+ systemPrintln (" GNSS FAIL (DataInOut COM3)" );
196+ return false ;
197+ }
198+
192199 if (!sendWithResponse (" sso, Stream1, COM1, Group1, sec1\n\r " , " SBFOutput" ))
193200 {
194201 systemPrintln (" GNSS FAIL (SBFOutput Stream1)" );
@@ -218,7 +225,7 @@ bool configureGNSSPPS()
218225
219226 systemPrintln (" Configuring GNSS PPS" );
220227
221- String ppsParams = String (" setPPSParameters , " );
228+ String ppsParams = String (" spps , " );
222229 ppsParams += String (mosaicPPSParametersInterval[settings.ppsInterval ]) + String (" , " );
223230 ppsParams += String (mosaicPPSParametersPolarity[settings.ppsPolarity ]) + String (" , " );
224231 ppsParams += String (settings.ppsDelay_ns ) + String (" , " );
@@ -246,3 +253,57 @@ bool configureGNSSPPS()
246253 return true ;
247254}
248255
256+ bool configureGNSSTCPServer ()
257+ {
258+ if (!online.gnss )
259+ return false ;
260+
261+ systemPrintln (" Configuring GNSS TCP Server" );
262+
263+ String tcpParams = String (" siss, IPS1, " );
264+
265+ if (settings.enableTCPServer )
266+ {
267+ tcpParams += String (settings.tcpServerPort ) + String (" , TCP2Way\n\r " );
268+ }
269+ else
270+ {
271+ tcpParams += String (" 0\n\r " );
272+ }
273+
274+ int retries = 3 ;
275+
276+ while (!sendWithResponse (tcpParams, " IPServerSettings" ) && (retries > 0 ))
277+ {
278+ systemPrintln (" No response from mosaic. Retrying - with escape sequence..." );
279+ sendWithResponse (" SSSSSSSSSSSSSSSSSSSS\n\r " , " COM4>" ); // Send escape sequence
280+ retries--;
281+ }
282+
283+ if (retries == 0 )
284+ {
285+ systemPrintln (" GNSS FAIL (IPServerSettings)" );
286+ return false ;
287+ }
288+
289+ // Configure IPS1
290+ if (settings.enableTCPServer )
291+ {
292+ if (!sendWithResponse (" sdio, IPS1, DC2, DC1\n\r " , " DataInOut" ))
293+ {
294+ systemPrintln (" GNSS FAIL (DataInOut IPS1)" );
295+ return false ;
296+ }
297+ }
298+ else
299+ {
300+ if (!sendWithResponse (" sdio, IPS1, none, none\n\r " , " DataInOut" ))
301+ {
302+ systemPrintln (" GNSS FAIL (DataInOut IPS1)" );
303+ return false ;
304+ }
305+ }
306+
307+ systemPrintln (" GNSS TCP Server configured" );
308+ return true ;
309+ }
0 commit comments