Show last authors
1 **Table of Contents:**
2
3 {{toc/}}
4
5
6
7 = 1. Log in to the platform and find IOT core =
8
9 = 2. Create your own test policy =
10
11 1. First click the policy on the left, enter the page and click Create policy
12
13 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image002.jpg]]
14
15 === 2)  After filling in a policy name for testing, the policy will be displayed on the page. ===
16
17 a. Fill in any name
18
19 b. Configure the policy you created
20
21 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg]]
22
23 c. After clicking to enter the policy configuration page, follow the clicking sequence below to go to the json configuration interface, and then fill in the following fields in the "statement" keyword:
24
25 {
26
27 "Version": "2012-10-17",
28
29 "Statement": [
30
31 {
32
33 "Effect": "Allow",
34
35 "Action": "",
36
37 "Resource": ""
38
39 }
40
41 ]
42
43 }
44
45
46 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image006.jpg]]
47
48 d. Create this policy
49
50
51 1. Create a Things
52
53 1. Create a single Things
54
55 1. Select Create Things
56
57 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image008.jpg]]
58
59 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image010.jpg]]
60
61
62 1. Fill in the name of the control item you want to create in the thing name column.
63
64 Use the default for other parameters
65
66 Then click Next.
67
68 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image012.jpg]]
69
70
71 1. Choose to automatically generate a new certificate
72
73 Then click Next
74
75 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image014.jpg]]
76
77 1. The next step is to choose a strategy
78
79 Here you can choose a policy we created in the first step
80
81 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image016.jpg]]
82
83
84 1. When you click to create things, the certificate download page will pop up.
85
86 This certificate is very important. After creating the device, you must download the certificate of the device so that our NB device can connect normally.
87
88 Please download all the following certificates and put them in a folder.
89
90 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image018.jpg]]
91
92
93
94 1. You can see the things you just created in the things
95
96 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image020.jpg]]
97
98
99 1. Connect to AWS using Dragino-NB device
100
101 1. Upgrade the firmware to configure TTS firmware to set the certificate
102
103 1. Update method
104 1. Firmware location
105
106 1. Configure certificate
107
108 After upgrade the firmware, the serial port displays as follows:
109
110 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image022.jpg]]
111
112 1. Configure CA certificate.
113
114 Please input the certificate in PEM format for the user.
115
116 Use the AT command AT+CACERT as follows:
117
118 AT+CACERT=~-~-~-~--BEGIN CERTIFICATE~-~-~-~--
119
120 MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
121
122 ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6
123
124 b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL
125
126 MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv
127
128 b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj
129
130 ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM
131
132 9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw
133
134 IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6
135
136 VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L
137
138 93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm
139
140 jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
141
142 AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA
143
144 A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI
145
146 U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs
147
148 N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv
149
150 o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
151
152 5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy
153
154 rqXRfboQnoZsG4q5WTP468SQvvG5
155
156 ~-~-~-~--END CERTIFICATE~-~-~-~--}
157
158 Note: Be sure to add a terminator "}" at the end of the command. Otherwise, the command will not execute successfully.
159
160 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image023.jpg]]
161
162
163 After successful execution, as shown in the following figure.
164
165 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image024.jpg]]
166
167 Display "Successfully configured CA certificate." If the configuration is successful, otherwise it is considered configuration failure.
168
169 1. Configure client certificate.
170
171 Use the AT command AT+CLICERT as follows:
172
173 AT+CLICERT=~-~-~-~--BEGIN CERTIFICATE~-~-~-~--
174
175 MIIDWTCCAkGgAwIBAgIUYSpJUzfb4NTa76JJxd2th0fZA8swDQYJKoZIhvcNAQEL
176
177 BQAwTTFLMEkGA1UECwxCQW1hem9uIFdlYiBTZXJ2aWNlcyBPPUFtYXpvbi5jb20g
178
179 SW5jLiBMPVNlYXR0bGUgU1Q9V2FzaGluZ3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211 ~-~-~-~--END CERTIFICATE~-~-~-~--}
212
213 Note: Be sure to add a terminator "}" at the end of the command. Otherwise, the command will not execute successfully.
214
215
216 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image025.jpg]]
217
218 Display "Successfully configured client certificate." Configuration successful, otherwise configuration failed
219
220 1. Configure client private key.
221
222 Use the AT command AT+CLIKEY, as shown below
223
224 AT+CLIKEY=~-~-~-~--BEGIN RSA PRIVATE KEY~-~-~-~--
225
226 MIIEpAIBAAKCAQEAxN1zUZAtUGiEB4IkPqfpZMUAWvKBNyH3RrnBSvZuGVW4PG8S
227
228 EQo1ya7m84KjlqCZ8tZvZULGB7OC9A4FhDzWhOpck12Xi1LQMgJ+pv+iBUdYYdFq
229
230 jrtfKFs80FLSP+cI9MgiTr780F5g86Nob6m619cTtIYgRxzdF6+RiRQnHrL5Yfsw
231
232 uOPWa5+5cFVYgvVGt+shE/Dpq5WTt2FLmtQ29hwlrtB3qCkCHUPM+PtkQKu/t8Qg
233
234 gEMSxJg7LpOha3OoYhVwgAcEN85EHQdyb43vAbcoN/rU/hpaQuWQ/mlFRpQhB1Vu
235
236 XGCKebHYrefy39Y/tBx8hNrX3WuMRVUFeaRE6wIDAQABAoIBAFhAOcjvjBDGuaEw
237
238 CxV3al49HfqnSZuwg0xWSztSm2qKDcwxsnSnEhO2b1vsTW9h0YGV9Vv8gg/Dvkmv
239
240 23M7XqM4+IUraJsRZbl1etdcM4KQSCOZoF4Zyv+pXuq4pf31kQNCkHaikWzLUkUG
241
242 FPQxr0vA49mCYwfd/ZL3ppM/0IWmxRwloV1Gb9q8iDBUcJGSDokZnT7diUxzzOcd
243
244 +UJ6xUhFq1v46Y7vO+73XROLv34JEBC0bIw2ErL6+AbzhHwb2mkuSccG9Ks37g3Z
245
246 dyyjjj8hm1wvHWepuWqEssaiS3HD5zAsI0v85xS8RwNj3zLfd8o1WC666n3CO+ij
247
248 VdRmR4kCgYEA+/sEFxpfaRomqcLwJebZcZH06U1RfJFfnbH2/Q6fANf8zNxwWs9A
249
250 O+jyk/CLhHYRIk6VIOMQmWwEYgJ2eAHfw2Diwj4/0eqkGu+yZOS6KTCewxSV73vc
251
252 SvACramJy4y6yEgDN5onwR1XqfVMfA0LzTcSupHR/xvrpf/gCsNFPxUCgYEAyAFd
253
254 nMUhJFSq3pOogxA43aJSkA8YuDS3jpBkKQ6vx81APpIMabQauOxFDt488TZGP3Yy
255
256 lhpa/lfFIgu2K7CgV4dUp+JtJJoZ/F+ExxUUzdqB4zxzWywAcc3RebfwP6qASwFT
257
258 G3mXYci4tgNWR+k5CSsuLXDk/OT5uo5GeGAEc/8CgYEAk6V8uxDP8STKnNRFpN/E
259
260 b6CHciDE64m/DgbWY2cq0fK9BUjxaLRhvfj8EqVzCrWnyoNjLHcAJfW+B7PLuPvY
261
262 IoJlvE1/Vb/4UnQ7ApVnY3VCwaoRRNc9uIcz+pAJ1sRqOarAf9cLDkPkNwktvM5k
263
264 KOXpSnrhIms4w/bPT18l9xUCgYBsAMDKbXEuK0JyGw5+Z/4tQQCQpnZU0rLkm3ha
265
266 64FkxaORplBprEZZ4cyQ8NW78/EPSAadI/JLMp5TejuPcDvFyGCgoBcMEuNBc1tC
267
268 HlIzr3FAgl5Qt3wt+FTMA9YKq0nINxjn10s2FKwaLccj4f9YwiaXh0VAg22PnlDT
269
270 pBYDhQKBgQCMwyKXJ4zYiDRdvLvgKzeuKaU4KNQItHE4KORPfkecjPoENt4bKxDw
271
272 2EdNFQLIoqBHL1s+/8+SzhCI31V7pkTs1AqCxDExJS7+8Z5NQFQIo/jooUo0N80E
273
274 y3ZZS6OLOXXscEqhMogf1grfbabXM9OkgTIq43cPQHtMGQiFAtIJkg==
275
276 ~-~-~-~--END RSA PRIVATE KEY~-~-~-~--}
277
278 Note: Be sure to add a terminator "}" at the end of the command. Otherwise, the command will not execute successfully.
279
280
281 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image026.jpg]]
282
283 Display "Successfully configured client private key." If the configuration is successful, otherwise it is considered configuration failure
284
285 1. After the certificate configuration is completed, Re-upgrade to the firmware you originally used
286
287 1. Configure draginoNB-device
288
289 1. Configure the data format sent by the device
290
291 AT+PRO=3,5(Data is in Json format of MQTT)
292
293
294 1. Set server address
295
296 AT+SERVADDR=an5tk94sdgjat-ats.iot.us-east-1.amazonaws.com,8883
297
298
299
300 1. Set up private and public topics.
301
302 AWS does not limit topics, so you can set any topic
303
304 AT+SUBTOPIC=Any
305
306 AT+PUBTOPIC=Any
307
308
309 1. Set the TLS mode
310
311 AT+TLSMOD=1,2
312
313 To use the TLS mode certificate function, users need to configure the AT+TLSMOD command
314
315 AT+TLSMOD=1,0  No authentication
316
317 AT+TLSMOD=1,1  Perform server authentication
318
319 AT+TLSMOD=1,2  Perform server and client authentication if requested by the remote server.(In AWS we recommend using this mode)
320
321
322 1. Restart the device
323
324
325 1. View data on AWS
326
327 1. Find MQTT test client in test
328
329 In the fourth step, fill in the topics you subscribed to before
330
331 AT+PUBTOPIC=XXXX
332
333 If you forget your previous topic, you can fill in #,subscribe to all topics
334
335 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image028.jpg]]
336
337 1. You can see published information in Subscriptions
338
339 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image030.jpg]]
340
341 [[image:file:///C:/Users/93456/AppData/Local/Temp/msohtmlclip1/01/clip_image032.jpg]]
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0