Errno 13 Access denied for Control Transfer
I am trying to send a control transfer command through pyusb over a Mac OS: dev.ctrl_transfer(0x21,0x09,0x0200,0x0,0x1)
I get the error:
Traceback (most recent call last):
File "./main.py", line 21, in <module>
dev.ctrl_transfer(0x21,0x09,0x0200,0x0000,0x0001)
File "/Library/Python/2.7/site-packages/usb/core.py", line 962, in ctrl_transfer
self._ctx.managed_claim_interface(self, interface_number)
File "/Library/Python/2.7/site-packages/usb/core.py", line 146, in managed_claim_interface
self.backend.claim_interface(self.handle, i)
File "/Library/Python/2.7/site-packages/usb/backend/libusb1.py", line 747, in claim_interface
_check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
File "/Library/Python/2.7/site-packages/usb/backend/libusb1.py", line 552, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
Can someone help me with this. I tried sudo, su. Also I had posted this in pyusb github user group. I got this(adding myself to a plugdev group in debian systems) as a possible solution but I am not sure how to proceed with a Mac OS https://github.com/braiden/python-ant-downloader/issues/30#issuecomment-55293142
Linked with the following questions:
OUT Endpoint not accessible by pyusb
PyUSB dev.set_configuration() (the solution is for ubuntu)
As far as it seems, the answer to the following question:
Does python LibUsb work on HID Devices on Mac OS X ?
It is no. It looks like libusb cannot be used on Mac to access HID devices, and you should use HIDAPI library or similar instead.
I guess you are trying to access a HID device on Mac OS X using libusb which is somehow forbidden by sacred laws of nature.
HID Mac OS X Docs
Ticket on libusb
Similar Question: Raw access to HID devices in OS X
链接地址: http://www.djcxy.com/p/81490.html上一篇: 在<title>上绑定不起作用