Skip to content

Commit f2d2d55

Browse files
authored
Merge pull request #6 from sparkfun/release_candidate
v1.0.4
2 parents dd34828 + cd72495 commit f2d2d55

File tree

3 files changed

+96
-16
lines changed

3 files changed

+96
-16
lines changed

HighLevelAnalyzer.py

Lines changed: 89 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from saleae.analyzers import HighLevelAnalyzer, AnalyzerFrame, StringSetting, NumberSetting, ChoicesSetting
99
from saleae.data import GraphTimeDelta
1010

11-
# I2C_ADDRESS_SETTING is not used in v1.0.0. TODO: provide filtering on the selected address only
1211
I2C_ADDRESS_SETTING = 'I2C Address (usually 66 = 0x42)'
1312
SPI_CHANNEL_SETTING = 'SPI Channel'
1413
UBLOX_MODULE_SETTING = 'u-blox Module'
@@ -54,34 +53,49 @@ class Hla(HighLevelAnalyzer):
5453
ignore_avail_LSB = 3 # Ignore this byte - it is the LSB of Bytes-Available
5554
ignore_avail_MSB = 4 # Ignore this byte - it is the MSB of Bytes-Available
5655

57-
# UBX Class
56+
# UBX Class (Numerical order)
5857
UBX_CLASS = {
58+
0x01: "NAV",
59+
0x02: "RXM",
60+
0x04: "INF",
5961
0x05: "ACK",
6062
0x06: "CFG",
61-
0x04: "INF",
62-
0x21: "LOG",
63-
0x13: "MGA",
63+
0x09: "UPD",
6464
0x0a: "MON",
65-
0x01: "NAV",
66-
0x29: "NAV2",
67-
0x02: "RXM",
68-
0x27: "SEC",
65+
0x0b: "AID",
66+
0x0c: "DBG",
6967
0x0d: "TIM",
70-
0x09: "UPD"
68+
0x10: "ESF",
69+
0x13: "MGA",
70+
0x21: "LOG",
71+
0x27: "SEC",
72+
0x28: "HNR",
73+
0x29: "NAV2",
74+
0xF0: "NMEA",
75+
0xF1: "PUBX",
76+
0xF4: "RTCM2",
77+
0xF5: "RTCM3",
78+
0xF6: "SPARTN",
79+
0xF7: "NMEA-NAV2"
7180
}
7281

