Transfer data to AWS IoT using the MQTTs protocol#

Note

Only applicable to scanners that support Wi-Fi transmission, such as DS2800.

Register the device on the AWS IoT page and obtain the client certificate and private key#

  • Click Things to enter the page.

../../_shared/_images/wireless-wifi/awsiot-things.png

Things page#

  • Click Create Things to enter the device creation page.

../../_shared/_images/wireless-wifi/awsiot-things1.png

Create Things page#

  • Click Next to enter the device property setting page.

../../_shared/_images/wireless-wifi/awsiot-things2.png

Specify things properties#

  • After entering the Thing name, click Next to enter the device certificate configuration page.

../../_shared/_images/wireless-wifi/awsiot-things3.png

Configure device certificate#

  • Click Next to enter the certificate policy binding page.

../../_shared/_images/wireless-wifi/awsiot-things4.png

Attach policies to certificate#

  • Click Create policy to enter the policy creation page, enter the policy name, copy the following content into the JSON input box, and then click Create to complete creation.

Policy document#
 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}
../../_shared/_images/wireless-wifi/awsiot-things5.png

Create policy page#

  • Return to the Attach policies to certificate page, check the newly created policy, and click Create Things to complete device creation.

../../_shared/_images/wireless-wifi/awsiot-things6.png

Bind policy and create Thing#

  • Download the certificate and private key first, then click Done to complete the device creation process.

../../_shared/_images/wireless-wifi/awsiot-things7.png

Download certificate and private key#

Configure scanner#

Set MQTT mode#

../../_shared/_images/wireless-wifi/AT2BMQTTMODE3D4.png

MQTTs mode#

Set MQTT port to 8883#

../../_shared/_images/wireless-wifi/AT2BMQTTPORT3D8883.png

MQTT port 8883#

Set client certificate#

Tip

If the generated QR code is too large, take a screenshot and send it to your mobile phone first. Then set the phone screen brightness to the highest level and use the scanner to scan the code.

Set private key#

Tip

If the generated QR code is too large, take a screenshot and send it to your mobile phone first. Then set the phone screen brightness to the highest level and use the scanner to scan the code.

Configure Wi-Fi and Broker#

Tip

After entering the corresponding Wi‑Fi information and service address, the scanner will actively connect to AWS IoT. After the connection succeeds, the green indicator light on the scanner will stay on.

MQTT test client#

  • Click MQTT test client to enter the page.

  • After entering the topic to subscribe to and clicking Subscribe, use the scanner to scan a barcode. You can then receive the data uploaded by the scanner.

../../_shared/_images/wireless-wifi/awsiot-test.png

MQTT test client page#