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