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