在这里,我使用库usb4java访问我的usb设备。
问题是,当我试图声明usb设备的接口时,出现了一个错误。错误在这一行上:
int = LibUsb.claimInterface(deviceHandler,1);
错误: USB错误3:无法声明接口:访问被拒绝(权限不足)
有没有人知道我为什么会有这个错误,或者如何修正它?
发布于 2015-04-13 16:16:50
我也有同样的问题,我的env是MacOSX10.9
在与谷歌进行了长时间的搜索之后,我终于找到了这个帮助我解决问题的只需要得到连接到系统上的USB设备的名称?,现在我的代码工作起来很有魅力。
解决方案是这里,因为mac会自动声明设备,我们可以为它创建一个虚拟驱动程序。
下面是如何做这件事的步骤。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- This is a dummy driver which binds to Proxmark. It -->
<!-- contains no actual code; its only purpose is to -->
<!-- prevent Apple's USBHID driver from exclusively -->
<!-- opening the device. -->
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.proxmark.driver.dummy</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0d1</string>
<key>IOKitPersonalities</key>
<dict>
<!-- The Proxmark3 USB interface -->
<key>Proxmark3</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.kpi.iokit</string>
<key>IOClass</key>
<string>IOService</string>
<key>IOProviderClass</key>
<string>IOUSBInterface</string>
<key>bConfigurationValue</key>
<integer>1</integer>
<key>bInterfaceNumber</key>
<integer>0</integer>
<key>idProduct</key>
<integer>{your-usb-hardware-product-id}</integer>
<key>idVendor</key>
<integer>{your-usb-hardware-vendor-id}</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOUSBFamily</key>
<string>1.8</string>
</dict>
</dict>
</plist>
注意事项:{ your USB-硬件-产品-id}和{您-USB-硬件-供应商-id}必须是您自己的硬件id,可以从获得关于此mac -系统报告-硬件-USBE 218。
sudo根目录:轮子Proxmark3.kext sudo chmod -R 755 Proxmark3.kext sudo kextcache系统缓存
发布于 2016-07-18 20:27:19
对于Linux系统,似乎用户没有访问USB设备的权限。
这可以通过在/etc/udev/rues.d中添加一个规则来更改,例如,名称为“50-USBLicsions.Rule”,以及内容。
SUBSYSTEM=="usb", ATTR{idVendor}=="1234", ATTR{idProduct}=="5678",
MODE="0666",GROUP="users"而十六进制编号1234是供应商by和5678产品的附加USB设备,可以找到"lsusb -v“。示例规则允许用户组“用户”访问指定的usb设备。重新启动之后,规则将被应用。
根据Linux版本的不同,路径可能不同。
发布于 2017-10-12 20:51:57
当亚行服务器在MacOS上运行时,我得到了这个错误。重新启动计算机释放了接口,以便我可以再次声明它。然而,只要亚行启动,它就会锁定USB接口,并且需要重新启动计算机。
https://stackoverflow.com/questions/28884817
复制相似问题