USB Serial connection stops providing data after other devices connected?

Hello

I have Jetson TX2. I am connecting a device to a usb port and using it as a serial port. I am running Ubuntu 16.04.6 LTS and using termios.

When the device is connected by itself it functions with no problems and returns the correct data.

I will plug a USB3 hub into another port with several devices attached and then the original device will no longer provide any data when I try to read the port. It will connect to the port just fine and I can set the configuration but when I send a read command I no longer receive any data. Depending on the VMIN and VTIME the request will time out or lock because it never receives any data.

Data transfer speed shouldn’t be a problem at all.

Is there something simple I am missing or does this happen occasionally with many things being connected? If anyone could point me in the right direction it would be much appreciated.

Hi,
Please share the steps to reproduce the issue. We have to reproduce it sirst.

From your description, only possibility I can think of is TX2 is probably switched from device mode to host mode, leading to communication lost. This is a guess. We still need to reproduce it and then do further check.

I don’t think I can provide enough information in terms of code for a specific reproduction.

Basically I have one sensor plugged in via USB. I can communicate with it fine using a standard setup in termios. I will plug in a 7 port USB 3.0 hub with multiple other items on it (two camera, gps, some other things). After the hub is plugged in the original sensor can still be connected to (the serial port will open fine) but won’t provide any data to a read request.

The original sensor is not plugged into the USB hub but directly to the board.

Is there perhaps some other issues like this you could point me towards that would give me more information on the situation?

Thank you.

Is the hub externally powered? If not, and if it or whatever is attached draws too much power, then it can cause a number of issues. If the hub is not externally powered, try one which is.

As you rearrange devices on USB ports you may end up with different numbering if there is a re-enumeration.

If you have something sensitive to data throughput, then too many devices competing for bandwidth may be an issue.

You might try listing “lsusb -t” prior to the non-working configuration. Then add devices which seem to relate to the failure, and run “lsusb -t” again for comparison. In addition, monitor “dmesg --follow”, and see what shows up as you plug in the extra devices which cause failure…see what the log adds.

@Nitsuj,
Your usecase looks complicated, and for any further investigation, we have to to reproduce the issue first. If it is not good to share steps here, please contact us to have further cooperation.

@linuxdev Thank you for the suggestions.

We did have another (completely different) device connected using the same USB vendor and product ID (we were using those to identify) which was causing the static name to occasionally be wrong depending on what order we plugged things in.

The data isn’t completely stable when everything is plugged in though. Still trying to isolate a specific cause.

If the error is remote to the root HUB, then dmesg may not show anything, but if you run “dmesg --follow” while you do the test, then there is a chance that when you notice incorrect naming and a dmesg at the same time it might offer a clue. Otherwise you might need to put a protocol analyzer on the wire.