Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- DESIRED_RESPONSE="Characteristic value was written successfully"
- RESPONSE=""
- for i in `seq 1 10`; do
- RESPONSE="$(/opt/csrmesh/bin/csrmesh-cli move --pin 8888 --dest 43:c5:5b:04:00:06 --objid $1 --position $2)"
- echo "Response: ${RESPONSE}"
- # Exit if the received response matches $DESIRED_RESPONSE
- # Note: The response line should start with $DESIRED_RESPONSE (but seems to have a number of whitespaces attached at the end)
- if [[ $RESPONSE == $DESIRED_RESPONSE* ]]; then
- exit 0
- fi
- sleep 1
- done
- exit -1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement