question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

USB3 Doesn't Work with Raspberry Pi 4

See original GitHub issue

Testing 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:closed
  • Created 4 years ago
  • Comments:28 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
itsderek23commented, Mar 9, 2020

Great! Closing this issue, which is specific to USB3 on the RPi4.

1reaction
timonskucommented, Mar 9, 2020

Yes on the fix_RPi4_USB3 branch it is working now with USB3!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rpi4-4GB: USB3 devices not recognized in USB3 port
Problem: USB3 devices are not recognized as USB3 devices by the USB3 ports. ... STICKY: If you have a Raspberry Pi 4 and...
Read more >
Fix for getting your SSD working via USB 3 on your Raspberry PI
This article offers a fix for getting your SSD working via USB 3.0 on your Raspberry PI, when connected with a SATA to...
Read more >
Raspberry pi 4 USB 3 ports not working
i experienced some serious problems with my Raspberry Pi 4 regarding my USB 3.0 ports. I was using the raspberry as a server...
Read more >
Strange Behavior on USB 3.0 Bus on Raspberry Pi 4
It doesn't make sense that the Pi's hardware should choke just having a USB 3.0 drive and an unused hub with 4 open...
Read more >
Usb 3 ports not working rpi-4 - Core Electronics Forum
i have got the rpi-4 board to boot from usb…that is working. the usb 3 ports still seem to have an issue using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found