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. ... ... @@ -124,8 +124,11 @@ 124 124 125 125 * (% style="color:#037691" %)**Password:**(%%) <Your ThingSpeak MQTT Password> 126 126 127 -=== 3.3.2.2 Publish Data to ThingSpeak Channel === 128 128 129 + 130 +==== 3.3.2.2 Publish Data to ThingSpeak Channel ==== 131 + 132 + 129 129 [[image:image-20230802112413-9.png]] 130 130 131 131 [[image:image-20230802112413-10.png]] ... ... @@ -144,28 +144,29 @@ 144 144 [[image:image-20230802112413-11.png]] 145 145 146 146 147 -== 3.3 151 +=== 3.3.3 Configure NB-IoT Sensor for connection === 148 148 149 -=== 3.3.1 AT Commands: === 153 +==== 3.3.3.1 AT Commands: ==== 150 150 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** 158 +* (% style="color:blue" %)**AT+PRO=3,1** (%%) ~/~/ Set to use ThingSpeak Server and Related Payload 155 155 156 -* **AT+CLIENT=<Your ThingSpeak MQTT ClientID>** 160 +* (% style="color:blue" %)**AT+CLIENT=<Your ThingSpeak MQTT ClientID>** 157 157 158 -* **AT+UNAME=<Your ThingSpeak MQTT User Name>** 162 +* (% style="color:blue" %)**AT+UNAME=<Your ThingSpeak MQTT User Name>** 159 159 160 -* **AT+PWD=<Your ThingSpeak MQTT Password>** 164 +* (% style="color:blue" %)**AT+PWD=<Your ThingSpeak MQTT Password>** 161 161 162 -* **AT+PUBTOPIC=<YOUR_CHANNEL_ID>** 166 +* (% style="color:blue" %)**AT+PUBTOPIC=<YOUR_CHANNEL_ID>** 163 163 164 -* **AT+SUBTOPIC=<YOUR_CHANNEL_ID>** 168 +* (% style="color:blue" %)**AT+SUBTOPIC=<YOUR_CHANNEL_ID>** 165 165 166 -=== 3.3.2 Uplink Examples === 167 167 171 +==== 3.3.3.2 Uplink Examples ==== 168 168 173 + 169 169 For S31-NB 170 170 171 171 For SE01-NB ... ... @@ -191,7 +191,7 @@ 191 191 For SN50V3-NB 192 192 193 193 194 -=== 3.3.3 199 +==== 3.3.3.3 Map fields to sensor value ==== 195 195 196 196 197 197 When NB-IoT sensor upload to ThingSpeak. The payload already specify which fileds related to which sensor value. Use need to create fileds in Channels Settings. with name so to see the value correctly. ... ... @@ -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