So ultimately then are you referring to this then?

https://github.com/gbishop/cython-hidapi

If so am I to conclude there is currently no pure-python way of properly
sending/receiving messages to this HID device at this time... or is there a
library I am missing? If cython-haidapi is the only reasonable next step
then I suppose I will take it.

Before I go down that path however, do you know of any ways to verify for
sure if the fault is in libusb, pyusb, or my python code?

On Sun, Feb 12, 2012 at 7:01 AM, Wander Lairson Costa <
wander.lair...@gmail.com> wrote:

> 2012/2/12 Lance R. Vick <la...@lrvick.net>:
> > Sure.
> > _____________________________________________
> >
> > Bus 003 Device 032: ID 0c45:7401 Microdia
> >
> > Device Descriptor:
> >  bLength                18
> >  bDescriptorType         1
> >  bcdUSB               2.00
> >  bDeviceClass            0 (Defined at Interface level)
> >  bDeviceSubClass         0
> >  bDeviceProtocol         0
> >  bMaxPacketSize0         8
> >  idVendor           0x0c45 Microdia
> >  idProduct          0x7401
> >  bcdDevice            0.01
> >  iManufacturer           1 RDing
> >  iProduct                2 TEMPer1V1.1
> >  iSerial                 0
> >  bNumConfigurations      1
> >  Configuration Descriptor:
> >    bLength                 9
> >    bDescriptorType         2
> >    wTotalLength           59
> >    bNumInterfaces          2
> >    bConfigurationValue     1
> >    iConfiguration          0
> >    bmAttributes         0xa0
> >      (Bus Powered)
> >      Remote Wakeup
> >    MaxPower              100mA
> >    Interface Descriptor:
> >      bLength                 9
> >      bDescriptorType         4
> >      bInterfaceNumber        0
> >      bAlternateSetting       0
> >      bNumEndpoints           1
> >      bInterfaceClass         3 Human Interface Device
> >      bInterfaceSubClass      1 Boot Interface Subclass
> >      bInterfaceProtocol      1 Keyboard
> >      iInterface              0
> >        HID Device Descriptor:
> >          bLength                 9
> >          bDescriptorType        33
> >          bcdHID               1.10
> >          bCountryCode            0 Not supported
> >          bNumDescriptors         1
> >          bDescriptorType        34 Report
> >          wDescriptorLength      65
> >         Report Descriptors:
> >           ** UNAVAILABLE **
> >      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              10
> >    Interface Descriptor:
> >      bLength                 9
> >      bDescriptorType         4
> >      bInterfaceNumber        1
> >      bAlternateSetting       0
> >      bNumEndpoints           1
> >      bInterfaceClass         3 Human Interface Device
> >      bInterfaceSubClass      1 Boot Interface Subclass
> >      bInterfaceProtocol      2 Mouse
> >      iInterface              0
> >        HID Device Descriptor:
> >          bLength                 9
> >          bDescriptorType        33
> >          bcdHID               1.10
> >          bCountryCode            0 Not supported
> >          bNumDescriptors         1
> >          bDescriptorType        34 Report
> >          wDescriptorLength      41
> >          Report Descriptor: (length is 41)
> >            Item(Global): Usage Page, data= [ 0x00 0xff ] 65280
> >                            (null)
> >            Item(Local ): Usage, data= [ 0x01 ] 1
> >                            (null)
> >            Item(Main  ): Collection, data= [ 0x01 ] 1
> >                            Application
> >            Item(Local ): Usage, data= [ 0x01 ] 1
> >                            (null)
> >            Item(Global): Logical Minimum, data= [ 0x00 ] 0
> >            Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
> >            Item(Global): Report Size, data= [ 0x08 ] 8
> >            Item(Global): Report Count, data= [ 0x08 ] 8
> >            Item(Main  ): Input, data= [ 0x02 ] 2
> >                            Data Variable Absolute No_Wrap Linear
> >                            Preferred_State No_Null_Position
> > Non_Volatile Bitfield
> >            Item(Local ): Usage, data= [ 0x01 ] 1
> >                            (null)
> >            Item(Global): Report Count, data= [ 0x08 ] 8
> >            Item(Main  ): Output, data= [ 0x02 ] 2
> >                            Data Variable Absolute No_Wrap Linear
> >                            Preferred_State No_Null_Position
> > Non_Volatile Bitfield
> >            Item(Global): Usage Page, data= [ 0x0c ] 12
> >                            Consumer
> >            Item(Local ): Usage, data= [ 0x00 ] 0
> >                            Unassigned
> >            Item(Global): Logical Minimum, data= [ 0x80 ] 128
> >            Item(Global): Logical Maximum, data= [ 0x7f ] 127
> >            Item(Global): Report Size, data= [ 0x08 ] 8
> >            Item(Global): Report Count, data= [ 0x08 ] 8
> >            Item(Main  ): Feature, data= [ 0x02 ] 2
> >                            Data Variable Absolute No_Wrap Linear
> >                            Preferred_State No_Null_Position
> > Non_Volatile Bitfield
> >            Item(Main  ): End Collection, data=none
> >      Endpoint Descriptor:
> >        bLength                 7
> >        bDescriptorType         5
> >        bEndpointAddress     0x82  EP 2 IN
> >        bmAttributes            3
> >          Transfer Type            Interrupt
> >          Synch Type               None
> >          Usage Type               Data
> >        wMaxPacketSize     0x0008  1x 8 bytes
> >        bInterval              10
> > Device Status:     0x0000
> >  (Bus Powered)
> >
>
> I am not sure why you C code works and pyusb doesn't, but libusb is
> known to be problematic with HID devices. Maybe you should switch to
> hidapi [1] and its Python binding [2].
>
> [1] http://www.signal11.us/oss/hidapi/
>
> [2] http://mcuee.blogspot.com/2011/04/python-and-usb-hid-device.html
>
> --
> Best Regards,
> Wander Lairson Costa
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>



-- 
Lance R. Vick
__________________________________________________
Cell      -  407.283.7596
Gtalk     -  la...@lrvick.net
Website   -  http://lrvick.net
PGP Key   -  http://lrvick.net/0x36C8AAA9.asc
keyserver -  subkeys.pgp.net
__________________________________________________
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to