Hi,

I have an HID device that I am trying to read from, but I am receiving the
following error:

usb.core.USBError: Access denied (insufficient permissions)

Here is a snippet from my code:

import usb
import usb.core

myVendorId = 53769
myProductId = 5377
dev = usb.core.find(idVendor=myVendorId, idProduct=myProductId)
dev.set_configuration()
test = dev.read(0x81,8)
print "res: ",test

The output from running usbenum.py is:

Device:
  Device class: 0
  Device sub class: 0
  Device protocol: 0
  Max packet size: 8
  idVendor: 53769 (0xd209)
  idProduct: 5377 (0x1501)
  Device Version: 25
  Configuration: 1
    Total length: 109
    selfPowered: 0
    remoteWakeup: 0
    maxPower: 1000
    Interface: 0
    Alternate Setting: 0
      Interface class: 3
      Interface sub class: 0
      Interface protocol: 0
      Endpoint: 0x81
        Type: 3
        Max packet size: 8
        Interval: 10
    Alternate Setting: 0
      Interface class: 3
      Interface sub class: 0
      Interface protocol: 0
      Endpoint: 0x82
        Type: 3
        Max packet size: 20
        Interval: 10
    Alternate Setting: 0
      Interface class: 3
      Interface sub class: 0
      Interface protocol: 0
      Endpoint: 0x83
        Type: 3
        Max packet size: 16
        Interval: 10
    Alternate Setting: 0
      Interface class: 3
      Interface sub class: 1
      Interface protocol: 2
      Endpoint: 0x84
        Type: 3
        Max packet size: 8
        Interval: 10


I have tried reading from the other endpoints but get the following error:

  File "/Library/Python/2.6/site-packages/usb/core.py", line 163, in
get_endpoint_type
    type = util.endpoint_type(e.bmAttributes)
AttributeError: 'NoneType' object has no attribute 'bmAttributes'

I'm a newbie to usb but I'm learning & reading the USB Complete book, so I'd
really appreciate it if somebody could help me to retrieve data from my USB
HID device.

Thanks in advance,

Kevin
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to