Last active
November 13, 2025 03:04
-
-
Save bag-man/562a9e8dbf9f5bb6f0c2b583aa89b694 to your computer and use it in GitHub Desktop.
Scripts for doing winlink on Linux with pat and a Lab599 TX500
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Connect to a known RMS and retry every five minutes | |
| RMS=${1-ardop:///OE5XIR?freq=14104} | |
| DELAY_MIN=${2-5} | |
| DELAY=$((60 * $DELAY_MIN)) | |
| SOUND_CARD=$(ardopcf -m 2> /dev/null | grep PnP | grep -o '[[:digit:]]\+' | head -n 1) | |
| rigctld -m 2050 -r /dev/ttyUSB0 -d /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 & | |
| ardopcf 8515 plughw:$SOUND_CARD,0 plughw:$SOUND_CARD,0 -m > /dev/null 2>&1 & | |
| sleep 2 | |
| until pat connect $RMS | |
| do | |
| sleep $DELAY | |
| done | |
| killall rigctld | |
| killall ardopcf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SOUND_CARD=$(ardopcf -m 2> /dev/null | grep PnP | grep -o '[[:digit:]]\+' | head -n 1) | |
| rigctld -m 2050 -r /dev/ttyUSB0 -d /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 & | |
| ardopcf 8515 plughw:$SOUND_CARD,0 plughw:$SOUND_CARD,0 -m > /dev/null 2>&1 & | |
| pat http & | |
| xdg-open "http://localhost:8080" | |
| PID=$! | |
| wait $PID | |
| killall rigctld | |
| killall ardopcf | |
| killall pat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 10m 15m 20m 30m 40m 80m | |
| BANDS='\b28\.\|\b21\.\|\b14\.\|\b10\.\|\b7\.\|\b3\.' | |
| LIMIT=20 | |
| SOUND_CARD=$(ardopcf -m 2> /dev/null | grep PnP | grep -o '[[:digit:]]\+' | head -n 1) | |
| pat rmslist -d > /dev/null 2>&1 # Update rmslist over internet | |
| rigctld -m 2050 -r /dev/ttyUSB0 -d /dev/ttyUSB0 -p /dev/ttyUSB0 -P RTS -s 9600 & # Rigcltd for TX500 | |
| ardopcf 8515 plughw:$SOUND_CARD,0 plughw:$SOUND_CARD,0 -m > /dev/null 2>&1 & | |
| sleep 2 | |
| RMS_LIST=(`pat rmslist -m ardop -s | grep "$BANDS" | head -n $LIMIT | awk '{print $NF}'`) # 20 closest RMS in $BANDS | |
| for rms in "${RMS_LIST[@]}" | |
| do | |
| pat connect ${rms} | |
| if [ $? -eq 0 ]; then | |
| echo "Success!" | |
| break | |
| fi | |
| done | |
| killall rigctld | |
| killall ardopcf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment