]>
Commit | Line | Data |
---|---|---|
7dc55d93 | 1 | /* |
50985c20 | 2 | * This file is part of the libsigrok project. |
7dc55d93 AG |
3 | * |
4 | * Copyright (C) 2012 Bert Vermeulen <bert@biot.com> | |
5 | * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> | |
729b01f9 | 6 | * Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> |
7dc55d93 AG |
7 | * |
8 | * This program is free software: you can redistribute it and/or modify | |
9 | * it under the terms of the GNU General Public License as published by | |
10 | * the Free Software Foundation, either version 3 of the License, or | |
11 | * (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | */ | |
21 | ||
6ec6c43b | 22 | #include <config.h> |
7dc55d93 AG |
23 | #include <sys/types.h> |
24 | #include <sys/stat.h> | |
25 | #include <fcntl.h> | |
26 | #include <string.h> | |
22f54192 | 27 | #include <glib.h> |
c1aae900 | 28 | #include <libsigrok/libsigrok.h> |
bbabddbd UH |
29 | #include "libsigrok-internal.h" |
30 | #include "protocol.h" | |
7dc55d93 | 31 | |
a0e0bb41 | 32 | static const uint32_t scanopts[] = { |
1953564a BV |
33 | SR_CONF_CONN, |
34 | SR_CONF_SERIALCOMM, | |
7dc55d93 AG |
35 | }; |
36 | ||
f254bc4b | 37 | static const uint32_t devopts[] = { |
1953564a | 38 | SR_CONF_MULTIMETER, |
1953564a | 39 | SR_CONF_CONTINUOUS, |
5827f61b BV |
40 | SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, |
41 | SR_CONF_LIMIT_MSEC | SR_CONF_SET, | |
7dc55d93 AG |
42 | }; |
43 | ||
bcbef5ed | 44 | static GSList *scan(struct sr_dev_driver *di, GSList *options) |
7dc55d93 | 45 | { |
1a863916 | 46 | struct dmm_info *dmm; |
bcbef5ed ML |
47 | struct sr_config *src; |
48 | GSList *l, *devices; | |
49 | const char *conn, *serialcomm; | |
7dc55d93 AG |
50 | struct sr_dev_inst *sdi; |
51 | struct drv_context *drvc; | |
52 | struct dev_context *devc; | |
d35afa87 | 53 | struct sr_serial_dev_inst *serial; |
2546b05c AG |
54 | int dropped, ret; |
55 | size_t len; | |
56 | uint8_t buf[128]; | |
7dc55d93 | 57 | |
1a863916 UH |
58 | dmm = (struct dmm_info *)di; |
59 | ||
bcbef5ed ML |
60 | conn = serialcomm = NULL; |
61 | for (l = options; l; l = l->next) { | |
62 | src = l->data; | |
63 | switch (src->key) { | |
64 | case SR_CONF_CONN: | |
65 | conn = g_variant_get_string(src->data, NULL); | |
66 | break; | |
67 | case SR_CONF_SERIALCOMM: | |
68 | serialcomm = g_variant_get_string(src->data, NULL); | |
69 | break; | |
70 | } | |
71 | } | |
72 | if (!conn) | |
73 | return NULL; | |
74 | ||
75 | if (!serialcomm) | |
76 | serialcomm = dmm->conn; | |
77 | ||
91219afc | 78 | serial = sr_serial_dev_inst_new(conn, serialcomm); |
d35afa87 | 79 | |
2e360339 | 80 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) |
7dc55d93 | 81 | return NULL; |
7dc55d93 | 82 | |
22f54192 | 83 | sr_info("Probing serial port %s.", conn); |
7dc55d93 | 84 | |
41812aca | 85 | drvc = di->context; |
7dc55d93 | 86 | devices = NULL; |
d35afa87 | 87 | serial_flush(serial); |
bbabddbd | 88 | |
ce3777ad | 89 | /* Request a packet if the DMM requires this. */ |
bcbef5ed ML |
90 | if (dmm->packet_request) { |
91 | if ((ret = dmm->packet_request(serial)) < 0) { | |
ce3777ad UH |
92 | sr_err("Failed to request packet: %d.", ret); |
93 | return FALSE; | |
94 | } | |
95 | } | |
96 | ||
22f54192 UH |
97 | /* |
98 | * There's no way to get an ID from the multimeter. It just sends data | |
99 | * periodically (or upon request), so the best we can do is check if | |
100 | * the packets match the expected format. | |
101 | */ | |
102 | ||
103 | /* Let's get a bit of data and see if we can find a packet. */ | |
104 | len = sizeof(buf); | |
bcbef5ed ML |
105 | ret = serial_stream_detect(serial, buf, &len, dmm->packet_size, |
106 | dmm->packet_valid, 3000, | |
107 | dmm->baudrate); | |
2546b05c AG |
108 | if (ret != SR_OK) |
109 | goto scan_cleanup; | |
7dc55d93 | 110 | |
2546b05c AG |
111 | /* |
112 | * If we dropped more than two packets worth of data, something is | |
113 | * wrong. We shouldn't quit however, since the dropped bytes might be | |
114 | * just zeroes at the beginning of the stream. Those can occur as a | |
22f54192 UH |
115 | * combination of the nonstandard cable that ships with some devices |
116 | * and the serial port or USB to serial adapter. | |
2546b05c | 117 | */ |
bcbef5ed ML |
118 | dropped = len - dmm->packet_size; |
119 | if (dropped > 2 * dmm->packet_size) | |
6bef68a7 | 120 | sr_warn("Had to drop too much data."); |
7dc55d93 | 121 | |
2546b05c | 122 | sr_info("Found device on port %s.", conn); |
7dc55d93 | 123 | |
aac29cc1 | 124 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); |
0af636be | 125 | sdi->status = SR_ST_INACTIVE; |
bcbef5ed ML |
126 | sdi->vendor = g_strdup(dmm->vendor); |
127 | sdi->model = g_strdup(dmm->device); | |
f57d8ffe | 128 | devc = g_malloc0(sizeof(struct dev_context)); |
9f51c463 | 129 | sr_sw_limits_init(&devc->limits); |
1e1bfcd0 UH |
130 | sdi->inst_type = SR_INST_SERIAL; |
131 | sdi->conn = serial; | |
2546b05c | 132 | sdi->priv = devc; |
bcbef5ed | 133 | sdi->driver = di; |
5e23fcab | 134 | sr_channel_new(sdi, 0, SR_CHANNEL_ANALOG, TRUE, "P1"); |
2546b05c AG |
135 | drvc->instances = g_slist_append(drvc->instances, sdi); |
136 | devices = g_slist_append(devices, sdi); | |
137 | ||
138 | scan_cleanup: | |
d35afa87 | 139 | serial_close(serial); |
2546b05c | 140 | |
7dc55d93 AG |
141 | return devices; |
142 | } | |
143 | ||
584560f1 | 144 | static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sdi, |
53b4680f | 145 | const struct sr_channel_group *cg) |
7dc55d93 AG |
146 | { |
147 | struct dev_context *devc; | |
148 | ||
53b4680f | 149 | (void)cg; |
8f996b89 | 150 | |
7dc55d93 | 151 | if (sdi->status != SR_ST_ACTIVE) |
e73ffd42 | 152 | return SR_ERR_DEV_CLOSED; |
7dc55d93 AG |
153 | |
154 | if (!(devc = sdi->priv)) { | |
155 | sr_err("sdi->priv was NULL."); | |
156 | return SR_ERR_BUG; | |
157 | } | |
158 | ||
9f51c463 | 159 | return sr_sw_limits_config_set(&devc->limits, key, data); |
7dc55d93 AG |
160 | } |
161 | ||
584560f1 | 162 | static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, |
53b4680f | 163 | const struct sr_channel_group *cg) |
a1c743fc | 164 | { |
a1c743fc | 165 | (void)sdi; |
53b4680f | 166 | (void)cg; |
a1c743fc BV |
167 | |
168 | switch (key) { | |
0d485e30 | 169 | case SR_CONF_SCAN_OPTIONS: |
584560f1 | 170 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, |
a0e0bb41 | 171 | scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); |
0d485e30 | 172 | break; |
9a6517d1 | 173 | case SR_CONF_DEVICE_OPTIONS: |
584560f1 | 174 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, |
f254bc4b | 175 | devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); |
9a6517d1 | 176 | break; |
a1c743fc | 177 | default: |
bd6fbf62 | 178 | return SR_ERR_NA; |
a1c743fc BV |
179 | } |
180 | ||
181 | return SR_OK; | |
182 | } | |
183 | ||
695dc859 | 184 | static int dev_acquisition_start(const struct sr_dev_inst *sdi) |
7dc55d93 | 185 | { |
7dc55d93 | 186 | struct dev_context *devc; |
1e1bfcd0 | 187 | struct sr_serial_dev_inst *serial; |
7dc55d93 | 188 | |
e73ffd42 BV |
189 | if (sdi->status != SR_ST_ACTIVE) |
190 | return SR_ERR_DEV_CLOSED; | |
191 | ||
208c1d35 | 192 | devc = sdi->priv; |
7dc55d93 | 193 | |
9f51c463 | 194 | sr_sw_limits_acquisition_start(&devc->limits); |
695dc859 | 195 | std_session_send_df_header(sdi, LOG_PREFIX); |
7dc55d93 | 196 | |
bbabddbd | 197 | /* Poll every 50ms, or whenever some data comes in. */ |
1e1bfcd0 | 198 | serial = sdi->conn; |
102f1239 | 199 | serial_source_add(sdi->session, serial, G_IO_IN, 50, |
bcbef5ed | 200 | receive_data, (void *)sdi); |
7dc55d93 AG |
201 | |
202 | return SR_OK; | |
203 | } | |
204 | ||
695dc859 | 205 | static int dev_acquisition_stop(struct sr_dev_inst *sdi) |
7dc55d93 | 206 | { |
6525d819 | 207 | return std_serial_dev_acquisition_stop(sdi, std_serial_dev_close, |
d43b0908 | 208 | sdi->conn, LOG_PREFIX); |
7dc55d93 AG |
209 | } |
210 | ||
bcbef5ed ML |
211 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ |
212 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
213 | &(struct dmm_info) { \ | |
214 | { \ | |
215 | .name = ID, \ | |
216 | .longname = VENDOR " " MODEL, \ | |
217 | .api_version = 1, \ | |
c2fdcc25 | 218 | .init = std_init, \ |
700d6b64 | 219 | .cleanup = std_cleanup, \ |
bcbef5ed | 220 | .scan = scan, \ |
c01bf34c | 221 | .dev_list = std_dev_list, \ |
bcbef5ed ML |
222 | .config_get = NULL, \ |
223 | .config_set = config_set, \ | |
224 | .config_list = config_list, \ | |
225 | .dev_open = std_serial_dev_open, \ | |
226 | .dev_close = std_serial_dev_close, \ | |
227 | .dev_acquisition_start = dev_acquisition_start, \ | |
228 | .dev_acquisition_stop = dev_acquisition_stop, \ | |
41812aca | 229 | .context = NULL, \ |
bcbef5ed ML |
230 | }, \ |
231 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
232 | REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
233 | } | |
3098b390 | 234 | |
329733d9 | 235 | SR_PRIV const struct dmm_info *serial_dmm_drivers[] = { |
bcbef5ed ML |
236 | DMM( |
237 | "bbcgm-2010", metex14, | |
238 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, | |
239 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
240 | sr_m2110_packet_valid, sr_m2110_parse, | |
241 | NULL | |
242 | ), | |
243 | DMM( | |
244 | "digitek-dt4000zc", fs9721, | |
245 | "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400, | |
246 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
247 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
248 | sr_fs9721_10_temp_c | |
249 | ), | |
250 | DMM( | |
251 | "tekpower-tp4000ZC", fs9721, | |
252 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
253 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
254 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
255 | sr_fs9721_10_temp_c | |
256 | ), | |
257 | DMM( | |
258 | "metex-me31", metex14, | |
259 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
260 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
261 | sr_metex14_packet_valid, sr_metex14_parse, | |
262 | NULL | |
263 | ), | |
264 | DMM( | |
265 | "peaktech-3410", metex14, | |
266 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
267 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
268 | sr_metex14_packet_valid, sr_metex14_parse, | |
269 | NULL | |
270 | ), | |
271 | DMM( | |
272 | "mastech-mas345", metex14, | |
273 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
274 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
275 | sr_metex14_packet_valid, sr_metex14_parse, | |
276 | NULL | |
277 | ), | |
278 | DMM( | |
279 | "mastech-ms8250b", fs9721, | |
280 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
281 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
282 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
283 | NULL | |
284 | ), | |
285 | DMM( | |
286 | "va-va18b", fs9721, | |
287 | "V&A", "VA18B", "2400/8n1", 2400, | |
288 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
289 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
290 | sr_fs9721_01_temp_c | |
291 | ), | |
292 | DMM( | |
293 | "va-va40b", fs9721, | |
294 | "V&A", "VA40B", "2400/8n1", 2400, | |
295 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
296 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
297 | sr_fs9721_max_c_min | |
298 | ), | |
299 | DMM( | |
300 | "metex-m3640d", metex14, | |
301 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
302 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
303 | sr_metex14_packet_valid, sr_metex14_parse, | |
304 | NULL | |
305 | ), | |
306 | DMM( | |
307 | "metex-m4650cr", metex14, | |
308 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
309 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
310 | sr_metex14_packet_valid, sr_metex14_parse, | |
311 | NULL | |
312 | ), | |
313 | DMM( | |
314 | "peaktech-4370", metex14, | |
315 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
316 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
317 | sr_metex14_packet_valid, sr_metex14_parse, | |
318 | NULL | |
319 | ), | |
320 | DMM( | |
321 | "pce-pce-dm32", fs9721, | |
322 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
323 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
324 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
325 | sr_fs9721_01_10_temp_f_c | |
326 | ), | |
327 | DMM( | |
328 | "radioshack-22-168", metex14, | |
329 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
330 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
331 | sr_metex14_packet_valid, sr_metex14_parse, | |
332 | NULL | |
333 | ), | |
334 | DMM( | |
335 | "radioshack-22-805", metex14, | |
336 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
337 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
338 | sr_metex14_packet_valid, sr_metex14_parse, | |
339 | NULL | |
340 | ), | |
341 | DMM( | |
342 | "radioshack-22-812", rs9lcd, | |
343 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
344 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
345 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
346 | NULL | |
347 | ), | |
348 | DMM( | |
349 | "tecpel-dmm-8061-ser", fs9721, | |
350 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
351 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
352 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
353 | sr_fs9721_00_temp_c | |
354 | ), | |
355 | DMM( | |
356 | "voltcraft-m3650cr", metex14, | |
357 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
358 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
359 | sr_metex14_packet_valid, sr_metex14_parse, | |
360 | NULL | |
361 | ), | |
362 | DMM( | |
363 | "voltcraft-m3650d", metex14, | |
364 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
365 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
366 | sr_metex14_packet_valid, sr_metex14_parse, | |
367 | NULL | |
368 | ), | |
369 | DMM( | |
370 | "voltcraft-m4650cr", metex14, | |
371 | "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
372 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
373 | sr_metex14_packet_valid, sr_metex14_parse, | |
374 | NULL | |
375 | ), | |
376 | DMM( | |
377 | "voltcraft-me42", metex14, | |
378 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
379 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
380 | sr_metex14_packet_valid, sr_metex14_parse, | |
381 | NULL | |
382 | ), | |
383 | DMM( | |
384 | "voltcraft-vc820-ser", fs9721, | |
385 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
386 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
387 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
388 | NULL | |
389 | ), | |
390 | DMM( | |
391 | /* | |
392 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
393 | * the FS9922 protocol. Instead, it only sets the user-defined | |
394 | * bit "z1" to indicate "diode mode" and "voltage". | |
395 | */ | |
396 | "voltcraft-vc830-ser", fs9922, | |
397 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
398 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
399 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
400 | &sr_fs9922_z1_diode | |
401 | ), | |
402 | DMM( | |
403 | "voltcraft-vc840-ser", fs9721, | |
404 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
405 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
406 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
407 | sr_fs9721_00_temp_c | |
408 | ), | |
409 | DMM( | |
410 | "voltcraft-vc870-ser", vc870, | |
411 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
412 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
413 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
414 | ), | |
415 | DMM( | |
416 | "voltcraft-vc920-ser", ut71x, | |
417 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
418 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
419 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
420 | ), | |
421 | DMM( | |
422 | "voltcraft-vc940-ser", ut71x, | |
423 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
424 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
425 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
426 | ), | |
427 | DMM( | |
428 | "voltcraft-vc960-ser", ut71x, | |
429 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
430 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
431 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
432 | ), | |
433 | DMM( | |
434 | "uni-t-ut60a-ser", fs9721, | |
435 | "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
436 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
437 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
438 | NULL | |
439 | ), | |
440 | DMM( | |
441 | "uni-t-ut60e-ser", fs9721, | |
442 | "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
443 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
444 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
445 | sr_fs9721_00_temp_c | |
446 | ), | |
447 | DMM( | |
448 | /* Note: ES51986 baudrate is actually 19230! */ | |
449 | "uni-t-ut60g-ser", es519xx, | |
450 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
451 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
452 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
453 | NULL | |
454 | ), | |
455 | DMM( | |
456 | "uni-t-ut61b-ser", fs9922, | |
457 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
458 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
459 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
460 | ), | |
461 | DMM( | |
462 | "uni-t-ut61c-ser", fs9922, | |
463 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
464 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
465 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
466 | ), | |
467 | DMM( | |
468 | "uni-t-ut61d-ser", fs9922, | |
469 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
470 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
471 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
472 | ), | |
473 | DMM( | |
474 | "uni-t-ut61e-ser", es519xx, | |
475 | /* Note: ES51922 baudrate is actually 19230! */ | |
476 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
477 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
478 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
479 | NULL | |
480 | ), | |
481 | DMM( | |
482 | "uni-t-ut71a-ser", ut71x, | |
483 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
484 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
485 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
486 | ), | |
487 | DMM( | |
488 | "uni-t-ut71b-ser", ut71x, | |
489 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
490 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
491 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
492 | ), | |
493 | DMM( | |
494 | "uni-t-ut71c-ser", ut71x, | |
495 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
496 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
497 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
498 | ), | |
499 | DMM( | |
500 | "uni-t-ut71d-ser", ut71x, | |
501 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
502 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
503 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
504 | ), | |
505 | DMM( | |
506 | "uni-t-ut71e-ser", ut71x, | |
507 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
508 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
509 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
510 | ), | |
511 | DMM( | |
512 | "iso-tech-idm103n", es519xx, | |
513 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
514 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
515 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
516 | NULL | |
517 | ), | |
b1cadcfb KP |
518 | DMM( |
519 | "tenma-72-7730-ser", ut71x, | |
520 | "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
521 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
522 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
523 | ), | |
0a4549ff UH |
524 | DMM( |
525 | "tenma-72-7732-ser", ut71x, | |
526 | "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
527 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
528 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
529 | ), | |
20f9f1fb UH |
530 | DMM( |
531 | "tenma-72-9380a-ser", ut71x, | |
532 | "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
533 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
534 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
535 | ), | |
bcbef5ed ML |
536 | DMM( |
537 | "tenma-72-7745-ser", fs9721, | |
538 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
539 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
540 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
541 | sr_fs9721_00_temp_c | |
542 | ), | |
543 | DMM( | |
544 | "tenma-72-7750-ser", es519xx, | |
545 | /* Note: ES51986 baudrate is actually 19230! */ | |
546 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
547 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
548 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
549 | NULL | |
550 | ), | |
551 | DMM( | |
552 | "brymen-bm25x", bm25x, | |
553 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
554 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
555 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
556 | NULL | |
557 | ), | |
d79244dc MG |
558 | DMM( |
559 | "velleman-dvm4100", dtm0660, | |
560 | "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1", | |
561 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
562 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
563 | ), | |
564 | DMM( | |
565 | "peaktech-3415", dtm0660, | |
566 | "Peaktech", "3415", "2400/8n1/rts=0/dtr=1", | |
567 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
568 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
569 | ), | |
bcbef5ed ML |
570 | NULL |
571 | }; |