From 2264a028ace7e42db408aac343abcb4e014022d0 Mon Sep 17 00:00:00 2001 From: Chen Han Date: Tue, 29 Oct 2019 15:45:21 +0800 Subject: [PATCH] add readme step --- board/Linux_Posix/mqtt_demo/readme.md | 36 +++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/board/Linux_Posix/mqtt_demo/readme.md b/board/Linux_Posix/mqtt_demo/readme.md index aefa85de..821f52a1 100644 --- a/board/Linux_Posix/mqtt_demo/readme.md +++ b/board/Linux_Posix/mqtt_demo/readme.md @@ -6,6 +6,38 @@ make sure your develop environment. + `gcc` `gdb` `make` is installed ## step2 +configure your server and add a transmit rule + +reference [tencent cloud IoT guide?](../../../doc/8.TencentOS-tiny对接腾讯云IoTHub开发指南.md) + +additional thing, add a rule for send a message to the demo +1. select filter topic is the ${demo device}/event and +SELECT * FROM ${demo device}/event +2. select action type is Republish and topic is the ${demo device}/control + +the page like this +_____________________________________________ +|规则引擎 +|-------------------------------------------- +|基本信息 +|规则名称 loop +|规则描述 未填写 +|-------------------------------------------- +|筛选数据 +|字段 * +|Topic ${demo device}/event +|条件 +|当前SQL语句是: +|SELECT * ${demo device}/event +|-------------------------------------------- +|行为操作 +|行为类型 数据转发到另一个Topic ( Republish ) +|Topic ${demo device}/control +| ... +_____________________________________________ + + +## step3 generate `mqtt_config.h` file to replace `./inc/mqtt_config.h` cd `tiny/tools/` directory, run python script @@ -16,7 +48,7 @@ python3 mqtt_config_gen.py then input your server configuration, generate `mqtt_config.h` file copy to `./inc/` replace old file -## step3 +## step4 make `build` directory and compile in `build` ```bash @@ -25,7 +57,7 @@ cmake .. make ``` -## step4 +## step5 run program !! ```bash