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,6 +4,7 @@ 4 4 {{toc/}} 5 5 6 6 7 + 7 7 = 1. The use of this guideline = 8 8 9 9 ... ... @@ -20,8 +20,6 @@ 20 20 |1NCE| | | 21 21 |China Mobile| | | 22 22 23 - 24 - 25 25 == 2.1 1NCE SIM Card. == 26 26 27 27 ... ... @@ -106,9 +106,9 @@ 106 106 [[image:image-20230802112413-7.png]] 107 107 108 108 109 -== =3.3.2 Simulate with MQTT.fx ===108 +== 3.3.2 Simulate with MQTT.fx == 110 110 111 -=== =3.3.2.1 Establish MQTT Connection ====110 +=== 3.3.2.1 Establish MQTT Connection === 112 112 113 113 114 114 After we got MQTT Credentials, we can first simulate with PC tool MQTT.fx tool to see if the Credentials and settings are fine. ... ... @@ -152,19 +152,18 @@ 152 152 153 153 In the NB-IoT, we can run below commands so to publish the channels like MQTT.fx 154 154 155 -* (% style="color:blue" %)**AT+PRO=3,1**(%%)~/~/ Set to use ThingSpeak Server and Related Payload154 +* **AT+PRO=3,1** ~/~/ Set to use ThingSpeak Server and Related Payload 156 156 157 -* (% style="color:blue" %)**AT+CLIENT=<Your ThingSpeak MQTT ClientID>**156 +* **AT+CLIENT=<Your ThingSpeak MQTT ClientID>** 158 158 159 -* (% style="color:blue" %)**AT+UNAME=<Your ThingSpeak MQTT User Name>**158 +* **AT+UNAME=<Your ThingSpeak MQTT User Name>** 160 160 161 -* (% style="color:blue" %)**AT+PWD=<Your ThingSpeak MQTT Password>**160 +* **AT+PWD=<Your ThingSpeak MQTT Password>** 162 162 163 -* (% style="color:blue" %)**AT+PUBTOPIC=<YOUR_CHANNEL_ID>**162 +* **AT+PUBTOPIC=<YOUR_CHANNEL_ID>** 164 164 165 -* (% style="color:blue" %)**AT+SUBTOPIC=<YOUR_CHANNEL_ID>**164 +* **AT+SUBTOPIC=<YOUR_CHANNEL_ID>** 166 166 167 - 168 168 === 3.3.2 Uplink Examples === 169 169 170 170 ... ... @@ -227,6 +227,7 @@ 227 227 |(% 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" %) 228 228 |(% 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" %) 229 229 228 + 230 230 == 3.4 Datacake == 231 231 232 232 == 3.4.1 Define Product == ... ... @@ -234,6 +234,7 @@ 234 234 235 235 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. 236 236 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,6 +451,7 @@ 451 451 452 452 * (% style="color:#037691" %)**AT+PUBTOPIC=device name** (%%) ~-~-> 只需要 Device Name 吗?对的 453 453 454 + 454 454 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 吧).这边不用提示了,客户不需要输入。(大部分客户还是会自己去设置这个的,提高安全性) 455 455 456 456 (% style="color:blue" %)**CLIENT :“Any value”** ... ... @@ -506,6 +506,8 @@ 506 506 507 507 * **SUBTOPIC: “Any value”** 508 508 510 + 511 + 509 509 === 3.7.2 Simulate with MQTT.fx === 510 510 511 511