> Thanks for the advice Wingnut I will try out USBSnoop when I get home tonight..
On Tue, Sep 1, 2009 at 12:02 AM, Charles Lepple <[email protected]> wrote: > On Aug 31, 2009, at 4:24 PM, Neil Sutton wrote: > > 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. >> > > In that case, you probably want to send 6 and 5, or 7 and 8. > > Would just sending 0x35 via libhid be the equivilent of using .net's Convert.ToByte(5) ? > I have really confused myself with how the data should be presented to libhid.. > > 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.. >> > > Are you sure that the Windows code is using an interrupt write, and not a > control transfer? Is it using an output usage rather than a feature usage? > > Also, what timeout are you using under Windows? > > Looking at the code I'm using for Windows (sample code .net from Lake View Research - www.lvr.com) It does appear to be using a control transfer. > I'm not sure about output / feature usage.. as that was something I never dealt with using the LVR code, I just had to point it at the VID/PID and enter the data to send. > I did intially use the output report method in libhid but I wasn't sure of the output path since I couldn't make much sense of the comments in the example. > Then I noticed that the output of lsusb said the method was Interrupt so I presumed I should be using that..? > > 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. >> > > 0xff and 255 get converted to the same 8-bit quantity when sent. > > 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 >> _______________________________________________ >> libhid-discuss mailing list >> [email protected] >> http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss >> http://libhid.alioth.debian.org/ > >
_______________________________________________ libhid-discuss mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss http://libhid.alioth.debian.org/

