I have a Luxonis Oak-D Camera that I'm trying to get working on Raspberry Pi CM4 mounted to a custom carrier board. I've verified the camera and cable are good by installing and successfully running DepthAI demos on my M1 Macbook Pro. I have a coworker who has gotten an OakD working on his Raspberry Pi4B.
```
$ python --version
Python 3.9.18
$ uname -a
Linux eck-us-qa02-pi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
$ getconf LONG_BIT
64
$ dpkg --print-architecture
arm64
$ pip debug --verbose
pip version: pip 24.0 from /home/eyecheq/.asdf/installs/python/3.9.18/lib/python3.9/site-packages/pip (python 3.9)
sys.version: 3.9.18 (main, Feb 7 2024, 22:51:11)
[GCC 10.2.1 20210110]
sys.executable: /home/eyecheq/.asdf/installs/python/3.9.18/bin/python3
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
name: cpython
'cert' config value: global
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip.vendor.certifi.where(): /home/eyecheq/.asdf/installs/python/3.9.18/lib/python3.9/site-packages/pip/vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
CacheControl==0.13.1
colorama==0.4.6
distlib==0.3.8
distro==1.8.0
msgpack==1.0.5
packaging==21.3
platformdirs==3.8.1
pyparsing==3.1.0
pyproject-hooks==1.0.0
requests==2.31.0
certifi==2023.07.22
chardet==5.1.0
idna==3.4
urllib3==1.26.17
rich==13.4.2 (Unable to locate actual module version, using vendor.txt specified version)
pygments==2.15.1
typing_extensions==4.7.1 (Unable to locate actual module version, using vendor.txt specified version)
resolvelib==1.0.1
setuptools==68.0.0 (Unable to locate actual module version, using vendor.txt specified version)
six==1.16.0
tenacity==8.2.2 (Unable to locate actual module version, using vendor.txt specified version)
tomli==2.0.1
truststore==0.8.0 (Unable to locate actual module version, using vendor.txt specified version)
webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
```
I followed the hello_world.py instructions here…
https://docs.luxonis.com/projects/api/en/latest/tutorials/hello_world/
$ python3 hello_world.py
[2024-02-07 23:25:50.676] [debug] Python bindings - version: 2.21.2.0 from build: 2023-04-06 00:15:31 +0000
[2024-02-07 23:25:50.676] [debug] Library information - version: 2.21.2, commit: from , build: 2023-04-05 23:12:49 +0000
[2024-02-07 23:25:50.683] [debug] Initialize - finished
[2024-02-07 23:25:50.909] [debug] Resources - Archive 'depthai-bootloader-fwp-0.0.24.tar.xz' open: 5ms, archive read: 227ms
[2024-02-07 23:25:51.132] [debug] Device - OpenVINO version: 2022.1
[2024-02-07 23:25:51.132] [debug] Device - BoardConfig: {"camera":[],"emmc":null,"gpio":[],"imu":null,"logDevicePrints":null,"logPath":null,"logSizeMax":null,"logVerbosity":null,"network":{"mtu":0,"xlinkTcpNoDelay":true},"nonExclusiveMode":false,"pcieInternalClock":null,"sysctl":[],"uart":[],"usb":{"flashBootedPid":63037,"flashBootedVid":999,"maxSpeed":4,"pid":63035,"vid":999},"usb3PhyInternalClock":null,"watchdogInitialDelayMs":null,"watchdogTimeoutMs":null}
libnop:
0000: b9 11 b9 05 81 e7 03 81 3b f6 81 e7 03 81 3d f6 04 b9 02 00 01 ba 00 be be bb 00 bb 00 be be be
0020: be be be be 00 bb 00 be
[2024-02-07 23:25:51.825] [debug] Resources - Archive 'depthai-device-fwp-3575b77f20e796b4e79953bf3d2ba22f0416ee8b.tar.xz' open: 5ms, archive read: 1143ms
[2024-02-07 23:25:52.637] [debug] Searching for booted device: DeviceInfo(name=1.4, mxid=19443010B184E01200, X_LINK_BOOTED, X_LINK_USB_VSC, X_LINK_MYRIAD_X, X_LINK_SUCCESS), name used as hint only
[19443010B184E01200] [1.4] [0.854] [system] [info] Memory Usage - DDR: 0.12 / 340.34 MiB, CMX: 2.04 / 2.50 MiB, LeonOS Heap: 7.51 / 77.23 MiB, LeonRT Heap: 2.89 / 41.14 MiB
[19443010B184E01200] [1.4] [0.854] [system] [info] Temperatures - Average: 30.74C, CSS: 32.25C, MSS 30.32C, UPA: 30.32C, DSS: 30.08C
[19443010B184E01200] [1.4] [0.854] [system] [info] Cpu Usage - LeonOS 47.59%, LeonRT: 1.78%
[2024-02-07 23:25:53.537] [debug] Schema dump: {"connections":[{"node1Id":1,"node1Output":"out","node1OutputGroup":"","node2Id":3,"node2Input":"in","node2InputGroup":""},{"node1Id":0,"node1Output":"preview","node1OutputGroup":"","node2Id":2,"node2Input":"in","node2InputGroup":""},{"node1Id":0,"node1Output":"preview","node1OutputGroup":"","node2Id":1,"node2Input":"in","node2InputGroup":""}],"globalProperties":{"calibData":null,"cameraTuningBlobSize":null,"cameraTuningBlobUri":"","leonCssFrequencyHz":700000000.0,"leonMssFrequencyHz":700000000.0,"pipelineName":null,"pipelineVersion":null,"sippBufferSize":18432,"sippDmaBufferSize":16384,"xlinkChunkSize":-1},"nodes":[[0,{"id":0,"ioInfo":[[["","video"],{"blocking":false,"group":"","id":13,"name":"video","queueSize":8,"type":0,"waitForMessage":false}],[["","still"],{"blocking":false,"group":"","id":11,"name":"still","queueSize":8,"type":0,"waitForMessage":false}],[["","isp"],{"blocking":false,"group":"","id":10,"name":"isp","queueSize":8,"type":0,"waitForMessage":false}],[["","preview"],{"blocking":false,"group":"","id":12,"name":"preview","queueSize":8,"type":0,"waitForMessage":false}],[["","raw"],{"blocking":false,"group":"","id":9,"name":"raw","queueSize":8,"type":0,"waitForMessage":false}],[["","frameEvent"],{"blocking":false,"group":"","id":8,"name":"frameEvent","queueSize":8,"type":0,"waitForMessage":false}],[["","inputConfig"],{"blocking":false,"group":"","id":7,"name":"inputConfig","queueSize":8,"type":3,"waitForMessage":false}],[["","inputControl"],{"blocking":true,"group":"","id":6,"name":"inputControl","queueSize":8,"type":3,"waitForMessage":false}]],"name":"ColorCamera","properties":[185,25,185,27,0,3,0,0,0,185,3,0,0,0,185,5,0,0,0,0,0,185,5,0,0,0,0,0,0,0,0,0,0,0,0,185,3,0,0,0,185,3,0,0,0,0,0,0,0,0,0,0,0,0,0,255,189,0,255,0,0,0,129,44,1,129,44,1,255,255,255,255,0,136,0,0,240,65,0,136,0,0,128,191,136,0,0,128,191,1,185,4,0,0,0,0,3,3,4,4,4]}],[1,{"id":1,"ioInfo":[[["","out"],{"blocking":false,"group":"","id":5,"name":"out","queueSize":8,"type":0,"waitForMessage":false}],[["","passthrough"],{"blocking":false,"group":"","id":4,"name":"passthrough","queueSize":8,"type":0,"waitForMessage":false}],[["","in"],{"blocking":true,"group":"","id":3,"name":"in","queueSize":5,"type":3,"waitForMessage":true}]],"name":"DetectionNetwork","properties":[185,6,130,75,197,220,0,189,12,97,115,115,101,116,58,95,95,98,108,111,98,8,0,0,185,7,1,136,0,0,0,63,0,0,186,0,187,0,136,0,0,0,0]}],[2,{"id":2,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":2,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,3,114,103,98,0]}],[3,{"id":3,"ioInfo":[[["","in"],{"blocking":true,"group":"","id":1,"name":"in","queueSize":8,"type":3,"waitForMessage":true}]],"name":"XLinkOut","properties":[185,3,136,0,0,128,191,189,2,110,110,0]}]]}
[2024-02-07 23:25:53.537] [debug] Asset map dump: {"map":{"/node/1/__blob":{"alignment":64,"offset":0,"size":14468427}}}
[19443010B184E01200] [1.4] [1.044] [system] [info] SIPP (Signal Image Processing Pipeline) internal buffer size '18432'B, DMA buffer size: '16384'B
[2024-02-07 23:25:53.775] [debug] DataOutputQueue (nn) closed
[2024-02-07 23:25:53.775] [debug] DataOutputQueue (rgb) closed
[2024-02-07 23:25:53.775] [debug] Timesync thread exception caught: Couldn't read data from stream: '__timesync' (X_LINK_ERROR)
[2024-02-07 23:25:53.775] [debug] RPC error: Couldn't read data from stream: '__rpc_main' (X_LINK_ERROR)
[2024-02-07 23:25:53.775] [debug] Log thread exception caught: Couldn't read data from stream: '__log' (X_LINK_ERROR)
[2024-02-07 23:25:53.775] [debug] Device about to be closed...
[2024-02-07 23:25:53.775] [debug] XLinkResetRemoteTimeout returned: X_LINK_ERROR
[2024-02-07 23:25:54.209] [debug] XLinkResetRemote of linkId: (0)
[2024-02-07 23:25:54.997] [debug] Device closed, 1221
Traceback (most recent call last):
File "/home/eyecheq/depthai-tutorials-practice/1-hello-world/hello_world.py", line 41, in <module>
with depthai.Device(pipeline) as device:
RuntimeError: Device already closed or disconnected: Input/output error
When the script runs, I can hear the OakD click and then a short moment later, it clicks again and the Timesync thread exception is caught.