[libhid-discuss] HID_Interrupt_write reports OK, but no action on device..

Neil Sutton swift_gti at msn.com
Mon Aug 31 20:24:54 UTC 2009


Hi All,

I have been bashing my head against the keyboard all day trying to make my
little USB relay work under Linux (Ubuntu Jaunty if it matters)
I don't have a great deal of experience with linux but after some reading I
discovered that the best way to talk to the relay (which detects as a HID
device) was to use the libhid library.

So far I have tweaked the example code so that it looks for my device and
set up the commands to make an interrupt write to try and enable the relays.

In Windows I successfully control the device using VB and issue the commands
to control the relays using Convert.ToByte(Int)
The board has 4 relays and by issuing Convert.ToByte(6) for example I can
open a single relay, Convert.ToByte(5) closes the relay.
(7) and (8) control another relay.. you get the idea.

Now the example code reports back ok when I issue the interrupt write but
nothing happens on the device.
I think I may be sending the wrong commands but I'm not too sure..
I figured that I should send one byte, of 8 bits..? so I have tried to send
0xFF and also 255 but neither does anything.

The lsusb output is here for my device;
http://pastebin.com/m48287552

Here is the modified hid_test.c that I'm currently using;
http://pastebin.com/d1a6f40da

Any pointers would be appreciated!

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/libhid-discuss/attachments/20090831/a0be15ab/attachment.htm>


More information about the libhid-discuss mailing list