USB3 Doesn't Work with Raspberry Pi 4
See original GitHub issueTesting a slew of USB3 cables of various lengths between DepthAI: USB3 [Onboard Camera or FFC Camera] and a Raspberry Pi 4 results in hanging after Successfully initialized XLink!
message.
With USB2 cables, it always works.
There is some code in XLink host-side that tries to match the USB port numbers before and after boot (the idea is to connect multiple devices to a host). This code is flawed for some non-standard connection schemes, like it seems to be on RPi4:
USB2 (boot) address: 1-1.1
USB3 (app) address: 2-1
(that code tries to match 1.1 with 1)
On my laptop the USB addresses look like:
USB2 (boot) address: 1-1
USB3 (app) address: 2-1
So the matching works
The failing code is here: https://github.com/opencv/dldt/blob/2019_R3.1/inference-engine/thirdparty/movidius/XLink/pc/usb_boot.c#L321
We could implement a workaround (better place in XLink itself, but also possible in the host app code) to resolve this. Already tried hardcoding the expected port number, and depthai USB boot works fine
So when referring to the XLink SingleStream example, it looks like new API is used that no longer requires a mapping between USB port addresses (pre and post boot). Using this API in the host app will resolve our issue.
So it seems with this root cause (port-number matching), and the use of the new API (which doesn’t do port-number matching, we should be good to solve this problem.
We will just need to switch to the new API and make sure it doesn’t break anything else.
Issue Analytics
- State:
- Created 4 years ago
- Comments:28 (2 by maintainers)
Great! Closing this issue, which is specific to USB3 on the RPi4.
Yes on the fix_RPi4_USB3 branch it is working now with USB3!