3x USB 3 Camera one freezes

I am using three 2MP, USB 3 camera from E-con system and it connects USB-C → USB A on Jetson Xavier NX.
The problem is that randomly (seemingly) one of the cameras stops working. It freezes the in the UI-window.
I run three Gstreamer commands in console and they sometimes flicker, and after different amount of time one freezes.
Its not always but sometimes. I have tried jerking the connection and tested by changing ports, inserting carefully and swapping to other cameras. No logic as I can see.

I have also a python script running gstreamer to UI using three threads that shows it on screen. Same problem but in the python case the closing of the threads does not work because one of the cameras stop responding and hence cant dispose the camera handle. I would assume that this has to do with the gstreamer trying to read and does not time-out. Is there a way of getting more debug info from gstreamer in terminal to see what happens to the stream?

Any ideas??
The camera support v4l2 and I run following gstreamer:

gst-launch-1.0 v4l2src device=/dev/video0 ! 'video/x-raw, width=(int)1600, height=(int)1300, format=(string)GRAY8, framerate=(fraction)60/1' ! videoconvert ! xvimagesink -v
gst-launch-1.0 v4l2src device=/dev/video1 ! 'video/x-raw, width=(int)1600, height=(int)1300, format=(string)GRAY8, framerate=(fraction)60/1' ! videoconvert ! xvimagesink -v
gst-launch-1.0 v4l2src device=/dev/video2 ! 'video/x-raw, width=(int)1600, height=(int)1300, format=(string)GRAY8, framerate=(fraction)60/1' ! videoconvert ! xvimagesink -v

Hi,
Please check dmesg log and check if there is error prints. For reference please attach the full log. And do you use Jetpack 4.6.1?

I will do so.
The jetpack is 4.4 and installed according to jkjung blog.
The reason is that we have to have tensorflow 1.15 and we do not dare to update.
All the relations between packages are so critical that we do not want to spend hours on end trying
to figure out why certain things stops working.

Hi,
Are you able to try 3x 1080p30? For Xavier NX, there is one USB3 roothub. It can achieve 5Gbps for single device, but may not achieve the same performance for multiple devices. The concurrent access may lead to perform drop.

Hi, I will see if I can change the FPS to 30. But for the application in need 60 is needed. Worst case scenario is ~45fps. The “lists-format” says 1600x1300 @ 60fps and next discrete is 1280x720 @ 90fps

We have tried a bit and it seems like connecting all three cameras into a USB3 hub to one port on the Jetson made it possible to run without the camera freezing. More tests of this will be done. I do not know if we keep the FPS at this stage. I will check that too.

I am abit concerned about the length of the cables. 4m cables might also be the problem.
dmesg.txt (91.8 KB)

One of the camera’s froze now with three 4m cables. I replaced the cable with 1m and seems to work. The dmesg above is from this example. I will try to get it to freeze and send another dmesg

Adding a USB-hub and connect all cables through that seems to do the trick. Don’t understand why though.

dmesg_2.txt (104.6 KB)
Now it froze with three cameras. One did just did not update. All cameras had 4m cable directly inserted into the Jetson.

Attached is the dmesg.

@DaneLLL So. Some more testing has been done. The camera supplier has not been able to replicate my problem.
The 4m USB-cables directly inserted to Jetson Freeze up. Its random chance if they dont.
Using a USB-hub connected to one port does the trick and I get still almost full FPS 58 (which is normal) on all
three cameras. What I have noticed when inserting directly into the Jetson USB-hub is that wireless keyboard/mouse stops working randomly. So It seems like an external hub (without extra power) does the trick. All three cameras via HUB to on USB-port on the Jetson makes it work full 58@1600x1300.

I would like to know why the Jetson Dev-kit can’t provide enough power/throughput on the USB-ports when directly inserted. Or if this is power/signal related. Do I pull more power via 1 port and the external hub is better to distribute power to the cameras, hence not loosing connection??

Hi,
Please check
https://developer.nvidia.com/jetson-xavier-nx-developer-kit-carrier-board-specification-p3509-a01

2.1 USB Ports
The carrier board supports two USB Connectors. One is a USB 2.0 Micro B connector (J5) supporting Device mode only (including USB Recovery). There are two, dual stacked USB 3.0 Type A connectors (J6 and J7). Each connector supports Host mode only. A single load switch supplies VBUS to all four USB 3.0 ports and is limited to 2A of output current.

For connecting to multiple devices the required current may exceed 2A and trigger instability.

The camera pulls 250mA per camera at maximum. And that would mean less than 1A (750mA). So this shouldn’t be a problem.
Dont know exactly how much the wireless USB-connector would require but i doubt more than 1A. If the VBUS is has some sort of regulator and I am balancing on a limit I would understand this. But… WHY does a USB-HUB with three cameras connected to one port on the Jetson solve the problem?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.