73-
# UBX ID
82+
# UBX ID (Alphabetical order - as per the interface description)
7483
UBX_ID = {
7584
# ACK
7685
(0x05, 0x01): "ACK",
7786
(0x05, 0x00): "NACK",
7887
# CFG
7988
(0x06, 0x13): "ANT",
89+
(0x06, 0x93): "BATCH",
8090
(0x06, 0x09): "CFG",
8191
(0x06, 0x06): "DAT",
8292
(0x06, 0x70): "DGNSS",
93+
(0x06, 0x4c): "ESFA",
94+
(0x06, 0x56): "ESFALG",
95+
(0x06, 0x4d): "ESFG",
8396
(0x06, 0x69): "GEOFENCE",
8497
(0x06, 0x3e): "GNSS",
98+
(0x06, 0x5c): "HNR",
8599
(0x06, 0x02): "INF",
86100
(0x06, 0x39): "ITFM",
87101
(0x06, 0x47): "LOGFILTER",
@@ -90,6 +104,8 @@ class Hla(HighLevelAnalyzer):
90104
(0x06, 0x23): "NAVX5",
91105
(0x06, 0x17): "NMEA",
92106
(0x06, 0x1e): "ODO",
107+
(0x06, 0x3b): "PM2",
108+
(0x06, 0x86): "PMS",
93109
(0x06, 0x00): "PRT",
94110
(0x06, 0x57): "PWR",
95111
(0x06, 0x08): "RATE",
@@ -102,6 +118,17 @@ class Hla(HighLevelAnalyzer):
102118
(0x06, 0x8c): "VALDEL",
103119
(0x06, 0x8b): "VALGET",
104120
(0x06, 0x8a): "VALSET",
121+
# ESF
122+
(0x10, 0x14): "ALG",
123+
(0x10, 0x15): "INS",
124+
(0x10, 0x02): "MEAS",
125+
(0x10, 0x03): "RAW",
126+
(0x10, 0x13): "RESETALG",
127+
(0x10, 0x10): "STATUS",
128+
# HNR
129+
(0x28, 0x01): "ATT",
130+
(0x28, 0x02): "INS",
131+
(0x28, 0x00): "PVT",
105132
# INF
106133
(0x04, 0x04): "DEBUG",
107134
(0x04, 0x00): "ERROR",
@@ -120,8 +147,10 @@ class Hla(HighLevelAnalyzer):
120147
(0x21, 0x04): "STRING",
121148
# MGA
122149
(0x13, 0x60): "ACK",
150+
(0x13, 0x20): "ANO",
123151
(0x13, 0x03): "BDS",
124152
(0x13, 0x80): "DBD",
153+
(0x13, 0x21): "FLASH",
125154
(0x13, 0x02): "GAL",
126155
(0x13, 0x06): "GLO",
127156
(0x13, 0x00): "GPS",
@@ -136,52 +165,70 @@ class Hla(HighLevelAnalyzer):
136165
(0x0a, 0x02): "IO",
137166
(0x0a, 0x06): "MSGPP",
138167
(0x0a, 0x27): "PATCH",
168+
(0x0a, 0x35): "PMP",
169+
(0x0a, 0x2b): "PT2",
139170
(0x0a, 0x38): "RF",
140171
(0x0a, 0x07): "RXBUF",
141172
(0x0a, 0x21): "RXR",
173+
(0x0a, 0x2e): "SMGR",
142174
(0x0a, 0x31): "SPAN",
143175
(0x0a, 0x39): "SYS",
176+
(0x0a, 0x0e): "TEMP",
144177
(0x0a, 0x08): "TXBUF",
145178
(0x0a, 0x04): "VER",
146179
# NAV
180+
(0x01, 0x05): "ATT",
181+
(0x01, 0x60): "AOPSTATUS",
147182
(0x01, 0x22): "CLOCK",
148183
(0x01, 0x36): "COV",
184+
(0x01, 0x31): "DGPS",
149185
(0x01, 0x04): "DOP",
186+
(0x01, 0x3d): "EELL",
150187
(0x01, 0x61): "EOE",
151188
(0x01, 0x39): "GEOFENCE",
189+
(0x01, 0x37): "HNR",
152190
(0x01, 0x13): "HPPOSECEF",
153191
(0x01, 0x14): "HPPOSLLH",
192+
(0x01, 0x28): "NMI",
154193
(0x01, 0x09): "ODO",
155194
(0x01, 0x34): "ORB",
156195
(0x01, 0x62): "PL",
157196
(0x01, 0x01): "POSECEF",
158197
(0x01, 0x02): "POSLLH",
198+
(0x01, 0x17): "PVAT",
159199
(0x01, 0x07): "PVT",
160200
(0x01, 0x3C): "RELPOSNED",
161201
(0x01, 0x10): "RESETODO",
162202
(0x01, 0x35): "SAT",
163203
(0x01, 0x32): "SBAS",
164204
(0x01, 0x43): "SIG",
165205
(0x01, 0x42): "SLAS",
206+
(0x01, 0x06): "SOL",
166207
(0x01, 0x03): "STATUS",
167208
(0x01, 0x3B): "SVIN",
209+
(0x01, 0x30): "SVINFO",
168210
(0x01, 0x24): "TIMEBDS",
169211
(0x01, 0x25): "TIMEGAL",
170212
(0x01, 0x23): "TIMEGLO",
171213
(0x01, 0x20): "TIMEGPS",
172214
(0x01, 0x26): "TIMELS",
173-
(0x01, 0x27): "TIMEQZSS",
174215
(0x01, 0x21): "TIMEUTC",
216+
(0x01, 0x63): "TIMENAVIC",
217+
(0x01, 0x27): "TIMEQZSS",
218+
(0x01, 0x64): "TIMETRUSTED",
175219
(0x01, 0x11): "VELECEF",
176220
(0x01, 0x12): "VELNED",
177221
# NAV2
178222
(0x29, 0x22): "CLOCK",
179223
(0x29, 0x36): "COV",
224+
(0x29, 0x31): "DGPS",
180225
(0x29, 0x04): "DOP",
181226
(0x29, 0x61): "EOE",
227+
(0x29, 0x3d): "EELL",
182228
(0x29, 0x09): "ODO",
183229
(0x29, 0x01): "POSECEF",
184230
(0x29, 0x02): "POSLLH",
231+
(0x29, 0x17): "PVAT",
185232
(0x29, 0x07): "PVT",
186233
(0x29, 0x35): "SAT",
187234
(0x29, 0x32): "SBAS",
@@ -194,12 +241,17 @@ class Hla(HighLevelAnalyzer):
194241
(0x29, 0x23): "TIMEGLO",
195242
(0x29, 0x20): "TIMEGPS",
196243
(0x29, 0x26): "TIMELS",
197-
(0x29, 0x27): "TIMEQZSS",
244+
(0x29, 0x63): "TIMENAVIC",
198245
(0x29, 0x21): "TIMEUTC",
246+
(0x29, 0x27): "TIMEQZSS",
199247
(0x29, 0x11): "VELECEF",
200248
(0x29, 0x12): "VELNED",
201249
# RXM
202250
(0x02, 0x34): "COR",
251+
(0x02, 0x84): "MEAS20",
252+
(0x02, 0x86): "MEAS50",
253+
(0x02, 0x82): "MEASC12",
254+
(0x02, 0x80): "MEASD12",
203255
(0x02, 0x14): "MEASX",
204256
(0x02, 0x72): "PMP",
205257
(0x02, 0x41): "PMREQ",
@@ -211,10 +263,24 @@ class Hla(HighLevelAnalyzer):
211263
(0x02, 0x33): "SPARTN",
212264
(0x02, 0x36): "SPARTNKEY",
213265
# SEC
266+
(0x27, 0x04): "ECSIGN",
267+
(0x27, 0x0A): "OSNMA",
268+
(0x27, 0x05): "SESSID",
269+
(0x27, 0x09): "SIG",
270+
(0x27, 0x10): "SIGLOG",
271+
(0x27, 0x01): "SIGN",
214272
(0x27, 0x03): "UNIQID",
215273
# TIM
274+
(0x0d, 0x11): "DOSC",
275+
(0x0d, 0x16): "FCHG",
276+
(0x0d, 0x17): "HOC",
277+
(0x0d, 0x13): "SMEAS",
278+
(0x0d, 0x04): "SVIN",
279+
(0x0d, 0x05): "SYNC",
216280
(0x0d, 0x03): "TM2",
281+
(0x0d, 0x12): "TOS",
217282
(0x0d, 0x01): "TP",
283+
(0x0d, 0x15): "VCOCAL",
218284
(0x0d, 0x06): "VRFY",
219285
# UPD
220286
(0x09, 0x14): "SOS"
@@ -454,10 +520,18 @@ def analyze_ubx(self, frame, value):
454520

455521
if self.this_is_byte == 0:
456522
self.ack_class = value
457-
return AnalyzerFrame('message', frame.start_time, frame.end_time, {'str': self.UBX_CLASS[value]})
523+
if value in self.UBX_CLASS:
524+
class_str = self.UBX_CLASS[value]
525+
else:
526+
class_str = 'Class'
527+
return AnalyzerFrame('message', frame.start_time, frame.end_time, {'str': class_str})
458528
elif self.this_is_byte == 1:
529+
if (self.ack_class, value) in self.UBX_ID:
530+
id_str = self.UBX_ID[self.ack_class, value]
531+
else:
532+
id_str = 'ID'
459533
return AnalyzerFrame('message', frame.start_time, frame.end_time,
460-
{'str': self.UBX_ID[self.ack_class, value]})
534+
{'str': id_str})
461535
else:
462536
return AnalyzerFrame('message', frame.start_time, frame.end_time, {'str': '?'})
463537

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ Written for the [Saleae Logic Pro 8 USB Logic Analyzer](https://www.sparkfun.com
1515

1616
[![Saleae Logic Pro 8 USB Logic Analyzer](https://cdn.sparkfun.com//assets/parts/1/0/3/3/0/13196-04.jpg)](https://www.sparkfun.com/products/13196)
1717

18+
## v1.0.4
19+
20+
Contributed by [@cturvey](https://github.com/cturvey) :
21+
22+
* Filled out the Classes and Public Commands (PR #5)
23+
1824
## v1.0.3
1925

2026
* Bug fix: correct calls to analyze_signed in POSECEF and POSLLH

extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "u-blox UBX",
33
"apiVersion": "1.0.0",
44
"author": "SparkFun & Contributors",
5-
"version": "1.0.3",
5+
"version": "1.0.4",
66
"description": "A Logic2 High Level Analyzer for the u-blox UBX protocol. Also supports NMEA and RTCM.",
77
"extensions": {
88
"SparkFun_u-blox_UBX_HLA": {

0 commit comments

Comments
 (0)