summaryrefslogtreecommitdiff
path: root/driver_ubx.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-13 03:49:35 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-13 03:49:35 -0500
commitfc78b62fbcfcf4ce01bf160b40da4afca0c0335a (patch)
tree68b43fad8feaa46baeb1d717e00c91f4528c58a3 /driver_ubx.c
parent0ddafa77fbdbb2f573d879e060735ab6d3436735 (diff)
downloadgpsd-fc78b62fbcfcf4ce01bf160b40da4afca0c0335a.tar.gz
gpsctl ID now gets basic version info from u-blox receivers.
Diffstat (limited to 'driver_ubx.c')
-rw-r--r--driver_ubx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/driver_ubx.c b/driver_ubx.c
index de132183..bd0559d6 100644
--- a/driver_ubx.c
+++ b/driver_ubx.c
@@ -439,6 +439,8 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf,
break;
case UBX_MON_VER:
gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_VER\n");
+ (void)strlcpy(session->subtype,
+ (char *)&buf[UBX_MESSAGE_DATA_OFFSET + 0], 30);
break;
case UBX_MON_EXCEPT:
gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_EXCEPT\n");
@@ -612,6 +614,9 @@ static void ubx_event_hook(struct gps_device_t *session, event_t event)
msg[6] = 0x00;
msg[7] = 0x00;
(void)ubx_write(session, 0x06u, 0x16, msg, 8);
+
+ /* MON_VER: query for version information */
+ (void)ubx_write(session, UBX_CLASS_MON, 0x04, msg, 0);
/*@ +type @*/
/*