summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver_tsip.c6
-rw-r--r--packet.c13
2 files changed, 12 insertions, 7 deletions
diff --git a/driver_tsip.c b/driver_tsip.c
index 9da3f08b..253aee9e 100644
--- a/driver_tsip.c
+++ b/driver_tsip.c
@@ -837,17 +837,17 @@ static gps_mask_t tsip_analyze(struct gps_device_t *session)
}
break;
case 0xbb: /* Navigation Configuration */
- if (len != 40)
+ if (len != 40 && len != 43) /* see packet.c for explamation */
break;
u1 = getub(buf, 0); /* Subcode */
u2 = getub(buf, 1); /* Operating Dimension */
- u3 = getub(buf, 2); /* DGPS Mode */
+ u3 = getub(buf, 2); /* DGPS Mode (not enabled in Accutime Gold) */
u4 = getub(buf, 3); /* Dynamics Code */
f1 = getbef32((char *)buf, 5); /* Elevation Mask */
f2 = getbef32((char *)buf, 9); /* AMU Mask */
f3 = getbef32((char *)buf, 13); /* DOP Mask */
f4 = getbef32((char *)buf, 17); /* DOP Switch */
- u5 = getub(buf, 21); /* DGPS Age Limit */
+ u5 = getub(buf, 21); /* DGPS Age Limit (not in Accutime Gold) */
gpsd_report(LOG_INF,
"Navigation Configuration %u %u %u %u %f %f %f %f %u\n",
u1, u2, u3, u4, f1, f2, f3, f4, u5);
diff --git a/packet.c b/packet.c
index 0e369e0c..0e3b5b62 100644
--- a/packet.c
+++ b/packet.c
@@ -1741,14 +1741,19 @@ void packet_parse(struct gps_packet_t *lexer)
else if ((0x8e == pkt_id) || (0x8f == pkt_id))
/* pass */ ;
/*
- * [TSIP] says the 0xbb payload should be 44 bytes, but
- * 40 is the only length the TSIP driver knows how to use.
- * We've had a report that the Accutime Gold ships a
- * different length.
+ * This is according to [TSIP].
*/
else if (TSIP_ID_AND_LENGTH(0xbb, 40))
/* pass */ ;
+ /*
+ * The Accutime Gold ships a version of this packet with a
+ * 43-byte payload. We only use the first 21 bytes, and
+ * parts after byte 27 are padding.
+ */
+ else if (TSIP_ID_AND_LENGTH(0xbb, 43))
+ /* pass */ ;
else {
+ /* pass */ ;
gpsd_report(LOG_IO,
"TSIP REJECT pkt_id = %#02x, packetlen= %zu\n",
pkt_id, packetlen);