Skip to content

Commit e2455cc

Browse files
committed
W232N_mqtt_guide
1 parent ba1f7bc commit e2455cc

File tree

2 files changed

+271
-13
lines changed

2 files changed

+271
-13
lines changed

docs/Product/S2E-Module/Industrial/mqtt-connection-guide-en.md

Lines changed: 266 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ date: 2022-06-28
1010

1111

1212

13-
## WIZ5xxSR-RP MQTT Connection Overview
13+
## MQTT Connection Overview
1414

15-
**WIZ5xxSR-RP** supports **MQTT client** and **MQTTS client** mode.
15+
**W232N** supports **MQTT client** and **MQTTS client** mode.
1616

1717

1818

@@ -27,7 +27,7 @@ date: 2022-06-28
2727
### Hardware
2828

2929

30-
- WIZ5xxSR-RP Evaluation Board (WIZ510SR-RP can be used without WIZ5xxSR-RP Evaluation Board.)
30+
- W232N
3131
- 5V Power adapter
3232
- Cables (Ethernet / Serial)
3333

@@ -50,15 +50,15 @@ date: 2022-06-28
5050

5151
## How to Connect to MQTT Broker through Mosquitto
5252

53-
WIZ5xxSR-RP supports MQTT client and MQTTS client mode, but this section guides how to connect to MQTT broker through Mosquitto based on MQTT client mode.
53+
W232N supports MQTT client and MQTTS client mode, but this section guides how to connect to MQTT broker through Mosquitto based on MQTT client mode.
5454

5555
> **Note** : MQTTS client mode requires additional security-related settings, unlike MQTT client mode.
5656
5757

5858

59-
### Step 1: Setup Environment to Use WIZ5xxSR-RP
59+
### Step 1: Run Config-tool
6060

61-
The process of setup environment to use the WIZ5xxSR-RP each product is available at the **'Getting Started'** document below.
61+
Run installed **'Config-tool'**
6262

6363

6464

@@ -91,7 +91,7 @@ mosquitto -c mosquitto.conf -p 1883 -v
9191

9292

9393

94-
### Step 4: Setup WIZ5xxSR-RP through WIZnet S2E Configuration Tool for MQTT Broker Connection
94+
### Step 4: Setup Device through WIZnet S2E Configuration Tool for MQTT Broker Connection
9595

9696
1. Select **MQTT client** mode in the **Operation mode** setting section
9797

@@ -130,7 +130,7 @@ mosquitto -c mosquitto.conf -p 1883 -v
130130

131131
### Step 5: Done
132132

133-
WIZ5xxSR-RP is successfully connected to the MQTT broker!
133+
Device is successfully connected to the MQTT broker!
134134

135135
| |
136136
| :------------------------------------------------------------------------: |
@@ -145,3 +145,261 @@ WIZ5xxSR-RP is successfully connected to the MQTT broker!
145145

146146

