diff --git a/SP5WWP/testing/m17-sms.sh b/SP5WWP/testing/m17-sms.sh index 3df5c13..df6b22b 100755 --- a/SP5WWP/testing/m17-sms.sh +++ b/SP5WWP/testing/m17-sms.sh @@ -15,11 +15,8 @@ str=$4 #get the size in bytes len=$(echo -n "$str" | wc -c) #get UTF-8 encoded length in bytes len=$((len+2)) #add 2 additional bytes (0x05 and 0x00) -len_chars=${#str} #get length in characters rather than bytes #echo the message to the encoder -str1=${str:0:$((len_chars-1))} -str2=${str: -1} -echo -en "\x05"$str1$str2"\x00" | m17-packet-encode -S $2 -D $1 -C $3 -n $len -o $5 +echo -en '\x05'$str'\x00' | m17-packet-encode -S $2 -D $1 -C $3 -n $len -o $5 sox -t raw -r 48000 -b 16 -c 1 -L -e signed-integer $5 $5".wav"