2012/2/10 Lázaro Morales <laz...@frioclima.com.cu>:
> Hello,
>
> I am testing the pyUSB module with a standard USB Logitech Mouse, my goal
> is trying to get a general understanding of the pyUSB module and the USB
> standard for use it in a course project in my school. This is the mouse
> information:
>
> Bus 002 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0         8
>   idVendor           0x046d Logitech, Inc.
>   idProduct          0xc018 Optical Wheel Mouse
>   bcdDevice           43.01
>   iManufacturer           1 Logitech
>   iProduct                2 USB Optical Mouse
>   iSerial                 0
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           34
>     bNumInterfaces          1
>     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      2 Mouse
>       iInterface              0
>         HID Device Descriptor:
>           bLength                 9
>           bDescriptorType        33
>           bcdHID               1.11
>           bCountryCode            0 Not supported
>           bNumDescriptors         1
>           bDescriptorType        34 Report
>           wDescriptorLength      52
>          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     0x0005  1x 5 bytes
>         bInterval              10
> Device Status:     0x0000
>   (Bus Powered)
>
> The HID specification says that before get receiving all data of the mouse
> is need initialize it, so I suppose that I should send some request to the
> device and then it start with the data transmission. How can this be done?
>
> I will appreciate so much if someone can help me.
>

HID devices are known to be problematic with libusb (Xiaofan always
answers this question with much more details than me) and,
consequently, pyusb. You might want to give a look at hidapi and its
Python binding. These post in Xiaofan's blog may help you [1].

[1] 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

Reply via email to