-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.txt
207 lines (154 loc) · 24 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
The ultimate purpose of this project is to create tool from raw data (as
shown in strace logs) to SiRF binary data (usable by open source gpsd(8)).
raw log from device (as captured in strace.log.*) seems to be processed to SiRF binary
format by closed-source system_server process on android (actually probably by
/system/lib/hw/gps.exynos4.so used by it)
That SiRF binary translation is the one we get in SLCLog.gp2, and can be
processed by open source gpsd.
You can check it with:
(1) ./gp2_to_bin.pl < SLCLog.gp2 > SLCLog.bin
(2a) /usr/sbin/gpsd -b -N -D 4 -n SLCLog.bin >& SLCLog.gpsd.txt # ctrl-c when you think it is finished
or
(2b) killall gpsd; /usr/sbin/gpsd -b -N SLCLog.bin & sleep 1; cgps
if you suffer from gpsd(8) "device read of SLCLog.bin returned error or packet sniffer failed sync"
bug (https://savannah.nongnu.org/bugs/index.php?36409), or bigger captures you'll instead have to feed
it via TCP instead:
(1) tcpserver localhost 50100 ./gp2_to_bin.pl data/2/SLCLog.gp2 &
(2a) /usr/sbin/gpsd -b -N -D4 -n tcp://localhost:50100 >& SLCLog.gpsd.txt # ctrl-c when you think it is finished
or
(2b) killall gpsd; /usr/sbin/gpsd -b -N tcp://localhost:50100 & sleep 1; cgps
Raw strace log, when formatted nicely with strace_to_gp2.pl only on first
look looks somewhat similar to SiRF binary format, but is quite different.
for example, strace is:
00/00/0000 12:02:57.133 (0)
A0 A2 -- lead-in
00 06 B3 01 82 00 F3 2D FF 85 2C 05 18 02 03 FF 03 FF 03 FF -- ? (seems to contains some strange sequence number(s)? FIXME find out more)
-- payload1 -- 22 B3 05 36 AD 22 0A D0 0A FF 0D 13 F2 88 2A 0F CC E0 9E F3 C0 D4 3F A9 7B B5 6F B5 7D A1 57 90 03 73 3A 29 5D B8 E0 AC
? 0F 02 03 FF 03 F8 00 00
-- payload2 -- 22 DC FA C9 52 DD F5 2F FD 7D 50 E6 8E 73 E2 DC 0A 03 16 E9 7D AE 3F 0E 8D F7 7D 15 7D 00 17 BD 7C 94 09 9A A2 46 CF EB
? 11 00 03 FF 00 00 03 FF DD 3C F1 39 52 22 75 51 7B C0 6B ED 44 3A 49 E8 00 12 23 BC 00 20 46 FD 41 1A B2 E0 1C 3B 97 AA 83 36 B8 A7 DD B9 E0 73 1A 00 03 FF 03 FF 03 FF 22 D3 14 C9 52 DF 75 2F E5 BD 75 AC 0B E0 1D 3F C6 B2 BF D9 7D ED 7D 4B C6 96 85 AE 82 8A 68 72 83 63 BC A3 DD B8 E0 73 0C 00 03 FF 00 00 03 FE DD 3C FA F6 AD DD 85 2E AA FE E3 7B F5 B8 B6 C1 7E CF E9 2F DF 34 3F 2A B7 29 5D 77 FA 3A 57 B0 03 37 E5 36 A2 47 1F 2C CF 51
B0 B3 -- lead-out
and SLCLog.gp2 maching entry is possibly:
21/06/2014 12:02:57.188 (0)
A0 A2 -- lead-in
00 2B -- length
08 -- MID_50bps
02 18
-- payload1 -- 22 B3 05 36 AD 22 0A D0 0A FF 0D 13 F2 88 2A 0F CC E0 9E F3 C0 D4 3F A9 7B B5 6F B5 7D A1 57 90 03 73 3A 29 5D B8 E0 AC
13 43 -- checksum
B0 B3 -- lead-out
21/06/2014 12:02:57.187 (0)
A0 A2 -- lead-in
00 2B -- length
08 -- MID_50bps
00 0F
-- payload2 -- 22 DC FA C9 52 DD F5 2F FD 7D 50 E6 8E 73 E2 DC 0A 03 16 E9 7D AE 3F 0E 8D F7 7D 15 7D 00 17 BD 7C 94 09 9A A2 46 CF EB
14 DA -- checksum
B0 B3 -- lead-out
21/06/2014 12:02:57.188 (0) A0 A2 00 2B 08 01 11 22 C3 0E C6 AD DD 8A AE 84 3F 94 12 BB C5 B6 17 FF ED DC 43 FF DF B9 02 BE E5 4D 1F E3 C4 68 55 7C C9 47 58 22 46 1F 8C 15 59 B0 B3
21/06/2014 12:02:57.189 (0) A0 A2 00 2B 08 03 1A 22 D3 14 C9 52 DF 75 2F E5 BD 75 AC 0B E0 1D 3F C6 B2 BF D9 7D ED 7D 4B C6 96 85 AE 82 8A 68 72 83 63 BC A3 DD B8 E0 73 16 BA B0 B3
21/06/2014 12:02:57.190 (0) A0 A2 00 2B 08 05 0C 22 C3 05 09 52 22 7A D1 55 01 1C 84 0A 47 49 3E 81 30 16 D0 20 CB C0 D5 48 D6 A2 88 05 C5 A8 4F FC C8 1A C9 5D B8 E0 D3 12 28 B0 B3
Also, while SiRF binary SLCLog.gp2 has format:
A0 A2 -- lead-in
XX XX -- length
XX -- MID (command)
XX XX XX ... -- rest of the payload
XX XX -- checksum
B0 B3 -- lead-out
raw GSD4t strace has format (guessing):
A0 A2 -- lead-in
00 -- always zero? (NOT 3rd (MSB) byte of sequence1, it just wraps around)
03 DE -- sequence1 (fast, ALMOST always incrementing, except on shortest null-commands (15 bytes altogether, and ending with FF FF B0 B3)
00 9E -- sequence2 (slow, same for group of commands, and then increment by one)
00 00 -- size. MSB first. size of full packet (A0A2...B0B3) less 15 bytes (for headers?)
CE D2 -- CRC16 (modbus) [everything after A0A2 up to checksum] -- see http://www.lammertbies.nl/comm/info/crc-calculation.html
note this checksum does not include payload - only sequnces and size!
FF FF -- CRC16 again? (for empty payload packet?)
B0 B3 -- lead-out
or bigger packet:
A0 A2 -- lead-in
00 -- always zero? or 3rd (MSB) byte of sequence1?
03E4 -- sequence1
009F -- sequence2
0014 -- size of payload - 0xf (15 dec)
045B -- CRC16 (modbus) of headers (OK!)
8E 02 03 01 43 03 71 00 00 00 00 00 00 00 00 00 00 00 00 00 -- actual payload
F7 C9 -- CRC16 (modbus) of payload (OK!)
B0 B3 -- lead-out
some of the unknown stuff seems to be sequences of some kind:
lead 00 seq1 seq2 size crcH [payload....] crcB lead-out
--------------------------------------------------------------
A0A2 00 03D7 009D 006D 223F E1 0A 14 20 06 40 FD 84 14 22 05 03 03 14 22 05 13 03 14 22 05 1B 03 14 22 05 16 03 14 22 05 0B 03 14 22 05 0E 03 14 22 06 20 20 03 14 22 05 10 03 14 22 05 15 08 14 22 05 15 08 14 22 05 15 08 14 22 05 12 08 14 22 05 01 08 14 22 05 03 09 14 22 05 16 09 14 22 05 0B 09 14 22 05 0E 09 14 22 05 10 09 14 22 05 12 02 14 22 05 00 0F F530 B0B3
A0A2 00 03D8 009D 0011 C26A E1 0A 3D 04 0F 60 16 55 B4 40 44 20 60 01 88 6F 15 4036 B0B3
A0A2 00 03D9 009D 0324 E597 84 6E 00 00 00 00 3E 93 36 1C 00 09 09 7D 36 95 6E 4D 00 00 EE 33 00 00 00 00 00 4F 05 DC 00 00 FE 56 07 05 0B 00 00 2E 00 7E 00 00 00 00 3F 80 72 27 08 00 03 00 02 BD 3F 81 15 1B C0 8A 8D 8F 1E AC EB 50 0C 14 C0 F2 FF FC 00 10 01 C3 E7 4A FF FF FF A3 FF FE 7A 41 00 00 00 00 00 00 39 00 FE C0 F8 D3 00 83 00 00 00 00 00 75 30 01 0A 01 19 01 18 01 18 01 18 01 18 01 18 01 19 01 18 01 18 01 18 01 8F 00 6C 01 C3 E6 54 00 01 00 00 01 09 00 13 00 02 BD 3F 81 0C E1 C0 86 70 D6 02 07 0B 18 0B EE DA B1 FF FD 00 0E 01 C3 E7 4A FF FF FF BE FF FF 16 21 00 00 00 00 00 00 39 00 00 38 F3 57 00 AF 00 00 00 00 00 75 30 01 0A 01 5C 01 5B 01 5C 01 5C 01 5C 01 5C 01 5C 01 5C 01 5C 01 5C 01 6D 00 6C 01 C3 E6 54 00 02 00 00 01 09 00 1B 00 02 BD 3F 81 11 A6 C0 88 D3 00 D1 22 A7 44 0C 31 5D BE FF FF 00 0E 01 C3 E7 4A 00 00 00 03 FF FF D4 3A 00 00 00 00 00 00 39 00 01 69 03 E2 00 B9 00 00 00 00 00 75 30 01 0A 01 45 01 44 01 45 01 45 01 45 01 45 01 45 01 45 01 45 01 44 01 53 00 21 01 C3 E6 54 00 04 00 00 01 09 00 16 00 04 AD 3F 81 30 91 C0 98 48 99 41 A3 DC C2 0C 34 3F 7B FF F3 00 0D 01 C3 E7 4A FF FF FF 45 FF FD 14 00 00 00 00 00 00 00 39 00 FE 92 08 53 00 1E 00 00 00 17 32 75 30 06 0A 00 A4 00 A4 00 A4 00 A4 00 A4 00 A4 00 A4 00 A4 00 A4 00 A4 00 F4 00 A9 01 C3 E6 54 00 04 00 00 01 09 00 0B 00 04 AD 3F 81 25 9F C0 92 CF E8 6D F7 B7 EC 0B A7 EB 85 FF F9 00 08 01 C3 E7 4A FF FF FF B5 FF FE D4 00 00 00 00 00 00 00 39 00 04 DB 0F 7A 00 00 00 00 00 1C 32 75 30 01 0A 00 CC 00 CC 00 CD 00 CD 00 CD 00 CC 00 CC 00 CC 00 CC 00 CC 01 16 00 8B 01 C3 E6 54 00 05 00 00 01 09 00 0E 00 06 AD 3F 81 52 74 C0 A9 3A 6F C7 1B 9C 18 0B BC B7 C3 FF FC 00 07 01 C3 E7 4A 00 00 00 2B 00 00 AC 00 00 00 00 00 00 00 39 00 08 61 06 80 00 0B 00 00 00 12 32 75 30 01 0A 00 FD 00 FD 00 FD 00 FD 00 FD 00 FD 00 FD 00 FD 00 FD 00 FD 00 EB 02 80 01 C3 E6 54 00 04 FF FF 01 09 00 20 00 02 BD 3F 81 5D A6 C0 AE D3 6F 09 2C 31 AA 0B 95 9E 31 00 00 00 07 01 C3 E7 4A FF FF FF B8 FF FE DD B6 00 00 00 00 00 00 39 00 FF 02 FC F1 00 C2 00 00 00 00 00 75 30 01 0A 01 55 01 55 01 56 01 56 01 56 01 56 01 56 01 55 01 55 01 55 01 84 00 30 01 C3 E6 54 00 02 00 00 01 09 00 10 00 02 BD 3F 81 41 60 C0 A0 B0 6D 3E 51 BD A2 0C 78 65 F3 FF F2 00 02 01 C3 E7 4A FF FF FF C7 FF FF 7B 25 00 00 00 00 00 00 39 00 00 94 F9 7B 00 A2 00 00 00 00 00 75 30 01 0A 01 30 01 30 01 31 01 30 01 30 01 30 01 30 01 30 01 30 01 30 02 46 00 94 01 C3 E6 54 00 01 00 00 01 09 00 BF84 B0B3
A0A2 00 03DA 009D 0023 D792 E1 0A 69 AB 21 40 FE 56 02 80 3F 80 72 27 80 3E 86 AC C1 40 FE 56 40 FA 64 08 80 40 7A 37 8D 60 09 09 C0 7F05 B0B3
A0A2 00 03DB 009D 0037 18AF E1 0A 54 26 35 40 FE 56 20 88 02 40 01 A2 40 1E 26 80 3F 8D A7 8E 60 20 A3 93 3F F0 0B 00 00 00 00 00 80 3E 93 36 1C 3F EF FF 75 33 13 E2 70 3F EF FF 75 5E A6 DD 62 FD16 B0B3
A0A2 00 03DC 009D 004C FB5A 8E 01 02 EE 00 33 AA 7C 00 00 80 00 00 37 81 55 00 04 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1748 B0B3
A0A2 00 03DD 009D 0014 C166 8E 02 03 01 43 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 86B8 B0B3
A0A2 00 03DE 009E 0000 CED2 FFFF B0B3
A0A2 00 03DE 009F 0000 0E83 FFFF B0B3
A0A2 00 03DE 009F 0053 33C3 E1 0A 14 23 08 60 01 01 6C 0C 14 25 06 03 06 07 14 25 06 13 06 07 14 25 06 1B 06 07 14 25 06 16 06 07 14 25 06 0B 06 07 14 25 06 0E 06 07 14 25 07 20 20 06 07 14 25 06 10 06 07 14 25 06 15 04 04 14 25 06 12 04 04 14 25 06 01 04 04 14 25 06 1C 01 01 5540 B0B3
A0A2 00 03DF 009F 006E 223F E1 0A 14 20 07 60 01 01 6C 14 22 05 03 03 14 22 05 13 03 14 22 05 1B 03 14 22 05 16 03 14 22 05 0B 03 14 22 05 0E 03 14 22 06 20 20 03 14 22 05 10 03 14 22 05 15 08 14 22 05 15 08 14 22 05 15 08 14 22 05 12 08 14 22 05 01 08 14 22 05 03 09 14 22 05 16 09 14 22 05 0B 09 14 22 05 0E 09 14 22 05 10 09 14 22 05 01 02 14 22 05 00 0F 9F56 B0B3
A0A2 00 03E0 009F 0324 20AA 84 6F 00 00 00 00 3F 8D A7 8E 00 09 09 7D 36 95 6E 4D 00 00 EE 33 00 00 00 00 00 4F 05 DC 00 01 02 3E 07 05 0B 00 00 2E 00 7E 00 00 00 00 40 7A 37 8D 08 00 03 00 02 BD 40 7A DA 85 3D 6D 42 F5 B9 BB 67 32 0C 14 AA 87 FF FF 00 10 01 C3 E7 7C FF FF FF C4 FF FE 7B C1 00 00 00 00 00 00 39 00 02 C7 08 C1 00 9B 00 00 00 02 00 75 30 01 0A 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 7B 00 62 01 C3 E6 54 00 02 00 00 01 09 00 13 00 02 BD 40 7A D2 40 3D 69 20 42 CD 37 9D 22 0B EE C2 6F FF FE 00 0E 01 C3 E7 7C FF FF FF BE FF FF 15 8C 00 00 00 00 00 00 39 00 00 0E FE 55 00 C0 00 00 00 00 00 75 30 01 0A 01 5B 01 5B 01 5B 01 5B 01 5B 01 5B 01 5B 01 5B 01 5B 01 5B 01 9F 00 37 01 C3 E6 54 00 02 00 00 01 09 00 1B 00 02 BD 40 7A D7 1A 3D 6B 8D 63 50 59 A3 A6 0C 31 58 DC FF FE 00 0E 01 C3 E7 7C FF FF FF E2 FF FF D3 F4 00 00 00 00 00 00 39 00 FD AF FD 40 00 B7 00 00 00 00 00 75 30 01 0A 01 44 01 44 01 44 01 44 01 44 01 44 01 44 01 44 01 44 01 44 01 34 00 31 01 C3 E6 54 00 01 00 00 01 09 00 16 00 04 AD 40 7A F6 06 3D 7B 03 54 B0 A9 96 D4 0C 34 A7 D9 00 0A 00 0D 01 C3 E7 7C FF FF FF 40 FF FD 00 00 00 00 00 00 00 00 39 00 FE E4 15 50 FF FF 00 00 00 1C 32 75 30 06 0A 00 A3 00 A3 00 A3 00 A4 00 A4 00 A3 00 A3 00 A4 00 A4 00 A3 00 D4 00 8C 01 C3 E6 54 00 01 00 00 01 09 00 0B 00 04 AD 40 7A EA E7 3D 75 73 D0 03 CB 08 C4 0B A7 CB 0D FF F9 00 08 01 C3 E7 7C FF FF FF B8 FF FE E0 00 00 00 00 00 00 00 39 00 FF 73 02 B6 FF E1 00 00 00 1B 32 75 30 01 0A 00 CA 00 CB 00 CC 00 CC 00 CC 00 CC 00 CB 00 CB 00 CB 00 CA 01 34 01 88 01 C3 E6 54 00 02 00 00 01 09 00 0E 00 06 AD 40 7B 17 C3 3D 8B E1 D7 51 90 5B 24 0B BC AF 2B 00 00 00 07 01 C3 E7 7C 00 00 00 15 00 00 54 00 00 00 00 00 00 00 39 00 FF AF FE EB 00 28 00 00 00 10 32 75 30 01 0A 00 FE 00 FE 00 FD 00 FD 00 FD 00 FD 00 FD 00 FD 00 FE 00 FE 02 91 01 75 01 C3 E6 54 00 01 00 00 01 09 00 20 00 02 BD 40 7B 22 E8 3D 91 74 74 68 62 85 82 0B 95 8A FB 00 02 00 07 01 C3 E7 7C FF FF FF AB FF FE DD 36 00 00 00 00 00 00 39 00 FF 1C 05 D6 00 C6 00 00 00 00 00 75 30 01 0A 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 9D 00 32 01 C3 E6 54 00 01 00 00 01 09 00 10 00 02 BD 40 7B 06 EC 3D 83 76 18 75 0C B1 42 0C 78 50 3B FF F3 00 02 01 C3 E7 7C FF FF FF D3 FF FF 79 9A 00 00 00 00 00 00 39 00 01 23 F3 B7 00 AB 00 00 00 00 00 75 30 01 0A 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 02 15 00 74 01 C3 E6 54 00 02 00 00 01 09 00 BB66 B0B3
A0A2 00 03E1 009F 0025 D056 E1 0A 69 AB 23 60 01 02 3E 02 80 40 7A 37 8D 80 3F 80 72 27 60 01 02 3E 40 FE 56 08 80 41 73 FC F3 60 09 09 C1 00BA B0B3
A0A2 00 03E2 009F 0038 D9D2 E1 0A 54 26 36 60 01 02 3E 20 88 02 40 01 A3 40 1D DA 80 40 86 D8 FC 60 21 23 47 3F EF ED 00 00 00 00 00 80 3F 8D A7 8E 3F EF FF 75 32 E1 D0 9E 3F EF FF 75 32 AF BE CD 2897 B0B3
A0A2 00 03E3 009F 004C 3EEF 8E 01 02 EE 00 44 28 DC 00 00 80 00 00 37 81 55 00 01 CE 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6717 B0B3
A0A2 00 03E4 009F 0014 045B 8E 02 03 01 43 03 71 00 00 00 00 00 00 00 00 00 00 00 00 00 F7C9 B0B3
A0A2 00 03E5 00A0 0000 C756 FFFF B0B3
A0A2 00 03E5 00A1 0000 0707 FFFF B0B3
A0A2 00 03E5 00A1 0053 3A47 E1 0A 14 23 08 60 01 05 54 0C 14 25 06 03 06 07 14 25 06 13 06 07 14 25 06 1B 06 07 14 25 06 16 06 07 14 25 06 0B 06 07 14 25 06 0E 06 07 14 25 07 20 20 06 07 14 25 06 10 06 07 14 25 06 15 04 04 14 25 06 12 04 04 14 25 06 01 04 04 14 25 06 1C 01 01 6526 B0B3
A0A2 00 03E6 00A1 006E EBC2 E1 0A 14 20 07 60 01 05 54 14 22 05 03 03 14 22 05 13 03 14 22 05 1B 03 14 22 05 16 03 14 22 05 0B 03 14 22 05 0E 03 14 22 06 20 20 03 14 22 05 10 03 14 22 05 15 08 14 22 05 15 08 14 22 05 15 08 14 22 05 12 08 14 22 05 01 08 14 22 05 03 09 14 22 05 16 09 14 22 05 0B 09 14 22 05 0E 09 14 22 05 10 09 14 22 05 15 02 14 22 05 00 0F 30BD B0B3
A0A2 00 03E7 00A1 0183 F63E 85 0B 08 03 05 03 FF 03 FF 00 00 DD 3C FA C9 4F CB F2 4F EB 2A 8C E2 89 03 E8 08 3F 58 C0 2F D7 BC D6 D4 1F DE B2 45 7B 67 AC B0 3D 13 60 F0 30 C0 02 1F 13 05 03 FF 03 FF 00 00 DD 3C FA C9 4F CB F2 4F EB 2A 8C E2 89 03 E8 08 3F 58 80 21 57 BC D6 FD 60 21 4D 93 FB 67 AC 99 42 EC 9F 26 B0 FF F9 EF 1B 05 03 FF 03 FF 00 00 DD 3C FA C9 4F CB F2 4F EB 2A 8C E2 89 03 E8 08 3F 58 80 21 57 BC D6 FD 60 21 4D 93 FB 67 AC 99 42 EC 9F 26 B0 FF F9 EF 16 00 03 FF 00 00 03 FF 5C CD 3E 16 B7 B6 15 B0 04 E9 1F 99 79 63 00 14 1C 44 F7 6D 50 2D 62 42 B3 3D 33 83 F9 67 4F 70 3C E8 94 A6 BC FF 06 1C 0B 00 03 FF 00 00 03 FF DD 3F 05 09 4C 34 F2 46 B4 D5 7F E2 B1 03 EA 08 3F 5F 00 21 57 BC A9 02 9F A3 CD ED 6A 98 53 59 42 D3 61 19 4F 1F 75 D1 0E 05 03 FF 03 FF 03 FF 22 C3 05 36 B0 34 0D B0 14 D5 73 1D 76 FC 17 F7 C0 A7 7F DE A8 43 29 02 9F DE B2 6C 04 98 53 66 BD 13 60 E6 B0 FF F9 EF 20 05 03 FF 03 FF 00 00 DD 3C FA C9 4F CB F2 4F EB 2A 8C E2 89 03 E8 08 3F 58 C0 2F D7 BC D6 D4 1F DE B2 45 7B 67 AC B0 3D 13 60 F0 30 C0 02 1F 10 05 03 FF 03 FF 00 00 DD 3C FA C9 4F CB F2 4F EB 2A 8C E2 89 03 E8 08 3F 58 80 21 57 BC D6 FD 60 21 4D 93 FB 67 AC 99 42 EC 9F 26 B0 FF F9 EF 4966 B0B3
A0A2 00 03E8 00A1 0324 2D2A 84 70 00 00 00 00 40 86 D8 FC 00 09 09 7D 36 95 6E 4D 00 00 EE 33 00 00 00 00 00 4F 05 DC 00 01 06 26 07 05 0B 00 00 2E 00 7E 00 00 00 00 41 73 FC F3 08 00 03 00 02 BD 41 74 9F F1 BA 4F F8 9D 8C 25 61 8A 0C 14 A9 3B FF FB 00 10 01 C3 E7 AE FF FF FF B3 FF FE 7D FE 00 00 00 00 00 00 39 00 FE 20 F9 F8 00 A5 00 00 00 00 00 75 30 01 0A 01 17 01 18 01 18 01 18 01 18 01 18 01 17 01 18 01 18 01 18 02 0D 00 77 01 C3 E7 80 00 02 00 00 01 09 00 13 00 02 BD 41 74 97 9F BA 4B CF A7 AB 4E 65 5A 0B EE C2 37 FF FA 00 0E 01 C3 E7 AE FF FF FF C2 FF FF 14 F2 00 00 00 00 00 00 39 00 01 61 F8 33 00 C5 00 00 00 00 00 75 30 01 0A 01 5A 01 5A 01 5B 01 5B 01 5B 01 5A 01 5A 01 5A 01 5A 01 5A 01 DB 00 3E 01 C3 E7 80 00 02 00 00 01 09 00 1B 00 02 BD 41 74 9C 8F BA 4E 47 83 BF 3F 48 8A 0C 31 45 E8 FF FC 00 0E 01 C3 E7 AE FF FF FF F2 FF FF D3 8C 00 00 00 00 00 00 39 00 FF E1 FB 72 00 C5 00 00 00 00 00 75 30 01 0A 01 43 01 43 01 44 01 44 01 44 01 44 01 44 01 44 01 43 01 44 01 4E 00 1B 01 C3 E7 80 00 04 00 00 01 09 00 16 00 04 AD 41 74 BB 7B BA 5D BD B5 45 7C C3 10 0C 34 AE 7D 00 08 00 0D 01 C3 E7 AE FF FF FF 85 FF FE 14 00 00 00 00 00 00 00 39 00 08 19 F9 4D FF FD 00 00 00 18 32 75 30 06 0A 00 A3 00 A3 00 A4 00 A4 00 A4 00 A4 00 A4 00 A4 00 A3 00 A2 00 AD 00 52 01 C3 E7 80 00 02 FF FF 01 09 00 0B 00 04 AD 41 74 B0 2F BA 58 17 E4 76 D2 BE AC 0B A8 12 53 00 07 00 08 01 C3 E7 AE FF FF FF 9A FF FE 68 00 00 00 00 00 00 00 39 00 02 F5 F7 23 FF F6 00 00 00 1C 32 75 30 01 0A 00 C9 00 CA 00 CB 00 CA 00 CA 00 CA 00 CA 00 CA 00 CA 00 CA 01 30 01 55 01 C3 E7 80 00 01 00 00 01 09 00 0E 00 06 AD 41 74 DD 12 BA 6E 89 49 F4 A7 DF FC 0B BC 77 18 FF F5 00 07 01 C3 E7 AE FF FF FF F5 FF FF D4 00 00 00 00 00 00 00 39 00 FF B5 04 79 FF F7 00 00 00 1C 32 75 30 01 0A 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 02 1B 01 BC 01 C3 E7 80 00 00 00 01 01 09 00 20 00 02 BD 41 74 E8 2A BA 74 15 47 72 9B B8 7A 0B 95 86 9F FF FE 00 07 01 C3 E7 AE FF FF FF C2 FF FE DD 76 00 00 00 00 00 00 39 00 00 89 FB 66 00 C4 00 00 00 00 00 75 30 01 0A 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 55 01 D7 00 58 01 C3 E7 80 00 03 00 00 01 09 00 10 00 02 BD 41 74 CC 77 BA 66 3B E4 26 29 67 12 0C 78 3F D3 FF FC 00 02 01 C3 E7 AE FF FF FF C5 FF FF 77 CD 00 00 00 00 00 00 39 00 FF C1 FD 03 00 B1 00 00 00 01 00 75 30 01 0A 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 02 54 00 32 01 C3 E7 80 00 04 00 00 01 09 00 27D2 B0B3
A0A2 00 03E9 00A1 0026 DC96 E1 0A 69 AB 24 60 01 06 26 02 80 41 73 FC F3 80 40 7A 37 8D 60 01 06 1C 60 01 02 3E 08 80 42 6D C2 59 60 09 09 C2 724B B0B3
A0A2 00 03EA 00A1 0038 D452 E1 0A 54 26 36 60 01 06 26 20 87 02 40 01 A4 40 1D DB 80 41 80 A0 AD 60 21 A3 48 3F F0 00 20 00 00 00 00 80 40 86 D8 FC 3F EF FF 75 11 23 D3 E8 3F EF FF 74 EF 65 D7 33 3094 B0B3
A0A2 00 03EB 00A1 004C 336F 8E 01 02 EE 00 44 28 DC 00 00 80 00 00 37 80 55 00 03 7C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 857B B0B3
A0A2 00 03EC 00A1 0014 09DB 8E 02 03 01 43 03 71 00 00 00 00 00 00 00 00 00 00 00 00 00 F7C9 B0B3
A0A2 00 03ED 00A2 0000 C616 FFFF B0B3
A0A2 00 03ED 00A3 0000 0647 FFFF B0B3
A0A2 00 03ED 00A3 0011 0A87 E1 0A 3D 04 0F 60 16 64 E3 40 48 AE 60 01 3C 51 16 E07F B0B3
A0A2 00 03EE 00A3 0053 3B43 E1 0A 14 23 08 60 01 09 3C 0C 14 25 06 03 06 07 14 25 06 13 06 07 14 25 06 1B 06 07 14 25 06 16 06 07 14 25 06 0B 06 07 14 25 06 0E 06 07 14 25 07 20 20 06 07 14 25 06 10 06 07 14 25 06 15 02 01 14 25 06 12 02 01 14 25 06 01 02 01 14 25 06 1C 01 01 A9BD B0B3
A0A2 00 03EF 00A3 0064 2D3F E1 0A 14 20 07 60 01 09 3C 14 22 05 03 03 14 22 05 13 03 14 22 05 1B 03 14 22 05 16 03 14 22 05 0B 03 14 22 05 0E 03 14 22 06 20 20 03 14 22 05 10 03 14 22 05 03 09 14 22 05 16 09 14 22 05 0B 09 14 22 05 0E 09 14 22 05 10 09 14 22 05 01 02 14 22 05 12 02 14 22 05 15 02 14 22 05 1C 02 14 22 05 00 0F B935 B0B3
A0A2 00 03F0 00A3 0324 EFAB 84 71 00 00 00 00 41 80 A0 AD 00 09 09 7D 36 95 6E 4D 00 00 EE 33 00 00 00 00 00 4F 05 DC 00 01 0A 04 07 05 0B 00 00 2E 00 7E 00 00 00 00 42 6D C2 59 08 00 03 00 02 BD 42 6E 65 5C 37 32 AE 5D AD 44 43 98 0C 14 AC 5A 00 04 00 10 01 C3 E7 E0 FF FF FF 8F FF FE 7D 93 00 00 00 00 00 00 39 00 FC 0A 03 B0 00 A1 00 00 00 00 00 75 30 01 0A 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 18 01 17 01 CC 00 5E 01 C3 E7 80 00 01 00 00 01 09 00 13 00 02 BD 42 6E 5C FE 37 2E 7F 00 B2 A9 6B 02 0B EE C1 2F 00 0A 00 0E 01 C3 E7 E0 FF FF FF CF FF FF 15 22 00 00 00 00 00 00 39 00 00 9D 04 5D 00 BC 00 00 00 00 00 75 30 01 0A 01 5A 01 5A 01 5A 01 5A 01 5A 01 5A 01 5A 01 5A 01 5A 01 5A 01 D0 00 4C 01 C3 E7 80 00 01 00 00 01 09 00 1B 00 02 BD 42 6E 62 03 37 31 01 B7 6D 5A 88 42 0C 31 48 A8 00 02 00 0E 01 C3 E7 E0 FF FF FF F3 FF FF D3 DE 00 00 00 00 00 00 39 00 FF EE 01 4E 00 C9 00 00 00 00 00 75 30 01 0A 01 43 01 43 01 43 01 43 01 43 01 43 01 43 01 43 01 43 01 43 01 5F 00 20 01 C3 E7 80 00 03 00 00 01 09 00 16 00 04 AD 42 6E 80 F0 37 40 78 28 CC 01 8B D2 0C 34 44 E3 FF F5 00 0D 01 C3 E7 E0 FF FF FF BB FF FE EC 00 00 00 00 00 00 00 39 00 03 73 E9 44 00 17 00 00 00 19 32 75 30 06 0A 00 A5 00 A5 00 A6 00 A6 00 A5 00 A5 00 A6 00 A4 00 A4 00 A5 00 ED 00 EC 01 C3 E7 80 00 04 FF FE 01 09 00 0B 00 04 AD 42 6E 75 77 37 3A BB CC F3 47 A8 98 0B A8 04 31 00 01 00 08 01 C3 E7 E0 FF FF FF A4 FF FE 90 00 00 00 00 00 00 00 39 00 01 BD 0C 95 FF F6 00 00 00 14 32 75 30 01 0A 00 C9 00 C9 00 C9 00 C9 00 C9 00 C9 00 C9 00 C9 00 C9 00 C9 00 D1 01 0D 01 C3 E7 80 00 03 00 00 01 09 00 0E 00 06 AD 42 6E A2 61 37 51 30 8B DD 5F 88 70 0B BC A7 33 00 04 00 07 01 C3 E7 E0 FF FF FF FA FF FF E8 00 00 00 00 00 00 00 39 00 03 9E 01 37 00 2D 00 00 00 13 32 75 30 01 0A 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 00 FE 02 50 01 76 01 C3 E7 80 00 01 00 00 01 09 00 20 00 02 BD 42 6E AD 6C 37 56 B6 59 74 DA 0A 76 0B 95 7A A0 FF FB 00 07 01 C3 E7 E0 FF FF FF A9 FF FE DC FA 00 00 00 00 00 00 39 00 FE AB F7 E8 00 CE 00 00 00 00 00 75 30 01 0A 01 54 01 54 01 55 01 55 01 55 01 55 01 55 01 54 01 54 01 54 01 AE 00 2B 01 C3 E7 80 00 02 00 00 01 09 00 10 00 02 BD 42 6E 92 03 37 49 01 89 8A 2B A0 6A 0C 78 3C E3 FF F4 00 02 01 C3 E7 E0 FF FF FF D3 FF FF 75 ED 00 00 00 00 00 00 39 00 02 0A F4 7C 00 A3 00 00 00 00 00 75 30 01 0A 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 01 30 02 7D 00 7C 01 C3 E7 80 00 05 00 00 01 09 00 5CFA B0B3
A0A2 00 03F1 00A3 0026 1E17 E1 0A 69 AB 24 60 01 0A 04 02 80 42 6D C2 59 80 41 73 FC F3 60 01 0A 04 60 01 06 1C 08 80 43 67 87 BF 60 09 09 C3 DFDF B0B3
A0A2 00 03F2 00A3 0038 16D3 E1 0A 54 26 36 60 01 0A 04 20 87 02 40 01 A5 40 1D 60 80 42 79 76 68 60 22 22 CD 3F EF E1 40 00 00 00 00 80 41 80 A0 AD 3F EF FF 74 E6 94 A4 DA 3F EF FF 74 BC 05 75 CB BCE9 B0B3
A0A2 00 03F3 00A3 004C F1EE 8E 01 02 EE 00 44 28 DC 00 00 80 00 00 37 80 55 00 03 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04A4 B0B3
A0A2 00 03F4 00A3 0014 CB5A 8E 02 03 01 43 03 71 00 00 00 00 00 00 00 00 00 00 00 00 00 F7C9 B0B3
---- UTILS AVAILABLE ----
- sirfbin_gp2_to_human.pl -- parses SLCLog.gp2 to verify basic checksums and conformance.
for more parsing:
a) use gp2_to_bin.pl, gpsd(8) and cgps(1)
b) use gp2_to_bin.pl, gpsdecode -v < SLCLog.gp2.bin (from gpsd-clients)
c) use gp2_to_bin.pl, gpsmon SLCLog.gp2.bin (from gpsd-clients)
d) use gp2_to_bin.pl, sirfdump -v SLCLog.gp2.bin ( from https://github.com/mnalis/gps-kit-cvs )
to get SLCLog.gp2 and other debug files, do:
adb shell # connect to your android
su # your need root
mount -oremount,rw /system
vi /system/etc/sirfgps.conf
# remember device in UART_DRIVER (for example /dev/ttySAC1)
# change DEBUGGING_FILES=1 and save
mount -oremount,ro /system
# reboot your android now, start some GPS app, and watch in /data following files:
AGPSLog.txt BriefLog.txt DetailedLog.txt sirf_interface_log.txt SLCLog.gp2
- gp2_to_bin.pl - parses SLCLog.gp2 and creates raw binary commands (like SLCLog.bin)
useful for creating binary files to give to gpsd(8) and cgps(1) to replay session
- sirfbin_to_gp2.pl - parses raw SiRF binary commands (like SLCLog.bin) and
creates SLCLog.gp2 text file. Note: depends od A0A2 / B0B3, so only SiRF OSP and enc4t can be converted.
- strace_to_gp2.pl - converts strace logs to human readable format
parses raw binary communication in strace.log.* files (from /dev/ttySAC1 GPS GSD4t chipset)
and creates human readable log suitible for comparing with SLCLog.gp2 and guessing translations.
To create strace.log.* files, on your android device, start your gps app and do:
# lsof | grep /dev/ttySAC1 # determine PID of system_server (2029) and FD of GPS device (275)
system_se 2029 system 275 ??? ??? ??? ??? /dev/ttySAC1
# sh -c "nohup strace -e trace=open,read,write -e read=275 -e write=275 -tt -v -ff -o strace.log -xx -s 1 -p 2029 &"
# (Note: it will only hexlog reads to 275. It should also log writes, but doesn't seem to work in strace 4.6 on on my cyanogenmod9. remove "-e read=275" to get write command logging
# it could be automated with (make sure GPS app is strarted BEFORE!):
lsof | awk '/ttySAC1/ {print "sh -c \"nohup strace -e trace=open,read,write -tt -ff -xx -s 1 -o strace.log -p", $2, "-e read=" $4, "-e write=" $4, "&\""}' | sh
# (close your GPS app after some time and "killall strace")
do not forget to replace 2029 and 275 numbers with ones you got from lsof command!
- enc4t_gp2_to_raw4t_gp2.pl - checks new encapsulated GSD4t binary protocol (in .gp2 container format) for validity and outputs it without encapsulation (in .gp2 container format)
run as ./strace_to_gp2.pl data/strace4/strace.log.3491 | ./enc4t_gp2_to_raw4t_gp2.pl
- raw4t_gp2_to_human.pl - takes raw GSD4t binary protocol and decodes it in human-readable format
run as ./strace_to_gp2.pl data/strace4/strace.log.3491 | ./enc4t_gp2_to_raw4t_gp2.pl | ./raw4t_gp2_to_human.pl
- gpsd_messages_count.sh - shows SiRF binary messages that gpsd(8) parsed (or didn't)