WI-FI Wireless or Ethernet Barcode Scanner Solution

Introduction

Wireless or Ethernet access control will be more and more popular in the future. Most traditional barcode scanners or NFC card reader without wireless or Ethernet feature. So RTscan developed a kit board that can convert a common USB barcode scanner or NFC reader into a Wi-Fi barcode scanner/Ethernet barcode scanner or a Bluetooth barcode scanner.

The barcode scanner is connected to RT001 via a USB cable, RT001 is connected to the router via WIFI or Ethernet (or connected to table/cell phone terminals via Bluetooth). And then transfer to read data to MQTT topic via remote MQTT server by the Internet.

This article takes the RT870 barcode scanner as an example, introduces how to use the RT870 barcode scanner together with RT001 to upload barcode decoded data via Wi-fi or Ethernet (MQTT server).

 

blank

Connection diagram

 

Hardware preparation

    1. RT870 Barcode Scanner
    2. RT001 WIFI/Ethernet kit
    3. 5V power supply, it can be a mobile phone charger or other DC 5V power supply

Hardware connection

 

  1. RT870 connects to RT001 via USB cable

blank

  1. RT001 connects to the router via network cable or WIFI

blank

  1. Connect the power supply to RT001

blank

Software prepare

1. RT001 configuration software:

RTSCAN Config ToolV1.2

Later, we can scan the configuration code generated by RTSCAN Config ToolV1.2 to set RT001 parameters.

2. MQTT server

Here we use a public MQTT server (MQTT Public Brokers), you can fill in your own MQTT server address port and other parameter information as needed.

Here we use the broker.hivemq.com server, the official website is http://www.mqtt-dashboard.com/, the MQTT TCP port is 1883, and the MQTT WebSocket port is 8000

blank

Its server requirements are as follows:

  • The server address is: broker.hivemq.com
  • Port: 1883
  • No username and password required
  • Custom client id
  • Free subscription to publish topics

According to this rule, the parameters we fill in are:

  • Address: iot.eclipse.org
  • Port: 1883
  • ClientID: Generate random id
  • Username: (NULL) leave it blank
  • UserPSW: (NULL) Leave it blank without filling in
  • Publish: /rtscan/rt870/pubtopic can be customized
  • Subscribe: /rtscan/rt870/subscribe can be customized

Scanner settings

You need to set the RT870 scanner to USB-CDC output: from the user manual, scan the USB-CDC setting code will be ok.

If you need others setting, please use RT870 to scan the corresponding settings codes from the RT870 user manual.

RT001 terminal parameter setting

RT001 provides a variety of connection methods. Here we use WIFI connection routing to establish an MQTT connection with broker.hivemq.com:

blank

  1. Output mode is WIFI or Ethernet

blank

Or

blank

2.When setting to Wi-Fi mode, you need to configure wireless router SSID and password

blank

The encryption method is WPA2, no password, WIFI PSW does not fill in the content

For WIFI connection, fill in your Wi-Fi name (SSID) and password

blank

3. In IP mode, it is recommended to obtain IP dynamically, and the router will assign IP. When set to static IP, three parameters need to be set correctly

blank

OR

blank

Here we use the dynamic acquisition of IP

  1. NET Mode is set to MQTT mode

blank

4. Enter the relevant parameters required by the MQTT server, address port client publish-subscribe option is required, Username, the user password is optional.

  • Address: iot.eclipse.org
  • Port: 1883
  • ClientID: Generate random id
  • Username: (NULL) leave it blank
  • UserPSW: (NULL) Leave it blank without filling in
  • Publish: /rtscan/rt870/pubtopic can be customized
  • Subscribe: /rtscan/rt870/subscribe can be customized

blank

5. Generate setting code

blank

6. Use the device to scan the QR setting code to complete the configuration

Connect the scanner to RT001, scan the generated QR code, RT001 completes the configuration after receiving the configuration data sent by the scanner, and the device automatically connects to the set MQTT broker

7.Transparently transmit the scan code information to the MQTT server

Scan any barcode, the device uploads the barcode data to the set publishing topic and controls the device to upload data to the subject of the device subscription.

Receive data released by the device

After the device is set up, it will automatically connect to the MQTT server, subscribe to the set topic, and upload messages to the set topic.

To receive the scanned code data uploaded by RT001, we need to connect to the same MQTT Broker as RT001. The user can receive the scan code content uploaded by RT001 by subscribing to the topic published by RT001. When a command is sent to the scanner, the user publishes a message to RT001 subscription After receiving the data, RT001 transparently transmits it to the scanner.

MQTT test tool recommends online and PC software, such as:

Online tools http://api.easylink.io/tools/mqtt/

Pc software Mqtt. fx http://mqttfx.jensd.de/

Easylink

 

Easylink uses MQTT Websocket to connect to MQTT broker, the MQTT Websocket port of broker.hivemq.com is 8000

blank

After connection, Subscribe to the topic published by the device

blank

Publish messages to topics subscribed by the device

blank

The device scans the 2d code, and the subscribed topic receives the data sent by the device

blank

Mqttfx

MQTT FX uses MQTT TCP to connect to MQTT broker, the MQTT TCP port of “broker.hivemq.com” is 1883

blank

Subscribe to the topic published by the device after connection /rtscan/rt870/pubtopic

blank

The device scans the 2d code, and the subscribed topic receives the data sent by the device

blank

Publish the message to the topic subscribed by the device: /rtscan/rt870/subscribe

blank

Important tip

You need to set the barcode scanner to USB-CDC output first to successfully communicate with RT001

For any questions, please consult our sales engineer sales@rtscan.net or support team support@rtscan.net.

Thanks!

 

6737 View
blank