Restoring GPS tracking [fixed in v1.335]
Clint KA7OEI first reported the problem that Kiwis running wsprdaemon (WD)_ would eventually fall out of GPS tracking and restoring tracking requires that all WD listening (and other) sessions be terminated for a few seconds or minutes.
I am grateful that I can now detect that fault condition from the KIWIIP:8073/status page
And I am even more grateful that I can get a list of active listener sessions from KIWIIP:8073/users.
WD can kill all of its listening sessions, but if there are non-WD listeners I don't know how to terminate them.
It is easy and clean to disable user connections on the Control page, kill the active user connections, then wait for GPS tracking. But I don't know how to do that from my WD script.
Any suggestions?
Thanks,
I am grateful that I can now detect that fault condition from the KIWIIP:8073/status page
And I am even more grateful that I can get a list of active listener sessions from KIWIIP:8073/users.
WD can kill all of its listening sessions, but if there are non-WD listeners I don't know how to terminate them.
It is easy and clean to disable user connections on the Control page, kill the active user connections, then wait for GPS tracking. But I don't know how to do that from my WD script.
Any suggestions?
Thanks,
Comments
In spite of that, one of the two Kiwis with 6 WD clients had lost GPS tracking and required my manual intervention. My WD 2.6 beta code now checks and logs loss of GPS, so as I work on other bugs and features of 2.6 my log will report if loss of GPS reoccurs. Before restarting, is there something I should look for in /var/log/messages?
In my case it was related to the kernel 4.4.155-ti-r155. I suspected a problem with missing kernel modules, but I didn't had time to investigate further.
PS: What is the disadvantage of having GPS to always acquire satellites?
rob@Robs-MBP:/Users/rob/wsprdaemon> for i in `seq 8072 8078`; do echo -n "kphsdr.com:$i: "; curl -s --connect-timeout 5 kphsdr.com:$i/status | grep -i gps_good || echo; done
kphsdr.com:8072: gps_good=11
kphsdr.com:8073: gps_good=10
kphsdr.com:8074: gps_good=11
kphsdr.com:8075: gps_good=10
kphsdr.com:8076: gps_good=11
kphsdr.com:8077: gps_good=11
kphsdr.com:8078: gps_good=11
rob@Robs-MBP:/Users/rob/wsprdaemon>
Originally it seemed use of an individual Kiwi was pretty sparse and so it wouldn't hurt to pause the GPS acquisition process when there was more than one user connection. After all, if acquisition is off it takes quite a long time for all the currently tracked sats to move out-of-range such that there are no sats left. So this seemed an acceptable compromise. But many things have changed since then. Christoph figured out how to make the acquisition FFT a power-of-two which sped it up considerably. We now have applications that make full-time connections to all of the channels (wsprdaemon, kiwirecorder, WSPR extension autorun).
These days there doesn't seem to be any significant problems letting the GPS always acquire.
rob@Robs-MBP:/Users/rob/wsprdaemon> for i in `seq 8072 8078`; do echo -n "kphsdr.com:$i: "; curl -s --connect-timeout 5 kphsdr.com:$i/status | grep -i gps_good || echo; done
kphsdr.com:8072: gps_good=12
kphsdr.com:8073: gps_good=12
kphsdr.com:8074: gps_good=12
kphsdr.com:8075: gps_good=12
kphsdr.com:8076: gps_good=12
kphsdr.com:8077: gps_good=0
kphsdr.com:8078: gps_good=12
rob@Robs-MBP:/Users/rob/wsprdaemon>
All GPS RF comes from a single high gain antenna through an 8-way splitter and Kiwi76 has 7 active WD listeners, so I see no HW or operational differences which can be associated with the problem on Kiwi77. Kiwi77 lost lock sometime between 3:53AM PDT (10:53 UDT) and 4:05AM and I see nothing in kiwi77:/var/log/messages in the last 10 hours except a HUP:
.....
Oct 10 02:32:45 kiwisdr kiwid: 10d:00:22:57.828 ..234567 6 0.00 kHz am z0 "wsprdaemon_v2.5b" 10.14.70.86 (ARRIVED)
Oct 10 02:32:45 kiwisdr kiwid: 10d:00:22:57.855 ..234567 7 0.00 kHz am z0 "wsprdaemon_v2.5b" 10.14.70.86 (ARRIVED)
Oct 10 05:16:04 kiwisdr kiwid: 10d:03:06:16.790 ..234567 UPDATE: check scheduled
Oct 10 06:25:11 kiwisdr rsyslogd: [origin software="rsyslogd" swVersion="8.4.2" x-pid="475" x-info="http://www.rsyslog.com"] rsyslogd was HUPed
I have left Kiwi77 is this unlocked state and will PM you instructions for ssh access.
Until we can figure out how to fix this in the Kiwi, can you suggest how my script could restore the Kiwi's GPS locks?
In addition, I no longer see another problem: previously, kiwirecorder listeners would be assigned to RXO/1 when there were open RX2..7 channels. Not only are my sessions now much more stable, but the one session which restarted after 84 hours was assigned to RX5 as it should. I am going to lower the priority of adding to WD tests and recovery for this condition if, as it appears, it now occurs less often or not at all.
Thanks for this fix.