Hi all,
Not an answer, but a tip for fixing the issue that does not require a reboot or unplugging and plugging in the dump978-fa RTL device.
I have run both dump1090-fa and dump978-fa for many years. The dump1090-fa is always rock solid reliable, and easily goes many months between an occasional reboot done for other reasons. The dump978-fa for me usually fails about every 4 months or so.
I’m not certain, but I have always suspected that dump978-fa is less reliable because it relies on SoapySDR. Dump1090-fa uses the standard librtlsdr libraries by default. Dump1090-fa does support SoapySDR, but it does not use SoapySDR by default with RTL dongles.
When it fails, the dump978-fa service has restarted multiple times, and then just gives up. The easiest way to resolve it is to simply unplug and plug in the device. Then a dump978-fa restart works perfectly.
My Pi is NOT remote or hard to get to, but I still thought it would be a good learning experience to troubleshoot this and look for a “remote” fix.
The solution to manually unplugging was a Pi/Linux program called “usbreset”. That allows you remotely to reset the device connection. Dump978-fa will then reconnect.
pi@raspberrypi:~ $ whereis usbreset
usbreset: /usr/bin/usbreset
pi@raspberrypi:~ $ usbreset
Usage:
usbreset PPPP:VVVV - reset by product and vendor id
usbreset BBB/DDD - reset by bus and device number
usbreset "Product" - reset by product name
Devices:
Number 001/005 ID 0bda:2838 RTL2838UHIDIR
Number 001/004 ID 0bda:2838 RTL2838UHIDIR
Number 001/003 ID 0424:ec00
Number 001/002 ID 0424:9514
pi@raspberrypi:~ $ rtl_test
Found 2 device(s):
0: Realtek, RTL2838UHIDIR, SN: 301
1: Realtek, RTL2838UHIDIR, SN: 411
Yes, I could use other usb commands to verify which of my RTL devices (serial=401 is 978 UAT) is which, but it is quicker and easier to simply reset both 1090/978.
These two commands reset both devices.
pi@raspberrypi:~ $ usbreset 001/005
Resetting RTL2838UHIDIR ... ok
pi@raspberrypi:~ $ usbreset 001/004
Resetting RTL2838UHIDIR ... ok
Then I simply restart both 1090 and 978 services as below. 1090 would probably restart automatically after the reset. Becaue 978 had hard failed, it probably needs the restart command to kick start it.
pi@raspberrypi:~ $ sudo systemctl restart dump1090-fa.service
pi@raspberrypi:~ $ sudo systemctl restart dump978-fa.service
==========
As part of troubleshooting, I also discovered and started using an excellent Pi/Linux program called “monit”.
monit
Using monit, that monitors the dump978-fa program which should always be running. The monit program checks that process, along with a number of other things I have configured once every 2 minutes. If the process is not running, it e-mails me a descriptive alert.
After setting up monit, it took me about 4 months to have my next dump978-fa failure. I had the e-mail alert on the failed process within 3 minutes. I then remotely over ssh reset the usb devices and was back in operation. My Pi is here locally, but this fix would have worked anywhere with ssh access.
Since starting with monit, I have only had 2 dump978-fa failures. Each was approximately 4 months apart. I also use monit for many other things.
So, while not a solution, the combination of monit for monitoring and usbreset works very well for me. Monit actually has ways to not only detect the failure, but could also easily run a script that would automatically run usbreset and restart the failed process. That would be fully automatic with just an e-mailed notification, but I haven’t bothered to automate it yet.
Months ago I mentioned usbreset on another group and two people reported it helped them with remote systems. One had remote telescope photography software that would occasionally lock up. Usbreset fixed the problem without having to go out to the telescope dome. Another had remote sites related to bird tracking with multiple usb hubs and usb decoders. Usbreset solved his problems also and did not require a site visit.
Regards,
-Dan