Last modified by Mengting Qiu on 2025/03/08 11:33
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -4,7 +4,6 @@ 4 4 {{toc/}} 5 5 6 6 7 - 8 8 = 1. The use of this guideline = 9 9 10 10 ... ... @@ -21,6 +21,8 @@ 21 21 |1NCE| | | 22 22 |China Mobile| | | 23 23 23 + 24 + 24 24 == 2.1 1NCE SIM Card. == 25 25 26 26 ... ... @@ -105,9 +105,9 @@ 105 105 [[image:image-20230802112413-7.png]] 106 106 107 107 108 -== 3.3.2 Simulate with MQTT.fx == 109 +=== 3.3.2 Simulate with MQTT.fx === 109 109 110 -=== 3.3.2.1 Establish MQTT Connection === 111 +==== 3.3.2.1 Establish MQTT Connection ==== 111 111 112 112 113 113 After we got MQTT Credentials, we can first simulate with PC tool MQTT.fx tool to see if the Credentials and settings are fine. ... ... @@ -151,18 +151,19 @@ 151 151 152 152 In the NB-IoT, we can run below commands so to publish the channels like MQTT.fx 153 153 154 -* **AT+PRO=3,1** 155 +* (% style="color:blue" %)**AT+PRO=3,1** (%%) ~/~/ Set to use ThingSpeak Server and Related Payload 155 155 156 -* **AT+CLIENT=<Your ThingSpeak MQTT ClientID>** 157 +* (% style="color:blue" %)**AT+CLIENT=<Your ThingSpeak MQTT ClientID>** 157 157 158 -* **AT+UNAME=<Your ThingSpeak MQTT User Name>** 159 +* (% style="color:blue" %)**AT+UNAME=<Your ThingSpeak MQTT User Name>** 159 159 160 -* **AT+PWD=<Your ThingSpeak MQTT Password>** 161 +* (% style="color:blue" %)**AT+PWD=<Your ThingSpeak MQTT Password>** 161 161 162 -* **AT+PUBTOPIC=<YOUR_CHANNEL_ID>** 163 +* (% style="color:blue" %)**AT+PUBTOPIC=<YOUR_CHANNEL_ID>** 163 163 164 -* **AT+SUBTOPIC=<YOUR_CHANNEL_ID>** 165 +* (% style="color:blue" %)**AT+SUBTOPIC=<YOUR_CHANNEL_ID>** 165 165 167 + 166 166 === 3.3.2 Uplink Examples === 167 167 168 168 ... ... @@ -225,7 +225,6 @@ 225 225 |(% colspan="1" style="background-color:#4f81bd; color:white; width:124px" %)mod5|(% colspan="1" style="width:91px" %)mod|(% colspan="1" style="width:102px" %)Battery|(% colspan="1" style="width:159px" %)RSSI|(% colspan="1" style="width:153px" %)DS18B20 Temp|(% colspan="1" style="width:152px" %)adc0|(% colspan="1" style="width:148px" %)exit_state/input PA4|(% colspan="1" style="width:164px" %)Weight|(% colspan="1" style="width:152px" %) |(% colspan="1" style="width:66px" %) |(% colspan="1" style="width:66px" %) 226 226 |(% colspan="1" style="background-color:#4f81bd; color:white; width:124px" %)mod6|(% colspan="1" style="width:91px" %)mod|(% colspan="1" style="width:102px" %)Battery|(% colspan="1" style="width:159px" %)RSSI|(% colspan="1" style="width:153px" %)count|(% colspan="1" style="width:152px" %) |(% colspan="1" style="width:148px" %) |(% colspan="1" style="width:164px" %) |(% colspan="1" style="width:152px" %) |(% colspan="1" style="width:66px" %) |(% colspan="1" style="width:66px" %) 227 227 228 - 229 229 == 3.4 Datacake == 230 230 231 231 == 3.4.1 Define Product == ... ... @@ -233,7 +233,6 @@ 233 233 234 234 Firstly, we need to set the MQTT mode to datacake, and we need to run(% style="color:blue" %)** AT+PRO=3,2**(%%). This command is set to datacake. After running the command, the device automatically sets the server address, port. 235 235 236 - 237 237 By chosing to add the device under a (% style="color:blue" %)**"New Product"**(%%) you are required to give a name for this product. You can name it something like (% style="color:blue" %)**"My First MQTT Product"**. 238 238 239 239 [[image:image-20230802112413-14.png]] ... ... @@ -451,7 +451,6 @@ 451 451 452 452 * (% style="color:#037691" %)**AT+PUBTOPIC=device name** (%%) ~-~-> 只需要 Device Name 吗?对的 453 453 454 - 455 455 Users do not need to fill in the client, username, and password. But the configuration information of the device requires setting the client, username, and password, which can be entered freely. (软件自动填充为 Device Name 吧).这边不用提示了,客户不需要输入。(大部分客户还是会自己去设置这个的,提高安全性) 456 456 457 457 (% style="color:blue" %)**CLIENT :“Any value”** ... ... @@ -507,8 +507,6 @@ 507 507 508 508 * **SUBTOPIC: “Any value”** 509 509 510 - 511 - 512 512 === 3.7.2 Simulate with MQTT.fx === 513 513 514 514