Bug 251 - Move USB/HID emulation code to serial.c, merge uni-t-dmm and serial-dmm drivers
Summary: Move USB/HID emulation code to serial.c, merge uni-t-dmm and serial-dmm drivers
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Driver: uni-t-dmm (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal minor
Target Milestone: ---
Assignee: Uwe Hermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-06 17:53 CET by Uwe Hermann
Modified: 2019-12-21 19:23 CET (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2014-01-06 17:53:05 CET
Currently UNI-T multimeters (and various rebadged ones) are handled via the uni-t-dmm driver (e.g. "--driver voltcraft-vc820:conn=1a86.e008") if the UT-D04 USB/HID cable is used, and by serial-dmm (e.g. "--driver voltcraft-vc820-ser:conn=/dev/ttyUSB0") if the RS232 UT-D02 cable is used.

From a user's perspective it would be nicer to have only one user-visible drivername (e.g. "voltcraft-vc820") which uses the HID backend code if a USB VID/PID is supplied and the RS232 backend code if a serial port is provided.
Comment 1 Uwe Hermann 2016-12-20 18:43:14 CET
Revisiting this, we're planning to move the USB/HID serial emulation code into the serial.c wrappers and then merge the serial-dmm and uni-t-dmm drivers, eliminating quite some code duplication and the useless "-ser" drivername prefix at the same time.

This will also help with other devices e.g. the UNI-T UT612 which we'll be able to add to the generic es51919 driver more easily.
Comment 2 Gerhard Sittig 2018-02-04 17:49:15 CET
Status update:  The serial-over-HID approach indeed does work, and disguises 
HID cables as regular COM ports.  I've successfully used UT612 with an 
unmodified serial-lcr driver, used the uni-t-ut61c-ser driver with a USB 
cable, and used UT325 with a modified driver which used "a COM port".

Another byproduct was that I could use the "hid" spec as the conn= default 
in the driver, and have the meters auto-detected without user provided specs 
beyond the -d type.
Comment 3 Gerhard Sittig 2019-12-21 19:23:02 CET
Another status update:
Serial over HID (and Bluetooth) support was integrated with mainline in the 
meantime, transparent operation of UT-D04 and other cables (Victor, Brymen) 
were verified. Merging uni-t-dmm into serial-dmm is possible, and will be done.