I just can’t let go of this. I am determined to make it work, so I spent a
few more hours on it last night and have finally reached a conundrum. Now I’m at
the point where it doesn’t make sense.
Using the auto start script that Robert shared with us, I did get cron to start
checking for Direwolf and launching it if it wasn’t running. It checks every
minute, but waits 30 seconds before it tries to launch anything so that the Rpi
has a chance to boot up all the way. So it can take up to 90 seconds before
Direwolf launches.
I added another instruction to then launch Xastir. That took a lot of trial
and error and a lot of 90 seconds waiting to see if it worked. I got it to the
point where it would launch both Direwolf and Xastir, but Xastir could not find
Direwolf and it always showed an error. I thought maybe Xastir was launching too
soon. Although I launch the two of them all the time from the command window
with:
direwolf –p & xastir
That works fine.
The command in the script to launch Direwolf is: DWCMD=”direwolf –a
100”
That starts a logging file of audio samples which it takes every 100
seconds. I changed it to: DWCMD=”direwolf –p” and that runs just fine.
I added: DWCMD=”xastir” after that and Xastir launches, but can’t find the
Direwolf TNC.
I put a delay in between the two lines to see if that helps: sleep(20)
which is supposed to put a pause between the two commands. It doesn’t. They
still launch right away. Yet there is a command earlier in the script: sleep(30)
that does seem to work.
So here is the conundrum. If I simply execute the script from the command
window:
./dw-start.sh
It works! Even the delay works (and it isn’t needed). I am up and running.
All systems go!
But when cron launches the script (same script file) it doesn’t work. Audio
device not found. Except maybe 1 out of 8 tries, it does work ???