RSSI

Check current signal strength – * usbradio-only *

RSSI – put in /etc/asterisk/scripts/rssi/

This script requires Swift TTS engine – or modify it to work with your own/other.

Also need to add a line to rpt.conf like:

C=cmd,/etc/asterisk/scripts/rssi/RSSI

Youtube

#!/bin/bash
##################################################################
# filename: KC7DMF-RSSI
#
# description: RSSI readback
#
# history: Version 2.0
# 11/04/2016 KC7DMF RSSI
#
##################################################################

#BEGIN
RSSI=/etc/asterisk/scripts/rssi
FIL=rssi
FIL2=rssin
NODE=27038

/usr/sbin/asterisk -rx “rpt fun $NODE *71”;

pushd $RSSI;
rm -f -r rssi;
rm -f -r rssin;
rm -f -r rssi.ulaw;
asterisk -rx “radio tune menu-support e” > $RSSI/$FIL;
sleep 1;
# Grab the first Line
sed -i q $RSSI/$FIL;
rss=`grep -Po ‘.* \K\d+\.*\d*’ $RSSI/$FIL`;
# Grab ###
echo “Current Signal Strength is ” > $FIL2;

#Divide by 10 to convert to percent
echo “scale=1 ; $rss / 10″ | bc >> $FIL2
echo ” Percent” >> $FIL2;

# Playback
/opt/swift/bin/swift -n Allison -p audio/channels=1,audio/encoding=ulaw -f $RSSI/$FIL2 -o – | cat > $RSSI/$FIL.ulaw& asterisk -rx “rpt localplay $NODE $RSSI/$FIL”&