This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
sdk:scripts:gps-udp-client-compat [2019/07/08 09:33] fachet |
sdk:scripts:gps-udp-client-compat [2022/09/05 12:00] (current) schmitt |
||
---|---|---|---|
Line 2: | Line 2: | ||
<code c gps-udp-client-compat.are> | <code c gps-udp-client-compat.are> | ||
/* DESC: This script sends the local GPS NMEA stream (incl. serial/checksum) to a remote UDP server. | /* DESC: This script sends the local GPS NMEA stream (incl. serial/checksum) to a remote UDP server. | ||
- | * DESC: The serial number of the device is also send via proprietary extension "$PNMID, <SRIAL>" | ||
* Copyright (C) 2013-2015 NetModule AG, Switzerland | * Copyright (C) 2013-2015 NetModule AG, Switzerland | ||
*/ | */ | ||
Line 8: | Line 7: | ||
void usage() | void usage() | ||
{ | { | ||
- | nb_syslog("Usage: gps-udp-client-compat.are <server> <port>"); | + | nb_syslog("Usage: gps-udp-client.are <server> <port>"); |
exit(1); | exit(1); | ||
} | } | ||
Line 73: | Line 72: | ||
while (1) { | while (1) { | ||
/* wait for socket data */ | /* wait for socket data */ | ||
- | rv = select(gpsd, 3); | + | rv = select(gpsd, 10); |
if (rv > 0) { | if (rv > 0) { | ||
data = recv(gpsd); | data = recv(gpsd); | ||
Line 81: | Line 80: | ||
len = -1; | len = -1; | ||
} else { | } else { | ||
- | /* nothing received */ | + | nb_syslog("nothing received"); |
- | continue; | + | len = -1; |
} | } | ||
if (len <= 0) { | if (len <= 0) { |