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