07-30-2016 11:29 AM
Hi,
Is there an example CVI project that I can start with to communicate with a custom HID device?
I've done lots of CDC but never an HID, so I'm starting from scratch.
Any pointers will be appreciated.
Thanks,
Dave
08-01-2016 05:37 PM
Hi d.,
Unfortunately, there are no shipping examples that explicitly cover this topic. However, this should be similar to using a driver with another instrument or creating your own driver. Communicating with a custom HID in CVI would be the same as any other ANSI C API. If you can find an example of how to communicate with an HID with the same communication method as your own in ANSI C, you should be able to apply that in CVI.
08-01-2016 06:07 PM
Bummer.
OK, thanks Andy.
Dave
08-02-2016 12:37 AM
Just out of curiosity, what is an HID? I'm not familiar with such acronym (neither with CDC, for what is worth...)
08-02-2016 12:53 AM
Hi Robert,
CDC is Communications Device Class under USB. Basically, a device will enumerate on a USB port as a standard serial port so you can use standard Windows UART drivers to talk to the USB device.
HID is Human Interface Device, mouse, pointer, joy stick, etc.
I have a custom embedded system which uses CDC, but the stack keeps crashing. Not my stack but Microchip's. So I thought it's easy enough to switch to HID on the embedded side. I don't know how to do that on the PC side with CVI. I did find something called libwin that might provide a .dll interface to the Windows USB API that doesn't (appear) to exist in CVI. Maybe that will work.
Thanks,
Dave
08-02-2016 01:24 AM
Thanks for the Info: I never dealed with such kind of objects in my activity, apart using some USB-to-serial device but only to emulate a standard serial port.
08-02-2016 01:26 AM
Yes, the USB to serial device uses CDC. You'd normally not come across the term CDC unless you were implementing the USB protocol of some sort. Can't claim I'm an expert because there are dozens of differnt USB classes, thumb drives, printers, etc., and obviously, I don't know HID.
d.