USB issue

Topics about the Software of Revolution Pi
Post Reply
avu
Posts: 5
Joined: 05 Oct 2021, 05:37
Answers: 0

USB issue

Post 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
User avatar
Salma Benamor
KUNBUS
Posts: 13
Joined: 05 Nov 2021, 12:59
Answers: 0
Location: Hamburg

Re: USB issue

Post 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
      avu
      Posts: 5
      Joined: 05 Oct 2021, 05:37
      Answers: 0

      Re: USB issue

      Post 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.
      User avatar
      crismancich
      KUNBUS
      Posts: 39
      Joined: 05 Jan 2021, 11:25
      Answers: 1
      Location: Hamburg
      Contact:

      Re: USB issue

      Post 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
      Viele Grüße / Kind regards / Quapla’ / 此致敬意
      Boris Crismancich
      Post Reply