1
I am currently designing a system, which needs to receive data from serial devices (mainly ARM boards). To achieve this, I use some USB-to-Serial (FTDI232) adapter(s). I coded a simple loopback program (9600 baud) to test the setup, flashed the ARM board and was successfully able to receive everything I sent, without any data loss.
However, this system will eventually require to communicate with many boards. Therefore, I connected a USB Hub to the USB port and used it to connect more boards. However, after a few days we noticed some problems. First it seemed like we had a few bitflips. Then it turned out, that even whole bytes are dropped when we receive messages from the boards. When we connected these adapaters to normal usb ports (without a hub inbetween) the problem went away.
We assumed, that it is a buffering issue. Maybe the serial controller or the device is sending its data out too fast. Therefore, we installed RTS/CTS flow control on the serial side. Again, the bytes were dropped by usb hubs and not when the serial adapter is connected directly to the PC.
We switched the USB hub to a more expensive one, but it didn't change anything. We changed the PC, but it also didn't solve the problem. Additionally, it is confusing that hub does not drop packets we are sending to the serial adapter, but only the packets which are sent by the serial adapter.
Does anybody know how I could solve this, or what the problem is caused by? We are thinking, that the USB Hub is causing it. However, we depend on it, as we will have to connect many devices. So before we create our own serial handling solution (dedicated FPGA or Pi based), I wanted to ask if somebody here may know what is up? Are there Linux configuration files, which maybe allow faster polling (if it is a polling issue)? I think the serial adapter is not the issue here.
Thanks for your detailed explanation. We just ordered some FT232H based adapters and will test them as soon as they come. We also tested another USB Hub, which has a much lower drop rate. So maybe a combination of both will give us a good result. – Trunyx – 2019-04-01T11:05:54.853
The new adapters arrived. We actually ordered two typed. One with a single UART on it, and one with two UARTs. Both work perfectly, we are observing no drops anymore. Thanks for the advice – Trunyx – 2019-04-09T08:57:04.667