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