Hi Carl, On Tue, Nov 22, 2016 at 01:00:49AM +0100, Carl-Fredrik Sundström wrote: > > The driver will not work with UNI-T UT612 since its using Serial over HID > protocol, prolific cp2110 if I remember correctly. The problem with this > ES51919 driver and many other drivers is that serial protocol handling > rs232 and actual chip protocol are baked together. What if the same chip > is used over a telnet session or connected over a CAN bus etc ...A > I had the UNI-T UT612 and was working on support for it but I lost the > device when moving from Washington to Nevada. > In my opinion the right way to support these generic chips is to separate > the bearer protocol from the chip protocol so its easier to reuse with > different bearers. In the UNI-T UT612 case another alternative would have > been to update the libserialport to abstract the HID serial to look like > just another serial port.
We've discussed this issue before. It would not be appropriate to move the serial-over-HID code to libserialport - that library is designed to be a minimal cross-platform layer over existing OS serial drivers, and is used as such outside of the sigrok project. It would dilute its purpose to start adding in serial emulation over other protocols, with the resulting additional dependencies and other issues. What I suggested instead is that we move the serial-over-HID support into libsigrok's own serial layer (serial.c). This does still exist, although it is now largely just a compatibility wrapper around libserialport. We use this wrapper consistently - I've just looked and the only place where a libsigrok driver currently calls libserialport directly is in the OLS driver, where it calls sp_input_waiting() a couple of times. So it would be a relatively easy change. If we add the serial-over-HID support to the serial.c layer, then the uni-t-dmm driver could just be merged into the serial-dmm driver, with the chipset support separated in the normal way. We'd eliminate the "-ser" suffixed sub-drivers for UNI-T DMMs, these would just be the same driver used with a different connection specified by SR_CONF_CONN. Regards, Martin ------------------------------------------------------------------------------ _______________________________________________ sigrok-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sigrok-devel

