]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * This file is part of the libsigrok project. | |
3 | * | |
4 | * Copyright (C) 2012 Bert Vermeulen <bert@biot.com> | |
5 | * Copyright (C) 2012 Alexandru Gagniuc <mr.nuke.me@gmail.com> | |
6 | * Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> | |
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 | ||
22 | #include <config.h> | |
23 | #include <sys/types.h> | |
24 | #include <sys/stat.h> | |
25 | #include <fcntl.h> | |
26 | #include <string.h> | |
27 | #include <glib.h> | |
28 | #include <libsigrok/libsigrok.h> | |
29 | #include "libsigrok-internal.h" | |
30 | #include "protocol.h" | |
31 | ||
32 | static const uint32_t scanopts[] = { | |
33 | SR_CONF_CONN, | |
34 | SR_CONF_SERIALCOMM, | |
35 | }; | |
36 | ||
37 | static const uint32_t drvopts[] = { | |
38 | SR_CONF_MULTIMETER, | |
39 | }; | |
40 | ||
41 | static const uint32_t devopts[] = { | |
42 | SR_CONF_CONTINUOUS, | |
43 | SR_CONF_LIMIT_SAMPLES | SR_CONF_SET, | |
44 | SR_CONF_LIMIT_MSEC | SR_CONF_SET, | |
45 | }; | |
46 | ||
47 | static GSList *scan(struct sr_dev_driver *di, GSList *options) | |
48 | { | |
49 | struct dmm_info *dmm; | |
50 | struct sr_config *src; | |
51 | GSList *l, *devices; | |
52 | const char *conn, *serialcomm; | |
53 | struct sr_dev_inst *sdi; | |
54 | struct dev_context *devc; | |
55 | struct sr_serial_dev_inst *serial; | |
56 | int dropped, ret; | |
57 | size_t len; | |
58 | uint8_t buf[128]; | |
59 | size_t ch_idx; | |
60 | char ch_name[12]; | |
61 | ||
62 | dmm = (struct dmm_info *)di; | |
63 | ||
64 | conn = serialcomm = NULL; | |
65 | for (l = options; l; l = l->next) { | |
66 | src = l->data; | |
67 | switch (src->key) { | |
68 | case SR_CONF_CONN: | |
69 | conn = g_variant_get_string(src->data, NULL); | |
70 | break; | |
71 | case SR_CONF_SERIALCOMM: | |
72 | serialcomm = g_variant_get_string(src->data, NULL); | |
73 | break; | |
74 | } | |
75 | } | |
76 | if (!conn) | |
77 | return NULL; | |
78 | ||
79 | if (!serialcomm) | |
80 | serialcomm = dmm->conn; | |
81 | ||
82 | serial = sr_serial_dev_inst_new(conn, serialcomm); | |
83 | ||
84 | if (serial_open(serial, SERIAL_RDWR) != SR_OK) | |
85 | return NULL; | |
86 | ||
87 | sr_info("Probing serial port %s.", conn); | |
88 | ||
89 | devices = NULL; | |
90 | serial_flush(serial); | |
91 | ||
92 | /* Request a packet if the DMM requires this. */ | |
93 | if (dmm->packet_request) { | |
94 | if ((ret = dmm->packet_request(serial)) < 0) { | |
95 | sr_err("Failed to request packet: %d.", ret); | |
96 | return FALSE; | |
97 | } | |
98 | } | |
99 | ||
100 | /* | |
101 | * There's no way to get an ID from the multimeter. It just sends data | |
102 | * periodically (or upon request), so the best we can do is check if | |
103 | * the packets match the expected format. | |
104 | */ | |
105 | ||
106 | /* Let's get a bit of data and see if we can find a packet. */ | |
107 | len = sizeof(buf); | |
108 | ret = serial_stream_detect(serial, buf, &len, dmm->packet_size, | |
109 | dmm->packet_valid, 3000, | |
110 | dmm->baudrate); | |
111 | if (ret != SR_OK) | |
112 | goto scan_cleanup; | |
113 | ||
114 | /* | |
115 | * If we dropped more than two packets worth of data, something is | |
116 | * wrong. We shouldn't quit however, since the dropped bytes might be | |
117 | * just zeroes at the beginning of the stream. Those can occur as a | |
118 | * combination of the nonstandard cable that ships with some devices | |
119 | * and the serial port or USB to serial adapter. | |
120 | */ | |
121 | dropped = len - dmm->packet_size; | |
122 | if (dropped > 2 * dmm->packet_size) | |
123 | sr_warn("Had to drop too much data."); | |
124 | ||
125 | sr_info("Found device on port %s.", conn); | |
126 | ||
127 | sdi = g_malloc0(sizeof(struct sr_dev_inst)); | |
128 | sdi->status = SR_ST_INACTIVE; | |
129 | sdi->vendor = g_strdup(dmm->vendor); | |
130 | sdi->model = g_strdup(dmm->device); | |
131 | devc = g_malloc0(sizeof(struct dev_context)); | |
132 | sr_sw_limits_init(&devc->limits); | |
133 | sdi->inst_type = SR_INST_SERIAL; | |
134 | sdi->conn = serial; | |
135 | sdi->priv = devc; | |
136 | dmm->channel_count = 1; | |
137 | if (dmm->packet_parse == sr_metex14_4packets_parse) | |
138 | dmm->channel_count = 4; | |
139 | for (ch_idx = 0; ch_idx < dmm->channel_count; ch_idx++) { | |
140 | snprintf(ch_name, sizeof(ch_name), "P%zu", ch_idx); | |
141 | sr_channel_new(sdi, ch_idx, SR_CHANNEL_ANALOG, TRUE, ch_name); | |
142 | } | |
143 | devices = g_slist_append(devices, sdi); | |
144 | ||
145 | scan_cleanup: | |
146 | serial_close(serial); | |
147 | ||
148 | return std_scan_complete(di, devices); | |
149 | } | |
150 | ||
151 | static int config_set(uint32_t key, GVariant *data, | |
152 | const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) | |
153 | { | |
154 | struct dev_context *devc; | |
155 | ||
156 | (void)cg; | |
157 | ||
158 | devc = sdi->priv; | |
159 | ||
160 | return sr_sw_limits_config_set(&devc->limits, key, data); | |
161 | } | |
162 | ||
163 | static int config_list(uint32_t key, GVariant **data, | |
164 | const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) | |
165 | { | |
166 | return STD_CONFIG_LIST(key, data, sdi, cg, scanopts, drvopts, devopts); | |
167 | } | |
168 | ||
169 | static int dev_acquisition_start(const struct sr_dev_inst *sdi) | |
170 | { | |
171 | struct dev_context *devc; | |
172 | struct sr_serial_dev_inst *serial; | |
173 | ||
174 | devc = sdi->priv; | |
175 | ||
176 | sr_sw_limits_acquisition_start(&devc->limits); | |
177 | std_session_send_df_header(sdi); | |
178 | ||
179 | serial = sdi->conn; | |
180 | serial_source_add(sdi->session, serial, G_IO_IN, 50, | |
181 | receive_data, (void *)sdi); | |
182 | ||
183 | return SR_OK; | |
184 | } | |
185 | ||
186 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ | |
187 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
188 | &((struct dmm_info) { \ | |
189 | { \ | |
190 | .name = ID, \ | |
191 | .longname = VENDOR " " MODEL, \ | |
192 | .api_version = 1, \ | |
193 | .init = std_init, \ | |
194 | .cleanup = std_cleanup, \ | |
195 | .scan = scan, \ | |
196 | .dev_list = std_dev_list, \ | |
197 | .dev_clear = std_dev_clear, \ | |
198 | .config_get = NULL, \ | |
199 | .config_set = config_set, \ | |
200 | .config_list = config_list, \ | |
201 | .dev_open = std_serial_dev_open, \ | |
202 | .dev_close = std_serial_dev_close, \ | |
203 | .dev_acquisition_start = dev_acquisition_start, \ | |
204 | .dev_acquisition_stop = std_serial_dev_acquisition_stop, \ | |
205 | .context = NULL, \ | |
206 | }, \ | |
207 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
208 | REQUEST, 1, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
209 | }).di | |
210 | ||
211 | SR_REGISTER_DEV_DRIVER_LIST(serial_dmm_drivers, | |
212 | /* | |
213 | * The items are sorted by chipset first and then model name. | |
214 | * | |
215 | * This reflects the developer's perspective and is preferrable | |
216 | * during maintenance, as a vendor/product based sort order does | |
217 | * not work well for rebranded models, and from a support point | |
218 | * of view it's more important to identify similarities between | |
219 | * models and compatible devices. | |
220 | * | |
221 | * Fold marks {{{ }}} with matching braces were added, to further | |
222 | * speed up navigation in the long list. | |
223 | */ | |
224 | /* asycii based meters {{{ */ | |
225 | DMM( | |
226 | "metrix-mx56c", asycii, "Metrix", "MX56C", | |
227 | "2400/8n1", 2400, ASYCII_PACKET_SIZE, 0, 0, NULL, | |
228 | sr_asycii_packet_valid, sr_asycii_parse, NULL | |
229 | ), | |
230 | /* }}} */ | |
231 | /* bm25x based meters {{{ */ | |
232 | DMM( | |
233 | "brymen-bm25x", bm25x, | |
234 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
235 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
236 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
237 | NULL | |
238 | ), | |
239 | /* }}} */ | |
240 | /* dtm0660 based meters {{{ */ | |
241 | DMM( | |
242 | "peaktech-3415", dtm0660, | |
243 | "PeakTech", "3415", "2400/8n1/rts=0/dtr=1", | |
244 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
245 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
246 | ), | |
247 | DMM( | |
248 | "velleman-dvm4100", dtm0660, | |
249 | "Velleman", "DVM4100", "2400/8n1/rts=0/dtr=1", | |
250 | 2400, DTM0660_PACKET_SIZE, 0, 0, NULL, | |
251 | sr_dtm0660_packet_valid, sr_dtm0660_parse, NULL | |
252 | ), | |
253 | /* }}} */ | |
254 | /* es519xx based meters {{{ */ | |
255 | DMM( | |
256 | "iso-tech-idm103n", es519xx, | |
257 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
258 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
259 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
260 | NULL | |
261 | ), | |
262 | /* | |
263 | * Note: ES51922 and ES51986 baudrate is actually 19230. This is | |
264 | * "out" by .15%, and so is well within the typical 1% margin | |
265 | * that is considered acceptable in UART communication, and thus | |
266 | * should not cause an issue. | |
267 | * | |
268 | * However, using 19230 as baudrate here will not work, as most DMM | |
269 | * cables do not support that baudrate! | |
270 | */ | |
271 | DMM( | |
272 | "tenma-72-7750-ser", es519xx, | |
273 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
274 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
275 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
276 | NULL | |
277 | ), | |
278 | DMM( | |
279 | "uni-t-ut60g-ser", es519xx, | |
280 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
281 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
282 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
283 | NULL | |
284 | ), | |
285 | DMM( | |
286 | "uni-t-ut61e-ser", es519xx, | |
287 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
288 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
289 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
290 | NULL | |
291 | ), | |
292 | /* }}} */ | |
293 | /* fs9721 based meters {{{ */ | |
294 | DMM( | |
295 | "digitek-dt4000zc", fs9721, | |
296 | "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400, | |
297 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
298 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
299 | sr_fs9721_10_temp_c | |
300 | ), | |
301 | DMM( | |
302 | "mastech-ms8250b", fs9721, | |
303 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
304 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
305 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
306 | NULL | |
307 | ), | |
308 | DMM( | |
309 | "pce-pce-dm32", fs9721, | |
310 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
311 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
312 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
313 | sr_fs9721_01_10_temp_f_c | |
314 | ), | |
315 | DMM( | |
316 | "peaktech-3330", fs9721, | |
317 | "PeakTech", "3330", "2400/8n1/dtr=1", 2400, | |
318 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
319 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
320 | sr_fs9721_01_10_temp_f_c | |
321 | ), | |
322 | DMM( | |
323 | "tecpel-dmm-8061-ser", fs9721, | |
324 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
325 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
326 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
327 | sr_fs9721_00_temp_c | |
328 | ), | |
329 | DMM( | |
330 | "tekpower-tp4000ZC", fs9721, | |
331 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
332 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
333 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
334 | sr_fs9721_10_temp_c | |
335 | ), | |
336 | DMM( | |
337 | "tenma-72-7745-ser", fs9721, | |
338 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
339 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
340 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
341 | sr_fs9721_00_temp_c | |
342 | ), | |
343 | DMM( | |
344 | "uni-t-ut60a-ser", fs9721, | |
345 | "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
346 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
347 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
348 | NULL | |
349 | ), | |
350 | DMM( | |
351 | "uni-t-ut60e-ser", fs9721, | |
352 | "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
353 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
354 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
355 | sr_fs9721_00_temp_c | |
356 | ), | |
357 | DMM( | |
358 | "va-va18b", fs9721, | |
359 | "V&A", "VA18B", "2400/8n1", 2400, | |
360 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
361 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
362 | sr_fs9721_01_temp_c | |
363 | ), | |
364 | DMM( | |
365 | "va-va40b", fs9721, | |
366 | "V&A", "VA40B", "2400/8n1", 2400, | |
367 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
368 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
369 | sr_fs9721_max_c_min | |
370 | ), | |
371 | DMM( | |
372 | "voltcraft-vc820-ser", fs9721, | |
373 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
374 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
375 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
376 | NULL | |
377 | ), | |
378 | DMM( | |
379 | "voltcraft-vc840-ser", fs9721, | |
380 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
381 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
382 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
383 | sr_fs9721_00_temp_c | |
384 | ), | |
385 | /* }}} */ | |
386 | /* fs9922 based meters {{{ */ | |
387 | DMM( | |
388 | "sparkfun-70c", fs9922, | |
389 | "SparkFun", "70C", "2400/8n1/rts=0/dtr=1", | |
390 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
391 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
392 | ), | |
393 | DMM( | |
394 | "uni-t-ut61b-ser", fs9922, | |
395 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
396 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
397 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
398 | ), | |
399 | DMM( | |
400 | "uni-t-ut61c-ser", fs9922, | |
401 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
402 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
403 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
404 | ), | |
405 | DMM( | |
406 | "uni-t-ut61d-ser", fs9922, | |
407 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
408 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
409 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
410 | ), | |
411 | DMM( | |
412 | /* | |
413 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
414 | * the FS9922 protocol. Instead, it only sets the user-defined | |
415 | * bit "z1" to indicate "diode mode" and "voltage". | |
416 | */ | |
417 | "voltcraft-vc830-ser", fs9922, | |
418 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
419 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
420 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
421 | &sr_fs9922_z1_diode | |
422 | ), | |
423 | /* }}} */ | |
424 | /* m2110 based meters {{{ */ | |
425 | DMM( | |
426 | "bbcgm-2010", m2110, | |
427 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, | |
428 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
429 | sr_m2110_packet_valid, sr_m2110_parse, | |
430 | NULL | |
431 | ), | |
432 | /* }}} */ | |
433 | /* ms8250d based meters {{{ */ | |
434 | DMM( | |
435 | "mastech-ms8250d", ms8250d, | |
436 | "MASTECH", "MS8250D", "2400/8n1/rts=0/dtr=1", | |
437 | 2400, MS8250D_PACKET_SIZE, 0, 0, NULL, | |
438 | sr_ms8250d_packet_valid, sr_ms8250d_parse, | |
439 | NULL | |
440 | ), | |
441 | /* }}} */ | |
442 | /* metex14 based meters {{{ */ | |
443 | DMM( | |
444 | "mastech-mas345", metex14, | |
445 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
446 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
447 | sr_metex14_packet_valid, sr_metex14_parse, | |
448 | NULL | |
449 | ), | |
450 | DMM( | |
451 | "metex-m3640d", metex14, | |
452 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
453 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
454 | sr_metex14_packet_valid, sr_metex14_parse, | |
455 | NULL | |
456 | ), | |
457 | DMM( | |
458 | "metex-m3860m", metex14, | |
459 | "Metex", "M-3860M", "9600/7n2/rts=0/dtr=1", 9600, | |
460 | 4 * METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
461 | sr_metex14_4packets_valid, sr_metex14_4packets_parse, | |
462 | NULL | |
463 | ), | |
464 | DMM( | |
465 | "metex-m4650cr", metex14, | |
466 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
467 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
468 | sr_metex14_packet_valid, sr_metex14_parse, | |
469 | NULL | |
470 | ), | |
471 | DMM( | |
472 | "metex-me31", metex14, | |
473 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
474 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
475 | sr_metex14_packet_valid, sr_metex14_parse, | |
476 | NULL | |
477 | ), | |
478 | DMM( | |
479 | "peaktech-3410", metex14, | |
480 | "PeakTech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
481 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
482 | sr_metex14_packet_valid, sr_metex14_parse, | |
483 | NULL | |
484 | ), | |
485 | DMM( | |
486 | "peaktech-4370", metex14, | |
487 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
488 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
489 | sr_metex14_packet_valid, sr_metex14_parse, | |
490 | NULL | |
491 | ), | |
492 | DMM( | |
493 | "peaktech-4390a", metex14, | |
494 | "PeakTech", "4390A", "9600/7n2/rts=0/dtr=1", 9600, | |
495 | 4 * METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
496 | sr_metex14_4packets_valid, sr_metex14_4packets_parse, | |
497 | NULL | |
498 | ), | |
499 | DMM( | |
500 | "radioshack-22-168", metex14, | |
501 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
502 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
503 | sr_metex14_packet_valid, sr_metex14_parse, | |
504 | NULL | |
505 | ), | |
506 | DMM( | |
507 | "radioshack-22-805", metex14, | |
508 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
509 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
510 | sr_metex14_packet_valid, sr_metex14_parse, | |
511 | NULL | |
512 | ), | |
513 | DMM( | |
514 | "voltcraft-m3650cr", metex14, | |
515 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
516 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
517 | sr_metex14_packet_valid, sr_metex14_parse, | |
518 | NULL | |
519 | ), | |
520 | DMM( | |
521 | "voltcraft-m3650d", metex14, | |
522 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
523 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
524 | sr_metex14_packet_valid, sr_metex14_parse, | |
525 | NULL | |
526 | ), | |
527 | DMM( | |
528 | "voltcraft-m4650cr", metex14, | |
529 | "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
530 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
531 | sr_metex14_packet_valid, sr_metex14_parse, | |
532 | NULL | |
533 | ), | |
534 | DMM( | |
535 | "voltcraft-me42", metex14, | |
536 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
537 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
538 | sr_metex14_packet_valid, sr_metex14_parse, | |
539 | NULL | |
540 | ), | |
541 | /* }}} */ | |
542 | /* rs9lcd based meters {{{ */ | |
543 | DMM( | |
544 | "radioshack-22-812", rs9lcd, | |
545 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
546 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
547 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
548 | NULL | |
549 | ), | |
550 | /* }}} */ | |
551 | /* ut71x based meters {{{ */ | |
552 | DMM( | |
553 | "tenma-72-7730-ser", ut71x, | |
554 | "Tenma", "72-7730 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
555 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
556 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
557 | ), | |
558 | DMM( | |
559 | "tenma-72-7732-ser", ut71x, | |
560 | "Tenma", "72-7732 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
561 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
562 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
563 | ), | |
564 | DMM( | |
565 | "tenma-72-9380a-ser", ut71x, | |
566 | "Tenma", "72-9380A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
567 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
568 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
569 | ), | |
570 | DMM( | |
571 | "uni-t-ut71a-ser", ut71x, | |
572 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
573 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
574 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
575 | ), | |
576 | DMM( | |
577 | "uni-t-ut71b-ser", ut71x, | |
578 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
579 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
580 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
581 | ), | |
582 | DMM( | |
583 | "uni-t-ut71c-ser", ut71x, | |
584 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
585 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
586 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
587 | ), | |
588 | DMM( | |
589 | "uni-t-ut71d-ser", ut71x, | |
590 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
591 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
592 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
593 | ), | |
594 | DMM( | |
595 | "uni-t-ut71e-ser", ut71x, | |
596 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
597 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
598 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
599 | ), | |
600 | DMM( | |
601 | "voltcraft-vc920-ser", ut71x, | |
602 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
603 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
604 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
605 | ), | |
606 | DMM( | |
607 | "voltcraft-vc940-ser", ut71x, | |
608 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
609 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
610 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
611 | ), | |
612 | DMM( | |
613 | "voltcraft-vc960-ser", ut71x, | |
614 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
615 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
616 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
617 | ), | |
618 | /* }}} */ | |
619 | /* vc870 based meters {{{ */ | |
620 | DMM( | |
621 | "voltcraft-vc870-ser", vc870, | |
622 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
623 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
624 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
625 | ), | |
626 | /* }}} */ | |
627 | /* vc96 based meters {{{ */ | |
628 | DMM( | |
629 | "voltcraft-vc96", vc96, | |
630 | "Voltcraft", "VC-96", "1200/8n2", 1200, | |
631 | VC96_PACKET_SIZE, 0, 0, NULL, | |
632 | sr_vc96_packet_valid, sr_vc96_parse, | |
633 | NULL | |
634 | ), | |
635 | /* }}} */ | |
636 | /* | |
637 | * The list is sorted. Add new items in the respective chip's group. | |
638 | */ | |
639 | ); |