diff --git a/overlay/opt/emcomm-tools/bin/et-th-d74 b/overlay/opt/emcomm-tools/bin/et-th-d74 index 034db0c..d868d9f 100755 --- a/overlay/opt/emcomm-tools/bin/et-th-d74 +++ b/overlay/opt/emcomm-tools/bin/et-th-d74 @@ -148,7 +148,7 @@ case $1 in p|pair) MAC=$(cat ${ACTIVE_RADIO} | jq -e -r .bluetooth.mac) - if [ $? -eq 0 ]; then + if [[ "{$MAC}" != "" ]]; then PAIR_STATUS=$(bluetoothctl info "${MAC}" | grep "Paired:" | awk '{print $2}') if [ "${PAIR_STATUS}" == "yes" ]; then echo "Device with MAC ${MAC} is already paired."