Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchdog timeout #123

Open
edmonds opened this issue Jul 3, 2020 · 1 comment
Open

watchdog timeout #123

edmonds opened this issue Jul 3, 2020 · 1 comment

Comments

@edmonds
Copy link

edmonds commented Jul 3, 2020

Hi,

I have a receiver (https://galmon.eu/observer.html?observer=74) that will occasionally hang and stop generating serial data. This typically occurs a few times a week. When it happens kernel messages like these are generated:

[Sat Jun 27 17:11:16 2020] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Mon Jun 29 22:10:58 2020] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32

This is on a Raspberry Pi 4 and I don't see the same issue on my desktop, so it's probably a hardware issue.

Closing and re-opening the serial port appears to clear the problem. My current workaround is to restart the ubxtool process every hour or so (e.g. RuntimeMaxSec=3600 in the systemd service unit), but I'm wondering if it might make more sense to have a watchdog option in the ubxtool process itself that exits the main loop if a message hasn't been received in a reasonable amount of time (e.g., 5–10 minutes?).

Thanks for considering!

@edmonds
Copy link
Author

edmonds commented May 17, 2021

FWIW, it looks like my issue is caused by raspberrypi/linux#2406, which appears to be either a bug in the kernel's ftdi driver on ARM platforms, or a bug in the USB controller on Raspberry Pi systems. I swapped out my Raspberry Pi 4 for a 3B+ and the ftdi hangs started occurring every few minutes. Adding dwc_otg.speed=1 to the kernel command line appears to fix the issue but limits the USB controller to USB 1.1 speeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant