Pyusb - Errno 13访问被拒绝进行控制转移 - Mac OS X.

 百变精灵110 发布于 2022-12-21 18:04

我试图通过pyusb通过Mac OS发送控制传输命令:dev.ctrl_transfer(0x21,0x09,0x0200,0x0,0x1)

我收到错误:

Traceback (most recent call last):
  File "./main.py", line 21, in 
    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)

有人可以帮我弄这个吗.我试过sudo,su.我也在pyusb github用户组中发布了这个.我得到了这个(将自己添加到debian系统中的plugdev组)作为一种可能的解决方案,但我不知道如何继续使用Mac OS https://github.com/braiden/python-ant-downloader/issues/30# issuecomment-55293142

与以下问题相关联:

pyusb无法访问OUT端点

PyUSB dev.set_configuration()(解决方案适用于ubuntu)

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有