我试图以超级用户身份在Ubuntu16.04上从total阶段运行beagle I2C分析器。当我用sudo运行它时,我能够看到beagle USB设备,当我以我的用户身份运行它时,我得到错误消息“device is not found”。
我已经安装了linux udev规则,看起来它们正在工作,因为设备是完全可读/可写的。
$ lsusb | grep -i beagle
Bus 001 Device 083: ID 1679:2001 Total Phase Beagle Protocol Analyzer
$ ls -la /dev/bus/usb/001/083
crw-rw-rw- 1 root root 189, 82 Oct 25 20:20 /dev/bus/usb/001/083关于如何在不是超级用户的情况下运行数据中心和连接到分析仪,有什么建议吗?
发布于 2016-12-04 12:27:23
解决了问题!我已经为libusb的可比性问题设置了LIBUSBTP,这是导致该问题的per:http://www.totalphase.com/support/articles/200349996-libusb-compatibility-on-Linux。
我以超级用户和我自己的身份在程序上运行strace,这两个人的差异显示我使用32位二进制文件作为我的用户,这导致了问题。我取消了LIBUSBTP设置,应用程序以我的用户身份运行。
总阶段版本: aardvark-api-linux-x86_64-v5.15
以我的用户====身份使用====
$ strace -ttvfo /tmp/aadetect.log -s 1024 sudo python aadetect.py
write(1, "Detecting Aardvark adapters...\n", 31) = 31
open("/lib/i386-linux-gnu/libusb-0.1.so.4", O_RDONLY|O_CLOEXEC) = 3作为根====的====
$ sudo strace -ttvfo /tmp/aadetect-sudo.log -s 1024 python aadetect.py
write(1, "Detecting Aardvark adapters...\n", 31) = 31
open("/dev/bus/usb", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3====修复====
$ echo $LIBUSBTP
/lib/i386-linux-gnu/libusb-0.1.so.4
$ unset LIBUSBTP
$ echo $LIBUSBTP
$ python aadetect.py
Detecting Aardvark adapters...
1 device(s) found:
port = 0 (avail) (2238-385546)https://stackoverflow.com/questions/40253451
复制相似问题