Use MQTTs protocol to transfer data to AWS IoT#
Register your device on the AWS IoT page to obtain the client certificate and private key.#
Click on Things to enter the page.
Click on
Create Thingsto go to the creation page.
Click
Nextto go to Specify things properties
After entering the Thing name, click
Nextto proceed to Configure device certificate.
Click
Nextto go to Attach policies to certificate
Click
Create policyto enter the Create policy page, enter a policy name, copy the content below into the JSON input box, and clickCreateto complete the creation.
1{
2 "Version": "2012-10-17",
3 "Statement": [
4 {
5 "Effect": "Allow",
6 "Action": [
7 "iot:Publish",
8 "iot:Receive",
9 "iot:PublishRetain"
10 ],
11 "Resource": "*"
12 },
13 {
14 "Effect": "Allow",
15 "Action": "iot:Subscribe",
16 "Resource": "*"
17 },
18 {
19 "Effect": "Allow",
20 "Action": "iot:Connect",
21 "Resource": "*"
22 }
23 ]
24}
Return to the
Attach policies to certificatepage, check the box for the policy you created, and clickCreate Thingsto complete the creation process.
First download the certificate and private key, then click
Doneto complete the Create Things process.
Configure Scanner#
Set MQTT mode#
Set MQTT Port to 8883#
Set Client Certificate#
Truco
If the QR code is too large, we recommend taking a screenshot and sending it to your phone. Then, turn your phone screen brightness to maximum before scanning it with a barcode scanner.
Set Private Key#
Truco
If the QR code is too large, we recommend taking a screenshot and sending it to your phone. Then, turn your phone screen brightness to maximum before scanning it with a barcode scanner.
Configure WiFi and Broker#
Truco
After entering the corresponding WiFi information and service address, the scanner will actively connect to AWS IoT. Once the connection is successful, the green indicator light on the scanner will stay on.
MQTT test client#
Click on MQTT test client to enter the page.
After entering the topic you want to subscribe to and clicking
Subscribe, use the barcode scanner to scan the barcode and receive the data from the scanner.