147147
-----
148+
149+
150+
## How to connect to AWS using MQTT
151+
152+
### Step 1: Create a Thing and Policy in AWS and Download a Certificate
153+
154+
1. To use AWS services, you must first sign in. Click the link below to go to the sign in page.
155+
156+
**[AWS login page](https://aws.amazon.com/console/)**
157+
158+
<br />
159+
<br />
160+
161+
162+
2. Once logged in, search for “IoT Console” in the search bar and click on it.
163+
164+
| |
165+
| :-----------------------------------------------------------------------------------------: |
166+
| <img src="/img/products/w232n/aws_execute/1_aws_iot_core.png" width="600" /> |
167+
| Figure: **Search “IoT Console"** |
168+
169+
<br />
170+
<br />
171+
172+
2. Click the “Things” tab on the left, then hit the orange “Create things” button.
173+
174+
| |
175+
| :-----------------------------------------------------------------------------------------: |
176+
| <img src="/img/products/w232n/aws_execute/2_aws_creating_thing.png" width="600" /> |
177+
| Figure: **click "Create Things"** |
178+
179+
<br />
180+
<br />
181+
182+
183+
3. Select “Create single thing” and press the Next button.
184+
185+
| |
186+
| :-----------------------------------------------------------------------------------------: |
187+
| <img src="/img/products/w232n/aws_execute/3_aws_creating_thing.png" width="600" /> |
188+
| Figure: **Select "Create things"** |
189+
190+
<br />
191+
<br />
192+
193+
194+
4. Enter “Thing name” and hit the Next button.
195+
196+
| |
197+
| :-----------------------------------------------------------------------------------------: |
198+
| <img src="/img/products/w232n/aws_execute/4_aws_creating_thing.png" width="600" /> |
199+
| Figure: **Enter "Thing name"** |
200+
201+
<br />
202+
<br />
203+
204+
205+
5. Select “Auto-generate a new certificate (recommended)” and press the Next button.
206+
207+
| |
208+
| :-----------------------------------------------------------------------------------------: |
209+
| <img src="/img/products/w232n/aws_execute/5_aws_creating_thing.png" width="600" /> |
210+
| Figure: **Select "Auto-generate a new certificate" and click "Next"** |
211+
212+
<br />
213+
<br />
214+
215+
216+
6. Next, you need to create a policy for securing your Thing. Click “Create policy”.
217+
218+
| |
219+
| :-----------------------------------------------------------------------------------------: |
220+
| <img src="/img/products/w232n/aws_execute/6_aws_creating_policy.png" width="600" /> |
221+
| Figure: **Click "Create policy"** |
222+
223+
<br />
224+
<br />
225+
226+
227+
7. Set a name for the policy, configure the Policy Document as shown, and hit the Create button.
228+
229+
| |
230+
| :-----------------------------------------------------------------------------------------: |
231+
| <img src="/img/products/w232n/aws_execute/7_aws_creating_policy.png" width="600" /> |
232+
| Figure: **Setting policy information** |
233+
234+
<br />
235+
<br />
236+
237+
238+
8. Go back to the “Create single thing” page you opened earlier and press the “Create thing” button.
239+
240+
| |
241+
| :-----------------------------------------------------------------------------------------: |
242+
| <img src="/img/products/w232n/aws_execute/8_aws_combine_policy.png" width="600" /> |
243+
| Figure: **Click "Create thing"** |
244+
245+
<br />
246+
<br />
247+
248+
249+
9. Download all keys and certificates.
250+
251+
| |
252+
| :-----------------------------------------------------------------------------------------: |
253+
| <img src="/img/products/w232n/aws_execute/9_aws_downloading_cert_key.png" width="600" /> |
254+
| Figure: **Download all keys and certificates** |
255+
256+
<br />
257+
<br />
258+
<br />
259+
<br />
260+
261+
### Step 2: Enter the certificate on the device
262+
263+
1. In AWS, enter the MQTT Test Client tab and copy the endpoint.
264+
265+
| |
266+
| :-----------------------------------------------------------------------------------------: |
267+
| <img src="/img/products/w232n/aws_execute/10_aws_copy_endpoint.png" width="600" /> |
268+
| Figure: **Copy Endpoint** |
269+
270+
<br />
271+
<br />
272+
273+
2. Turn on the configuration tool to detect your device and set the “Basic settings” tab as follows
274+
275+
| |
276+
| :-----------------------------------------------------------------------------------------: |
277+
| <img src="/img/products/w232n/aws_execute/1_device_search.png" width="600" /> |
278+
| Figure: **Set the “Basic settings” tab in the configuration tool** |
279+
280+
<br />
281+
<br />
282+
283+
3. Set up the “MQTT options” tab like this
284+
285+
- MQTT Topics Section
286+
- **Publish Topic:** $aws/things/my_w232n_thing/shadow/update
287+
- **Subscribe Topic:** $aws/things/my_w232n_thing/shadow/update/accepted
288+
289+
- MQTT Options
290+
- **Client ID:** my_w232n_thing
291+
- **Keep-Alive:** 60
292+
- **QoS:** QoS 0
293+
294+
- Remote Host / Port
295+
- **Remote Host:** Paste the copied endpoint
296+
- **Remote Port:** 8883
297+
298+
| |
299+
| :-----------------------------------------------------------------------------------------: |
300+
| <img src="/img/products/w232n/aws_execute/2_MQTT_option.png" width="600" /> |
301+
| Figure: **Set “MQTT options”** |
302+
303+
<br />
304+
<br />
305+
306+
307+
4. Go to the Certificate Manager tab and adjust the Root CA section as shown below.
308+
309+
| |
310+
| :-----------------------------------------------------------------------------------------: |
311+
| <img src="/img/products/w232n/aws_execute/3_MQTT_cert_key.png" width="600" /> |
312+
| Figure: **Adjust the Root CA section** |
313+
314+
<br />
315+
<br />
316+
317+
5. Tap “Load file” to load the following certificate and key files
318+
319+
- **Root CA** : AmazonRootCA1.pem
320+
- **Client Certificate** : xxxxx-certificate.pem.crt
321+
- **Private Key** : xxxxx-private.pem.key
322+
323+
| |
324+
| :-----------------------------------------------------------------------------------------: |
325+
| <img src="/img/products/w232n/aws_execute/4_MQTT_cert_key.png" width="600" /> |
326+
| Figure: **Load certificate and key files** |
327+
328+
<br />
329+
<br />
330+
331+
6. Press each of the “Save to device” buttons.
332+
333+
| |
334+
| :-----------------------------------------------------------------------------------------: |
335+
| <img src="/img/products/w232n/aws_execute/5_MQTT_cert_key.png" width="600" /> |
336+
| Figure: **Save certificate and key files** |
337+
338+
<br />
339+
<br />
340+
341+
7. click “Apply settings”.
342+
343+
| |
344+
| :-----------------------------------------------------------------------------------------: |
345+
| <img src="/img/products/w232n/aws_execute/6_MQTT_cert_key.png" width="600" /> |
346+
| Figure: **click “Apply settings”** |
347+
348+
<br />
349+
<br />
350+
<br />
351+
<br />
352+
353+
354+
### Step 3: Run (Subscribe)
355+
356+
1. Go back to the AWS IoT Console page and click “MQTT test client” under the “Test” section to enter it. Then, in the MQTT Topics Section of the configuration tool, enter the Publish Topic **$aws/things/my_w232n_thing/shadow/update** in the “Topic filter” and hit the Subscribe button.
357+
358+
| |
359+
| :-----------------------------------------------------------------------------------------: |
360+
| <img src="/img/products/w232n/aws_execute/1_aws_sub_topic.png" width="600" /> |
361+
| Figure: **Subscrive topic** |
362+
363+
<br />
364+
<br />
365+
366+
2. Open your device's serial port using a terminal tool to transfer data.
367+
368+
| |
369+
| :-----------------------------------------------------------------------------------------: |
370+
| <img src="/img/products/w232n/aws_execute/2_aws_sub_topic.png" width="600" /> |
371+
| Figure: **Transfer data** |
372+
373+
<br />
374+
<br />
375+
376+
3. This will ensure that your MQTT communication with AWS is working correctly.
377+
378+
| |
379+
| :-----------------------------------------------------------------------------------------: |
380+
| <img src="/img/products/w232n/aws_execute/3_aws_sub_topic.png" width="600" /> |
381+
| Figure: **Successful MQTT communication with AWS** |
382+
383+
<br />
384+
<br />
385+
<br />
386+
<br />
387+
388+
### Step 4: Run (Publish)
389+
390+
1. Return to the AWS IoT Console page and click “MQTT test client” under the “Test” section. Then in the MQTT Topics Section of the configuration tool, enter the Subscribe Topic $aws/things/my_w232n_thing/shadow/update/accepted in the “Topic name” and hit the Publish button.
391+
392+
| |
393+
| :-----------------------------------------------------------------------------------------: |
394+
| <img src="/img/products/w232n/aws_execute/4_aws_pub_topic.png" width="600" /> |
395+
| Figure: **Publish topic** |
396+
397+
<br />
398+
<br />
399+
400+
2. In the Serials window, you can see the data sent by AWS.
401+
402+
| |
403+
| :-----------------------------------------------------------------------------------------: |
404+
| <img src="/img/products/w232n/aws_execute/5_aws_pub_topic.png" width="600" /> |
405+
| Figure: **Successful MQTT communication with AWS** |

docs/Product/S2E-Module/Industrial/mqtt-connection-guide-kr.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,17 @@ W232N이 MQTT 브로커에 성공적으로 연결되었습니다!
264264
| |
265265
| :-----------------------------------------------------------------------------------------: |
266266
| <img src="/img/products/w232n/aws_execute/10_aws_copy_endpoint.png" width="600" /> |
267-
| 그림: **"IoT 콘솔" 검색** |
267+
| 그림: **Endpoint 복사** |
268268

269269
<br />
270270
<br />
271271

272-
2. 구성 도구를 켜서 장치를 검색하고 다음과 같이 "Basic settings" 탭을 설정하세요.
272+
2. Config-tool을 켜서 장치를 검색하고 다음과 같이 "Basic settings" 탭을 설정하세요.
273273

274274
| |
275275
| :-----------------------------------------------------------------------------------------: |
276276
| <img src="/img/products/w232n/aws_execute/1_device_search.png" width="600" /> |
277-
| 그림: **구성 도구의 "Basic settings" 탭 설정** |
277+
| 그림: **Config-tool을의 "Basic settings" 탭 설정** |
278278

279279
<br />
280280
<br />
@@ -327,7 +327,7 @@ W232N이 MQTT 브로커에 성공적으로 연결되었습니다!
327327
<br />
328328
<br />
329329

330-
6. "Save to device" 버튼을 세 번 누르세요.
330+
6. 표시한 "Save to device" 버튼을 각각 누르세요.
331331

332332
| |
333333
| :-----------------------------------------------------------------------------------------: |
@@ -362,7 +362,7 @@ W232N이 MQTT 브로커에 성공적으로 연결되었습니다!
362362
<br />
363363
<br />
364364

365-
2. S2E 모듈의 UART에 연결된 USB 포트를 시리얼 터미널 도구를 사용하여 열고 데이터를 전송하세요.
365+
2. 디바이스의 시리얼포트를 터미널 도구를 사용하여 열고 데이터를 전송하세요.
366366

367367
| |
368368
| :-----------------------------------------------------------------------------------------: |

0 commit comments

Comments
 (0)