Use MQTT protocol to transmit data#
Build Broker Server#
Use a server to build MQTT Broker, and the barcodes uploaded by the scanner are transferred through this server.
Demo software#
EMQX open source version, download address: EMQX
Testing Services#

Note
Server Connection Information
Host:mqtt.handy.pub
Port:1883
Username:netum
Password:netum@2022
For testing use only and strictly prohibited for use in production environments.
Configure Scanner#
Configure WiFi and Broker#
Note
The scanner connects to the MQTT Broker using port 1883 by default.
The topic content subscribed by the scanner is the device ID.
Modify the MQTT connection port#
Modify the scanner publishing topic#
Modify the scanner subscription topic#
Receiving Data#
Use the MQTT client software [MQTTX] to connect to the Broker server and subscribe to the topic where the scanner publishes messages.

Development Reference#
[MQTT Tutorial(https://www.emqx.com/zh/mqtt-guide)