So the attemps to use the prehook to connect via a mountain node hasn't worked for me yet.
My setup: VA7NIC - I want to call VE7KU-8 (mountain top node) to connect to VA7BCE-10 (RMS gateway). There are also a few other gateways within RF ear shot of KU-8 so once the basic connection works, I can test to them as well.
Using the command line : pat connect 'ax25:///VE7KU-8?prehook=prehook.sh' will connect to VE7KU-8 which is our mountain top node, but doesn't seem to get any response back from the TNC that a connection was made.
I'm expecting a CONNECTED string like I can see if I manually connect to VE7KU-8. The script just loops through, waiting for the expected text, not receiving it, then waiting some more in the preset delay.
Trying the connection using an AGWPE interface in a windows VM (trying to see if perhaps the linux ax.25 stack is causing part of the problem) with the command line of
pat connect 'ax25+agwpe:///VE7KU-8?prehook=prehook.sh' comes back with a date/time string and AGWPE TNC initialization failed: callsign in use
A normal ax25+agwpe connection in the GUI to the gateway works flawlessly 10 times out of 10.
Here is my prehook.sh
#!/bin/bash
set -x
function wait {
local timeout=$1 keyword=$2 line=""
while [[ $line != $keyword ]]; do read -t $timeout -r line; done
}
function print {
shift
echo "${@}\r"
}
wait 10 CONNECTED
print 'c VA7BCE-10'
wait 10 VA7BCE-10
I've also tried a few attempts to add single quotes around various strings to make sure they get sent properly. If I have print c VA7BCE-10 as the first line, the output of the script on screen doesn't include the c
The current TNC in use in a AEA/Timewave PK-96 in KISS mode. The tnc in a windows enviroment with RMS Express doing the digi connection works going through VE7KU-8 to VA7BCE-10. I don't think its the problem.
I currently have pat running on the latest raspbian enviroment on a Pi4, could that be part of the problem? I haven't had a chance to create a test enviroment on my server machine yet. Perhaps that is this afternoons adventure, but would really like it all on the RPi, then its a bit more portable in a grab 'n go setup.
Nick