-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGQ-RFC1201.txt
203 lines (95 loc) · 4.78 KB
/
GQ-RFC1201.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
***************************************************
GQ-RFC1201
GQ Geiger Counter Communication Protocol
***************************************************
Ver 1.10
Status of this Memo
This document specifies a GQ GMC Geiger Counter Communication Protocol for the
communication between GQ GMC Geiger Counter and a computer host via serial port, and requests discussion and suggestions for
improvements. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) GQ Electronics LLC (2012). All Rights Reserved.
Abstract
This document defines a GQ GMC Geiger Counter Communication Protocol
to support communication between GMC Geiger Counter and a computer host via serial port. The protocol allows to send data request command from a computer host to a GQ GMC geiger counter.
**************************
Serial Port configuration
**************************
The serial port communication is based on a fixed baud rate.
Baud: 57600
Data bit: 8
Parity: None
Stop bit: 1
Control: None
**************************
Command format
**************************
A valid command start with ASCII '<' and ended with ASCII '>>'. Both command and parameters are in between '<' and '>>'.
Command is a ASCII string. All parameters of command are true value in hexadecimal.
Direction: All commands are initiated from computer(HOST).
**************************
Commands
**************************
1. Get hardware model and version
Command: <GETVER>>
Return: total 14 bytes ASCII chars from GQ GMC unit. It includes 7 bytes hardware model and 7 bytes firmware version.
e.g.: GMC-300Re 2.10
Firmware supported: GMC-280, GMC-300 Re.2.0x, Re.2.10 or later
2. Get current CPM value
Command: <GETCPM>>
Return: A 16 bit unsigned integer is returned. In total 2 bytes data return from GQ GMC unit. The first byte is MSB byte data and second byte is LSB byte data.
e.g.: 00 1C the returned CPM is 28.
Firmware supported: GMC-280, GMC-300 Re.2.0x, Re.2.10 or later
3. Turn on the GQ GMC heartbeat
Note: This command enable the GQ GMC unit to send count per second data to host every second automatically.
Command: <HEARTBEAT1>>
Return: A 16 bit unsigned integer is returned every second automatically. Each data package consist of 2 bytes data from GQ GMC unit. The first byte is MSB byte data and second byte is LSB byte data.
e.g.: 10 1C the returned 1 second count is 28. Only lowest 14 bits are used for the valid data bit. The highest bit 15 and bit 14 are reserved data bits.
Firmware supported: GMC-280, GMC-300 Re.2.10 or later
4. Turn off the GQ GMC heartbeat
Command: <HEARTBEAT0>>
Return: None
Firmware supported: Re.2.10 or later
5. Get battery voltage status
Command: <GETVOLT>>
Return: one byte voltage value of battery (X 10V)
e.g.: return 62(hex) is 9.8V
Firmware supported: GMC-280, GMC-300 Re.2.0x, Re.2.10 or later
6. Request history data from internal flash memory
Command: <SPIR[A2][A1][A0][L1][L0]>>
A2,A1,A0 are three bytes address data, from MSB to LSB. The L1,L0 are the data length requested. L1 is high byte of 16 bit integer and L0 is low byte.
The length normally not exceed 4096 bytes in each request.
Return: The history data in raw byte array.
Comment: The minimum address is 0, and maximum address value is the size of the flash memory of the GQ GMC Geiger count. Check the user manual for particular model flash size.
Firmware supported: GMC-300 Re.2.0x, Re.2.10 or later
7. Get configuration data
Command: <GETCFG>>
Return: The configuration data. Total 256 bytes will be returned.
Firmware supported: GMC-280, GMC-300 Re.2.10 or later
8. Erase all configuration data
Command: <ECFG>>
Return: 0xAA
Firmware supported: GMC-280, GMC-300 Re.2.10 or later
9. Write configuration data
Command: <WCFG[A0][D0]>>
A0 is the address and the D0 is the data byte(hex).
Return: 0xAA
Firmware supported: GMC-280, GMC-300 Re.2.10 or later
10. send a key
Command: <key[D0]>>
D0 is the key value from 0 to 3. It represents software key S1~S4.
Return: none
Firmware supported: GMC-280, GMC-300 Re.2.0x, Re.2.10 or later
Note: for Re.2.11 or later, each key can be a ASCII string: <KEY0>>,<KEY1>>,<KEY2>>,<KEY3>>
11. get serial number
Command: <GETSERIAL>>
Return: serial number in 7 bytes.
Firmware supported: GMC-280, GMC-300 Re.2.11 or later
12. Power OFF
Command: <POWEROFF>>
Return: none
Firmware supported: GMC-280, GMC-300 Re.2.11 or later
13. Reload/Update/Refresh Configuration
Command: <CFGUPDATE>>
Return: 0xAA
Firmware supported: GMC-280, GMC-300 Re.2.20 or later