Page 1 of 1

USB issue

Posted: 14 Feb 2022, 07:16
by avu
Hello everybody,

We are using RevPi to connect to an USB serial device (https://www.apogeeinstruments.com/ac-42 ... converter/) and python with `pyserial` to read and write data through the device.
After a while, roughly 24 hours, it is not possible to read/write data anymore.

I can still see the device from `lsusb` output, while `dmesg` output shows consecutive lines of

Code: Select all

cdc_acm 1-1.2:1.0: failed to set dtr/rts
.
Only after I reboot the RevPi, read/write are possible.

At first, I am trying to know if the problem comes from the USB serial device, or comes from the RevPi itself.

Does anybody know how to debug / find the root cause for this kind of issue? Please let me know if I can provide any information or do anything on my end to better describe the issue.

Thanks,
Anh

Re: USB issue

Posted: 16 Feb 2022, 11:48
by Salma Benamor
Hello Avu,
the problem can be the result of:
    a hardware vibration, that could sometimes disconnected the ubs serial device
      may be the application, that you used, is not robust enough to run a python script more than 24h

      Re: USB issue

      Posted: 10 May 2022, 08:32
      by avu
      Coming back from Technical support thread as suggested by Dirk,

      Here is the wrap up from the last discussion:
      - We found the cause which makes the usb device stop responding is an external electrical noise problem.
      - We think that the RevPi OS should be fault-tolerant to the intermittent external environmental issues like this.
      - In this particular case, when there’s electrical noise coming to the USB device, it’s OK not being able to read the data at that time. However, the RevPi should be able to read the data from the USB device when the electrical noise is gone. Currently, once the problem occurs, the USB port is dead. Only a reboot of the RevPi’s OS would bring the port back. The fact that a soft reboot (via command line) works means that it could be avoided.

      Re: USB issue

      Posted: 18 May 2022, 07:46
      by crismancich
      Hi Anh,

      Revolution Pi Connect has a hardware watchdog. In order to use it, your software has to update a field regularly. If it does not, because your software stopped working, the field will not be updated and the wathdog will restart the RevPi. It also has a relay so it can even restart other devices or the whole switch cabinet.

      https://revolutionpi.com/tutorials/uebe ... rect=en_US

      Kind regards,
      Boris