OAK相机:启动报错X_LINK_DEVICE_NOT_FOUND

环境

硬件:

  • 4✖️OV9782相机模组
  • OAK-FFC-4P驱动模组
  • 笔记本电脑

软件:

  • Ubuntu18.04
  • python 3.9
  • depthai 2.21.2.0

报错

python3 depthai_demo.py运行程序启动OAK相机时,报以下错误:

Insufficient permissions to communicate with X_LINK_UNBOOTED device with name “1.1”. Make sure udev rules are set

或者

RuntimeError: Failed to find device after booting, error message: X_LINK_DEVICE_NOT_FOUND

或者

Failed to boot the device: 1.3-ma2480, err code 3

原因与解决

这些报错可以归结为一类问题:X_LINK_DEVICE_NOT_FOUND,即电脑虽然已经识别到USB的连接,但程序在寻找设备时,没找到device。可能的原因主要有以下三种:
(1)未设置 udev 规则;
(2)USB控制器崩溃;
(3)排线接触不良或相机模块时钟干扰。

未设置 udev 规则

如果未在Linux上设置udev规则,则经常会发生此错误。这与DepthAI一致:初始化xlink时出错。
要解决此问题,请使用以下命令设置udev规则,拔出DepthAI,然后再将其重新插入USB。

echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | sudo tee /etc/udev/rules.d/80-movidius.rules
sudo udevadm control --reload-rules && sudo udevadm trigger

在某些情况下,这些设置已经设置好了,但是一直都插着DepthAI,因此Linux无法重置规则。
因此,请确保在运行完这些后拔出插头,然后重新插入DepthAI。

USB崩溃

在此情况下,可以取消绑定和绑定USB controller,而不需要重新启动电脑主机。前提是需要知道自己电脑USB controller的PCI ID,并替换以下命令中的0000:00:14.0部分。

echo -n "0000:00:14.0" | sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind; sleep 1; echo -n "0000:00:14.0" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind

Linux查看PCI ID的命令:

lspci

输出示例:

00:00.0 Host bridge: Intel Corporation Device 9b33 (rev 05)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) (rev 05)
00:02.0 Display controller: Intel Corporation Device 9bc5 (rev 05)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 05)
00:12.0 Signal processing controller: Intel Corporation Device 06f9
00:14.0 USB controller: Intel Corporation Device 06ed
00:14.2 RAM memory: Intel Corporation Device 06ef
00:16.0 Communication controller: Intel Corporation Device 06e0
00:17.0 RAID bus controller: Intel Corporation Device 06d6
00:1b.0 PCI bridge: Intel Corporation Device 06ac (rev f0)
00:1f.0 ISA bridge: Intel Corporation Device 0697
00:1f.3 Audio device: Intel Corporation Device 06c8
00:1f.4 SMBus: Intel Corporation Device 06a3
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device 06a4
00:1f.6 Ethernet controller: Intel Corporation Device 0d4c
01:00.0 VGA compatible controller: NVIDIA Corporation Device 2208 (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 1aef (rev a1)
02:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981

找到USB controller,前面的00:14.0即为USB controller的PCI ID

排线接触不良或相机模块时钟干扰

检查相机模块和OAK板的排线接线处,或更换相机模块加以尝试,并尽量让相机彼此之间的距离远一些。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI Player

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值