schema.json's link action enum already listed "failed", but no code path ever published it -- YSFGateway only ever sent linking/unlinked/ relinking. The failure detection itself already existed: m_lostTimer's expiry handler in the main loop already logs "Link has failed, polls lost" for both YSF and FCS when a reflector never answers a link request (a mistyped/dead reflector ID -- the likeliest real operator mistake, since YSF/FCS reflectors don't use passwords, so there's no DMR-style auth failure here) or goes silent mid-session. It just never told MQTT, so the dashboard was left showing a stale "linking" state indefinitely with no sign anything was wrong. Adds writeJSONFailed(reason, reflector), called at both existing "Link has failed, polls lost" points with reason="timer" (m_lostTimer is what detected it, consistent with the existing reason taxonomy already used for timer-triggered inactivity events) and the reflector we were trying to reach. No schema.json changes needed -- action "failed" and reason "timer" were already declared. |
||
|---|---|---|
| .. | ||
| APRSWriter.cpp | ||
| APRSWriter.h | ||
| Conf.cpp | ||
| Conf.h | ||
| CRC.cpp | ||
| CRC.h | ||
| DTMF.cpp | ||
| DTMF.h | ||
| FCSNetwork.cpp | ||
| FCSNetwork.h | ||
| FCSRooms.txt | ||
| Golay24128.cpp | ||
| Golay24128.h | ||
| GPS.cpp | ||
| GPS.h | ||
| Log.cpp | ||
| Log.h | ||
| Makefile | ||
| MQTTConnection.cpp | ||
| MQTTConnection.h | ||
| prebuild.cmd | ||
| README.md | ||
| RingBuffer.h | ||
| schema.json | ||
| StopWatch.cpp | ||
| StopWatch.h | ||
| Sync.cpp | ||
| Sync.h | ||
| Thread.cpp | ||
| Thread.h | ||
| Timer.cpp | ||
| Timer.h | ||
| UDPSocket.cpp | ||
| UDPSocket.h | ||
| Utils.cpp | ||
| Utils.h | ||
| Version.h | ||
| WiresX.cpp | ||
| WiresX.h | ||
| YSFConvolution.cpp | ||
| YSFConvolution.h | ||
| YSFDefines.h | ||
| YSFFICH.cpp | ||
| YSFFICH.h | ||
| YSFGateway.cpp | ||
| YSFGateway.h | ||
| YSFGateway.ini | ||
| YSFGateway.vcxproj | ||
| YSFGateway.vcxproj.filters | ||
| YSFHostsUpdate.sh | ||
| YSFNetwork.cpp | ||
| YSFNetwork.h | ||
| YSFPayload.cpp | ||
| YSFPayload.h | ||
| YSFReflectors.cpp | ||
| YSFReflectors.h | ||
The YSF Gateway interfaces the MMDVM Host to the open source YSF and FCS Reflector systems using the standard Wires-X commands from the radio. It also gateways position information to aprs.fi if sent.
The file YSFHosts.txt holds information about the YSF reflectors available, and the gateway has the ability to reload this file at intervals to ensure that it is always up to date.
It is expected that a call to retrieve this file is done via some mechanism such as cron on Linux. The URLs to retrieve the latest file are http://register.ysfreflector.de/export_csv.php, or https://register.ysfreflector.de/export_csv.php.
An example would be following line in root's crontab, that fetches the reflector-list each 5 minutes:
sudo crontab -e
add following line:
*/5 * * * * wget -O /var/YSFGateway/YSFHosts.txt http://register.ysfreflector.de/export_csv.php