[argyllcms] Re: Problem accessing HCFR probe

Frédéric Mantegazza wrote:

Could you have a look on my patch, and tell me how I can improve it? And maybe point me on big problems I can encouter, has I commented some of low-level read/write routines (icoms)...

Your patch is fine as a "proof of concept", but I really think your
time would be better spent figuring out why Libusb isn't working
with the HCFR on your system. I'm not sure I can be much help here,
since it seems to work fine on my system.

Problems with your patch as it stands are:

   There's no way to select the instrument. So if something else
   was plugged into the system and occupied /dev/ttyACM0, or
   if there were two HCFR's plugged in, you wouldn't be able
   to use it/them both.

   It breaks HCFR support on MSWindows and OS X. MSWindows doesn't
   have /dev/ttyACM0, and on OS X the IO manager interface needs
   to be used to locate a device name.

   It breaks the system dependent encapsulation, by putting
   system dependent code into the instrument drivers. Currently
   this is almost entirely concealed behind the icom object.

To do this sort of thing properly would entail adding a third
communication type to icom, a "USB connected pseudo-serial device",
and on each system type the mechanism to locate the serial interface
from the USB identification would be needed, and then the appropriate
read/write routines would be needed in icom to use that interface.

Since there are currently no other instruments that appear as USB
communication devices, and the HCFR is at least capable of
working directly via libusb as it currently stands, I don't
think this is the right direction to go, unless there is some
truly insurmountable obstacle.

cheers,
        Graeme Gill.

Other related posts: