From 29a852183391979dd31872cec9495c1483e302e2 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Wed, 26 Jun 2019 13:52:53 +0800 Subject: [PATCH] add publish_test.sh shell script tools --- pj1_mqttd/tools/publish_test.sh | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/pj1_mqttd/tools/publish_test.sh b/pj1_mqttd/tools/publish_test.sh new file mode 100755 index 0000000..dbbb6eb --- /dev/null +++ b/pj1_mqttd/tools/publish_test.sh @@ -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" }' -- Gitblit v1.9.1