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." diff --git a/overlay/opt/emcomm-tools/bin/et-uv-pro b/overlay/opt/emcomm-tools/bin/et-uv-pro index 0e24bf6..db15245 100755 --- a/overlay/opt/emcomm-tools/bin/et-uv-pro +++ b/overlay/opt/emcomm-tools/bin/et-uv-pro @@ -147,7 +147,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." diff --git a/overlay/opt/emcomm-tools/bin/et-vr-n76 b/overlay/opt/emcomm-tools/bin/et-vr-n76 index cd9748b..7d37c3f 100755 --- a/overlay/opt/emcomm-tools/bin/et-vr-n76 +++ b/overlay/opt/emcomm-tools/bin/et-vr-n76 @@ -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."