@ -69,7 +69,21 @@ while read LINE
CALL = " $( grep -oP "(?<=PE1RXF-2 R ).+?\>" <<< $LINE ) "
CALL = " $( grep -oP "(?<=PE1RXF-2 R ).+?\>" <<< $LINE ) "
PORT = "ax1"
PORT = "ax1"
fi
fi
# If call is empty, frame not from channel 1 or 2, maybe from channel 3?
if [ -z $CALL ] ; then
#CALL="$(grep -o -P "(?<=PE1RXF-2 R \*).+?\>"<<<$LINE)"
CALL = " $( grep -oP "(?<=PE1RXF-3 R ).+?\>" <<< $LINE ) "
PORT = "ax2"
fi
# If call is empty, frame not from channel 1, 2 or 3, maybe from channel APRSIS?
if [ -z $CALL ] ; then
#CALL="$(grep -o -P "(?<=PE1RXF-2 R \*).+?\>"<<<$LINE)"
CALL = " $( grep -oP "(?<=APRSIS R ).+?\>" <<< $LINE ) "
PORT = "aprsis"
fi
# Lets do something with the message from channel 1 or 2
# Lets do something with the message from channel 1 or 2
if [ [ $CALL ] ] ; then
if [ [ $CALL ] ] ; then
@ -85,9 +99,15 @@ while read LINE
if [ $PORT = = "ax0" ] ; then
if [ $PORT = = "ax0" ] ; then
#FULL_PATH="$(grep -o -P '(?<=PE1RXF-1 R \*).+?:'<<<$LINE)"
#FULL_PATH="$(grep -o -P '(?<=PE1RXF-1 R \*).+?:'<<<$LINE)"
FULL_PATH = " $( grep -oP "(?<=PE1RXF-1 R ).+?:" <<< $LINE ) "
FULL_PATH = " $( grep -oP "(?<=PE1RXF-1 R ).+?:" <<< $LINE ) "
els e
elif [ $PORT = = "ax1" ] ; th en
#FULL_PATH="$(grep -o -P '(?<=PE1RXF-2 R \*).+?:'<<<$LINE)"
#FULL_PATH="$(grep -o -P '(?<=PE1RXF-2 R \*).+?:'<<<$LINE)"
FULL_PATH = " $( grep -oP "(?<=PE1RXF-2 R ).+?:" <<< $LINE ) "
FULL_PATH = " $( grep -oP "(?<=PE1RXF-2 R ).+?:" <<< $LINE ) "
elif [ $PORT = = "ax2" ] ; then
#FULL_PATH="$(grep -o -P '(?<=PE1RXF-2 R \*).+?:'<<<$LINE)"
FULL_PATH = " $( grep -oP "(?<=PE1RXF-3 R ).+?:" <<< $LINE ) "
elif [ $PORT = = "aprsis" ] ; then
#FULL_PATH="$(grep -o -P '(?<=PE1RXF-2 R \*).+?:'<<<$LINE)"
FULL_PATH = " $( grep -oP "(?<=APRSIS R ).+?:" <<< $LINE ) "
fi
fi
FULL_PATH = " $( grep -o -P '(?<=\>).*' <<< $FULL_PATH ) "
FULL_PATH = " $( grep -o -P '(?<=\>).*' <<< $FULL_PATH ) "
@ -138,7 +158,7 @@ while read LINE
echo " $APRS_FRAME " > " $APRS_SEND_MESSAGE_DIRECTORY $APRS_TRANSMIT_FILE "
echo " $APRS_FRAME " > " $APRS_SEND_MESSAGE_DIRECTORY $APRS_TRANSMIT_FILE "
# Message on port ax1
# Message on port ax1
els e
elif [ $PORT = = "ax1" ] ; th en
# Local (own) stations do not need to be digipeated
# Local (own) stations do not need to be digipeated
if [ $OWN_CALL ] ; then
if [ $OWN_CALL ] ; then
@ -165,6 +185,34 @@ while read LINE
#/usr/sbin/beacon -d "$APRS_HEADER" -s ax1 "$APRS_FRAME"
#/usr/sbin/beacon -d "$APRS_HEADER" -s ax1 "$APRS_FRAME"
/usr/sbin/beacon " ${ args [@] } "
/usr/sbin/beacon " ${ args [@] } "
# Message on port ax2
elif [ $PORT = = "ax2" ] ; then
# Local (own) stations do not need to be digipeated
if [ $OWN_CALL ] ; then
APRS_HEADER = "APRX29"
APRS_FRAME = " :: $FORMATTED_CALL :ack $ACKNOWLEDGE_NUMBER "
args[ 0] = -d
args[ 1] = "APRX29"
args[ 2] = -s
args[ 3] = ax2
args[ 4] = " : $FORMATTED_CALL :ack $ACKNOWLEDGE_NUMBER "
# Everyone else is digipeated
else
APRS_HEADER = "APRX29 WIDE2-2"
APRS_FRAME = " :: $FORMATTED_CALL :ack $ACKNOWLEDGE_NUMBER "
args[ 0] = -d
args[ 1] = "APRX29 WIDE2-2"
args[ 2] = -s
args[ 3] = ax2
args[ 4] = " : $FORMATTED_CALL :ack $ACKNOWLEDGE_NUMBER "
fi
# use beacon to send acknowledge frame
#echo "/usr/sbin/beacon -d '$APRS_HEADER' -s ax1 '$APRS_FRAME'"
#/usr/sbin/beacon -d "$APRS_HEADER" -s ax1 "$APRS_FRAME"
/usr/sbin/beacon " ${ args [@] } "
fi
fi
fi
fi