[libhid-discuss] problems with libhid and Oregon Scientific weather station WMRS203 (interrupt read)

Charles Lepple clepple at ghz.cc
Tue Jul 28 11:31:54 UTC 2009


On Jul 28, 2009, at 1:42 AM, Jordi Puigsegur wrote:

> What am I doing wrong?

This does not seem right:

   ret = hid_interrupt_read(hid, USB_ENDPOINT_OUT+1, (void*)&packet,  
sizeof(packet), 1000);

The "_OUT" direction is relative to the PC, so a _read needs to have  
an _IN endpoint, and a _write needs a _OUT endpoint.

Given the following section in lsusb, it should probably be  
USB_ENDPOINT_IN+1:

       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x81  EP 1 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0008  1x 8 bytes
         bInterval               1





More information about the libhid-discuss mailing list