APUE Learning Example Source Code
guowenxue
2019-06-26 29a852183391979dd31872cec9495c1483e302e2
add publish_test.sh shell script  tools
1 files added
20 ■■■■■ changed files
pj1_mqttd/tools/publish_test.sh 20 ●●●●● patch | view | raw | blame | history
pj1_mqttd/tools/publish_test.sh
New file
@@ -0,0 +1,20 @@
#!/bin/bash
progname=mosquitto_pub
hostname="master.iot-yun.com"
port=10883
uid="lingyun"
pwd="lingyun-emb"
dltopic="\$Sys/Studio/Downlink"
uptopic="\$Sys/Studio/Uplink"
pub_downlink_cmd="$progname -h $hostname -p $port -u $uid -P $pwd -t "$dltopic" -m "
pub_uplink_cmd="$progname -h $hostname -p $port -u $uid -P $pwd -t "$uptopic" -m "
set -x
$pub_downlink_cmd '{"id":"x86host02","camera" :  "on" }'
#sleep 5
#$pub_downlink_cmd '{"id":"x86host02","camera" :  "off" }'