]>
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 <sys/types.h> | |
23 | #include <sys/stat.h> | |
24 | #include <fcntl.h> | |
25 | #include <string.h> | |
26 | #include <errno.h> | |
27 | #include <glib.h> | |
28 | #include "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->priv; | |
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->priv))->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 | sr_dbg("Setting sample limit to %" PRIu64 ".", | |
182 | devc->limit_samples); | |
183 | break; | |
184 | case SR_CONF_LIMIT_MSEC: | |
185 | devc->limit_msec = g_variant_get_uint64(data); | |
186 | sr_dbg("Setting time limit to %" PRIu64 "ms.", | |
187 | devc->limit_msec); | |
188 | break; | |
189 | default: | |
190 | return SR_ERR_NA; | |
191 | } | |
192 | ||
193 | return SR_OK; | |
194 | } | |
195 | ||
196 | static int config_list(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, | |
197 | const struct sr_channel_group *cg) | |
198 | { | |
199 | (void)sdi; | |
200 | (void)cg; | |
201 | ||
202 | switch (key) { | |
203 | case SR_CONF_SCAN_OPTIONS: | |
204 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
205 | scanopts, ARRAY_SIZE(scanopts), sizeof(uint32_t)); | |
206 | break; | |
207 | case SR_CONF_DEVICE_OPTIONS: | |
208 | *data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32, | |
209 | devopts, ARRAY_SIZE(devopts), sizeof(uint32_t)); | |
210 | break; | |
211 | default: | |
212 | return SR_ERR_NA; | |
213 | } | |
214 | ||
215 | return SR_OK; | |
216 | } | |
217 | ||
218 | static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) | |
219 | { | |
220 | struct dev_context *devc; | |
221 | struct sr_serial_dev_inst *serial; | |
222 | ||
223 | if (sdi->status != SR_ST_ACTIVE) | |
224 | return SR_ERR_DEV_CLOSED; | |
225 | ||
226 | if (!(devc = sdi->priv)) { | |
227 | sr_err("sdi->priv was NULL."); | |
228 | return SR_ERR_BUG; | |
229 | } | |
230 | ||
231 | devc->cb_data = cb_data; | |
232 | ||
233 | /* | |
234 | * Reset the number of samples to take. If we've already collected our | |
235 | * quota, but we start a new session, and don't reset this, we'll just | |
236 | * quit without acquiring any new samples. | |
237 | */ | |
238 | devc->num_samples = 0; | |
239 | devc->starttime = g_get_monotonic_time(); | |
240 | ||
241 | /* Send header packet to the session bus. */ | |
242 | std_session_send_df_header(cb_data, LOG_PREFIX); | |
243 | ||
244 | /* Poll every 50ms, or whenever some data comes in. */ | |
245 | serial = sdi->conn; | |
246 | serial_source_add(sdi->session, serial, G_IO_IN, 50, | |
247 | receive_data, (void *)sdi); | |
248 | ||
249 | return SR_OK; | |
250 | } | |
251 | ||
252 | static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) | |
253 | { | |
254 | return std_serial_dev_acquisition_stop(sdi, cb_data, std_serial_dev_close, | |
255 | sdi->conn, LOG_PREFIX); | |
256 | } | |
257 | ||
258 | #define DMM(ID, CHIPSET, VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, \ | |
259 | DELAY, REQUEST, VALID, PARSE, DETAILS) \ | |
260 | &(struct dmm_info) { \ | |
261 | { \ | |
262 | .name = ID, \ | |
263 | .longname = VENDOR " " MODEL, \ | |
264 | .api_version = 1, \ | |
265 | .init = init, \ | |
266 | .cleanup = cleanup, \ | |
267 | .scan = scan, \ | |
268 | .dev_list = dev_list, \ | |
269 | .dev_clear = dev_clear, \ | |
270 | .config_get = NULL, \ | |
271 | .config_set = config_set, \ | |
272 | .config_list = config_list, \ | |
273 | .dev_open = std_serial_dev_open, \ | |
274 | .dev_close = std_serial_dev_close, \ | |
275 | .dev_acquisition_start = dev_acquisition_start, \ | |
276 | .dev_acquisition_stop = dev_acquisition_stop, \ | |
277 | .priv = NULL, \ | |
278 | }, \ | |
279 | VENDOR, MODEL, CONN, BAUDRATE, PACKETSIZE, TIMEOUT, DELAY, \ | |
280 | REQUEST, VALID, PARSE, DETAILS, sizeof(struct CHIPSET##_info) \ | |
281 | } | |
282 | ||
283 | SR_PRIV struct dmm_info *serial_dmm_drivers[] = { | |
284 | DMM( | |
285 | "bbcgm-2010", metex14, | |
286 | "BBC Goertz Metrawatt", "M2110", "1200/7n2", 1200, | |
287 | BBCGM_M2110_PACKET_SIZE, 0, 0, NULL, | |
288 | sr_m2110_packet_valid, sr_m2110_parse, | |
289 | NULL | |
290 | ), | |
291 | DMM( | |
292 | "digitek-dt4000zc", fs9721, | |
293 | "Digitek", "DT4000ZC", "2400/8n1/dtr=1", 2400, | |
294 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
295 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
296 | sr_fs9721_10_temp_c | |
297 | ), | |
298 | DMM( | |
299 | "tekpower-tp4000ZC", fs9721, | |
300 | "TekPower", "TP4000ZC", "2400/8n1/dtr=1", 2400, | |
301 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
302 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
303 | sr_fs9721_10_temp_c | |
304 | ), | |
305 | DMM( | |
306 | "metex-me31", metex14, | |
307 | "Metex", "ME-31", "600/7n2/rts=0/dtr=1", 600, | |
308 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
309 | sr_metex14_packet_valid, sr_metex14_parse, | |
310 | NULL | |
311 | ), | |
312 | DMM( | |
313 | "peaktech-3410", metex14, | |
314 | "Peaktech", "3410", "600/7n2/rts=0/dtr=1", 600, | |
315 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
316 | sr_metex14_packet_valid, sr_metex14_parse, | |
317 | NULL | |
318 | ), | |
319 | DMM( | |
320 | "mastech-mas345", metex14, | |
321 | "MASTECH", "MAS345", "600/7n2/rts=0/dtr=1", 600, | |
322 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
323 | sr_metex14_packet_valid, sr_metex14_parse, | |
324 | NULL | |
325 | ), | |
326 | DMM( | |
327 | "mastech-ms8250b", fs9721, | |
328 | "MASTECH", "MS8250B", "2400/8n1/rts=0/dtr=1", | |
329 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
330 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
331 | NULL | |
332 | ), | |
333 | DMM( | |
334 | "va-va18b", fs9721, | |
335 | "V&A", "VA18B", "2400/8n1", 2400, | |
336 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
337 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
338 | sr_fs9721_01_temp_c | |
339 | ), | |
340 | DMM( | |
341 | "va-va40b", fs9721, | |
342 | "V&A", "VA40B", "2400/8n1", 2400, | |
343 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
344 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
345 | sr_fs9721_max_c_min | |
346 | ), | |
347 | DMM( | |
348 | "metex-m3640d", metex14, | |
349 | "Metex", "M-3640D", "1200/7n2/rts=0/dtr=1", 1200, | |
350 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
351 | sr_metex14_packet_valid, sr_metex14_parse, | |
352 | NULL | |
353 | ), | |
354 | DMM( | |
355 | "metex-m4650cr", metex14, | |
356 | "Metex", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
357 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
358 | sr_metex14_packet_valid, sr_metex14_parse, | |
359 | NULL | |
360 | ), | |
361 | DMM( | |
362 | "peaktech-4370", metex14, | |
363 | "PeakTech", "4370", "1200/7n2/rts=0/dtr=1", 1200, | |
364 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
365 | sr_metex14_packet_valid, sr_metex14_parse, | |
366 | NULL | |
367 | ), | |
368 | DMM( | |
369 | "pce-pce-dm32", fs9721, | |
370 | "PCE", "PCE-DM32", "2400/8n1", 2400, | |
371 | FS9721_PACKET_SIZE, 0, 0, NULL, | |
372 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
373 | sr_fs9721_01_10_temp_f_c | |
374 | ), | |
375 | DMM( | |
376 | "radioshack-22-168", metex14, | |
377 | "RadioShack", "22-168", "1200/7n2/rts=0/dtr=1", 1200, | |
378 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
379 | sr_metex14_packet_valid, sr_metex14_parse, | |
380 | NULL | |
381 | ), | |
382 | DMM( | |
383 | "radioshack-22-805", metex14, | |
384 | "RadioShack", "22-805", "600/7n2/rts=0/dtr=1", 600, | |
385 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
386 | sr_metex14_packet_valid, sr_metex14_parse, | |
387 | NULL | |
388 | ), | |
389 | DMM( | |
390 | "radioshack-22-812", rs9lcd, | |
391 | "RadioShack", "22-812", "4800/8n1/rts=0/dtr=1", 4800, | |
392 | RS9LCD_PACKET_SIZE, 0, 0, NULL, | |
393 | sr_rs9lcd_packet_valid, sr_rs9lcd_parse, | |
394 | NULL | |
395 | ), | |
396 | DMM( | |
397 | "tecpel-dmm-8061-ser", fs9721, | |
398 | "Tecpel", "DMM-8061 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
399 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
400 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
401 | sr_fs9721_00_temp_c | |
402 | ), | |
403 | DMM( | |
404 | "voltcraft-m3650cr", metex14, | |
405 | "Voltcraft", "M-3650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
406 | METEX14_PACKET_SIZE, 150, 20, sr_metex14_packet_request, | |
407 | sr_metex14_packet_valid, sr_metex14_parse, | |
408 | NULL | |
409 | ), | |
410 | DMM( | |
411 | "voltcraft-m3650d", metex14, | |
412 | "Voltcraft", "M-3650D", "1200/7n2/rts=0/dtr=1", 1200, | |
413 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
414 | sr_metex14_packet_valid, sr_metex14_parse, | |
415 | NULL | |
416 | ), | |
417 | DMM( | |
418 | "voltcraft-m4650cr", metex14, | |
419 | "Voltcraft", "M-4650CR", "1200/7n2/rts=0/dtr=1", 1200, | |
420 | METEX14_PACKET_SIZE, 0, 0, sr_metex14_packet_request, | |
421 | sr_metex14_packet_valid, sr_metex14_parse, | |
422 | NULL | |
423 | ), | |
424 | DMM( | |
425 | "voltcraft-me42", metex14, | |
426 | "Voltcraft", "ME-42", "600/7n2/rts=0/dtr=1", 600, | |
427 | METEX14_PACKET_SIZE, 250, 60, sr_metex14_packet_request, | |
428 | sr_metex14_packet_valid, sr_metex14_parse, | |
429 | NULL | |
430 | ), | |
431 | DMM( | |
432 | "voltcraft-vc820-ser", fs9721, | |
433 | "Voltcraft", "VC-820 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
434 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
435 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
436 | NULL | |
437 | ), | |
438 | DMM( | |
439 | /* | |
440 | * Note: The VC830 doesn't set the 'volt' and 'diode' bits of | |
441 | * the FS9922 protocol. Instead, it only sets the user-defined | |
442 | * bit "z1" to indicate "diode mode" and "voltage". | |
443 | */ | |
444 | "voltcraft-vc830-ser", fs9922, | |
445 | "Voltcraft", "VC-830 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
446 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
447 | sr_fs9922_packet_valid, sr_fs9922_parse, | |
448 | &sr_fs9922_z1_diode | |
449 | ), | |
450 | DMM( | |
451 | "voltcraft-vc840-ser", fs9721, | |
452 | "Voltcraft", "VC-840 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
453 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
454 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
455 | sr_fs9721_00_temp_c | |
456 | ), | |
457 | DMM( | |
458 | "voltcraft-vc870-ser", vc870, | |
459 | "Voltcraft", "VC-870 (UT-D02 cable)", "9600/8n1/rts=0/dtr=1", | |
460 | 9600, VC870_PACKET_SIZE, 0, 0, NULL, | |
461 | sr_vc870_packet_valid, sr_vc870_parse, NULL | |
462 | ), | |
463 | DMM( | |
464 | "voltcraft-vc920-ser", ut71x, | |
465 | "Voltcraft", "VC-920 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
466 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
467 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
468 | ), | |
469 | DMM( | |
470 | "voltcraft-vc940-ser", ut71x, | |
471 | "Voltcraft", "VC-940 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
472 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
473 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
474 | ), | |
475 | DMM( | |
476 | "voltcraft-vc960-ser", ut71x, | |
477 | "Voltcraft", "VC-960 (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
478 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
479 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
480 | ), | |
481 | DMM( | |
482 | "uni-t-ut60a-ser", fs9721, | |
483 | "UNI-T", "UT60A (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
484 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
485 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
486 | NULL | |
487 | ), | |
488 | DMM( | |
489 | "uni-t-ut60e-ser", fs9721, | |
490 | "UNI-T", "UT60E (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
491 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
492 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
493 | sr_fs9721_00_temp_c | |
494 | ), | |
495 | DMM( | |
496 | /* Note: ES51986 baudrate is actually 19230! */ | |
497 | "uni-t-ut60g-ser", es519xx, | |
498 | "UNI-T", "UT60G (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
499 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
500 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
501 | NULL | |
502 | ), | |
503 | DMM( | |
504 | "uni-t-ut61b-ser", fs9922, | |
505 | "UNI-T", "UT61B (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
506 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
507 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
508 | ), | |
509 | DMM( | |
510 | "uni-t-ut61c-ser", fs9922, | |
511 | "UNI-T", "UT61C (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
512 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
513 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
514 | ), | |
515 | DMM( | |
516 | "uni-t-ut61d-ser", fs9922, | |
517 | "UNI-T", "UT61D (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
518 | 2400, FS9922_PACKET_SIZE, 0, 0, NULL, | |
519 | sr_fs9922_packet_valid, sr_fs9922_parse, NULL | |
520 | ), | |
521 | DMM( | |
522 | "uni-t-ut61e-ser", es519xx, | |
523 | /* Note: ES51922 baudrate is actually 19230! */ | |
524 | "UNI-T", "UT61E (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
525 | 19200, ES519XX_14B_PACKET_SIZE, 0, 0, NULL, | |
526 | sr_es519xx_19200_14b_packet_valid, sr_es519xx_19200_14b_parse, | |
527 | NULL | |
528 | ), | |
529 | DMM( | |
530 | "uni-t-ut71a-ser", ut71x, | |
531 | "UNI-T", "UT71A (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
532 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
533 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
534 | ), | |
535 | DMM( | |
536 | "uni-t-ut71b-ser", ut71x, | |
537 | "UNI-T", "UT71B (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
538 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
539 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
540 | ), | |
541 | DMM( | |
542 | "uni-t-ut71c-ser", ut71x, | |
543 | "UNI-T", "UT71C (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
544 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
545 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
546 | ), | |
547 | DMM( | |
548 | "uni-t-ut71d-ser", ut71x, | |
549 | "UNI-T", "UT71D (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
550 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
551 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
552 | ), | |
553 | DMM( | |
554 | "uni-t-ut71e-ser", ut71x, | |
555 | "UNI-T", "UT71E (UT-D02 cable)", "2400/7o1/rts=0/dtr=1", | |
556 | 2400, UT71X_PACKET_SIZE, 0, 0, NULL, | |
557 | sr_ut71x_packet_valid, sr_ut71x_parse, NULL | |
558 | ), | |
559 | DMM( | |
560 | "iso-tech-idm103n", es519xx, | |
561 | "ISO-TECH", "IDM103N", "2400/7o1/rts=0/dtr=1", | |
562 | 2400, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
563 | sr_es519xx_2400_11b_packet_valid, sr_es519xx_2400_11b_parse, | |
564 | NULL | |
565 | ), | |
566 | DMM( | |
567 | "tenma-72-7745-ser", fs9721, | |
568 | "Tenma", "72-7745 (UT-D02 cable)", "2400/8n1/rts=0/dtr=1", | |
569 | 2400, FS9721_PACKET_SIZE, 0, 0, NULL, | |
570 | sr_fs9721_packet_valid, sr_fs9721_parse, | |
571 | sr_fs9721_00_temp_c | |
572 | ), | |
573 | DMM( | |
574 | "tenma-72-7750-ser", es519xx, | |
575 | /* Note: ES51986 baudrate is actually 19230! */ | |
576 | "Tenma", "72-7750 (UT-D02 cable)", "19200/7o1/rts=0/dtr=1", | |
577 | 19200, ES519XX_11B_PACKET_SIZE, 0, 0, NULL, | |
578 | sr_es519xx_19200_11b_packet_valid, sr_es519xx_19200_11b_parse, | |
579 | NULL | |
580 | ), | |
581 | DMM( | |
582 | "brymen-bm25x", bm25x, | |
583 | "Brymen", "BM25x", "9600/8n1/rts=1/dtr=1", | |
584 | 9600, BRYMEN_BM25X_PACKET_SIZE, 0, 0, NULL, | |
585 | sr_brymen_bm25x_packet_valid, sr_brymen_bm25x_parse, | |
586 | NULL | |
587 | ), | |
588 | NULL | |
589 | }; |