Embedded 2D Barcode Scanner Using in Shenzhen Metro Station

Shenzhen Metro station case:

Today we are going to introduce you the QR code scanning application in the Shenzhen Metro Station. This application is now very common/popular in China, with this application, you don’t need to queue to buy a ticket, only reads the QR code on your mobile phone with a scanner. The barrier will open, and the starting point will be recorded at the same time, and passengers can pay the fare via their mobile phones when they leave the terminal, which is convenient and fast.

I hope this case can be used as a reference for companies in similar applications and industries, it will be very helpful.

The subway barrier uses a high-speed embedded scanner with a large screen, and the scanning light is always on, which is in the automatic sensing mode. When a passenger enters a subway station, simply opens the QR code on his mobile phone, the scanner quickly captures the code, and then opens the gate of the barrier. The passing speed is very fast, even in the morning/evening peak when there is a lot of people.

RTscan also has similar scanners can be used in this kind of solutions, please refer: https://www.rtscan.net/barcode-reader…

 Any question, please contact us: sales@rtscan.net

24 January 2022

Related Products:

Embedded 2D Barcode And QR Code Reader: RT870

Embedded 2D Barcode And QR Code Reader: RT870

All Projects/ Case Studies

Barcode Scanner applications Videos and Article

Hospital
24 January 2022

Barcode Scanner Solution for Hospital

Ask A Sample To Test Now!






    Read More


    Merry Christmas!

    Dear All Partners:

    We wish you a very wonderful Christmas and Happy New Year.With our immense gratitude for your trust and support throughout 2021,RTscan team we will keep providing you high qualityscanner and good service.

    All members from RTscan

    Read More


    QR Code Reader for EU Digital COVID Certificate I Green Pass QR Code Reader

    If you are planning to build access control system for EU Digital COVID Certificate, you can consider to use RTscan’s QR code readers.

    Firstly, the QR code is big and high density, most of common barcode reader can’t read it, and our recommended scanners (RT830C/RT870/RT302) work fast and accurate for the EU Digital COVID Certificate QR code from cell phone.

    Secondly, we provide Wiegand solution or Arduino / Raspberry solution for our QR readers, which would save lots of your time and help you to build your system more quickly and easily.

    If you need a handheld QR scanner, you can use RT302, and if you need an embedded scanner for turnstiles or applications of visitor management, business organizations, stadiums or public events, you can choose RT830C or RT870.

    For Green pass QR code reader solution, RTscan has succesfull cases in many countries. For example, ALHOSN QR code green pass application in Abu Dhabi:

    In order to fight the spread of COVID-19 and keep the UAE and its people safe, the UAE created ALHOSN, all the residents need to use this unique QR code to grant the access to public places.

    RTscan is honored to be selected to supply RT870 embedded scanner for this access control system, this scanner was shipped to Abu Dhabi, where it was integrated with other accessories by local professional integrator to form a pillar that is both elegant and practical. Employees or visitors will need to open their Alhosn app on their mobile device and show the QR code to the pillar.

    Solution 1:

    RTscan developed a multi-interface Shield, connect the shield with Arduino UNO, then connect the RT830C via a 12pins flat cable:

    Solution 2:

    Use the multi-interface Shield, connect the shield with Arduino UNO, then connect the RT830C via a 4pins cable. The RT830C comes out RS232 signal to the shield, and the shield converts it to TTL-232 signal and transmits to Arduino board.

    The RT830C doesn’t have a glass window on scanner surface, if you prefer one with glass window on surface, then choose our RT870 and use this solution: use an Arduino USB host shield as shown below.

    Background knowledge:

    The EU has been working for months on a joint digital travel certificate for those vaccinated, freshly tested, or recently recovered from the virus. The free certificates, which will contain a QR code with advanced security features, will allow people to move between European countries without having to quarantine or undergoing extra corona-virus tests upon arrival.

    Fully vaccinated persons with the EU Digital COVID Certificate should be exempted from travel-related testing or quarantine 14 days after having received the last dose of a COVID-19 vaccine approved for the entire EU. The same is true for recovered persons with the certificate.

    Read More



    Use RTMU86 with ZKTeco access control panel via Wiegand interface for access control system

    RTMU86 is a scanner specially designed for access control systems. It can scan 1D 2D bar codes and read NFC cards, and supports Wiegand 26 and Wiegand 34 output. The read information is transmitted to the access controller through the Wiegand signal and the control door to be opened.

    In theory, RTMU86 can be connected to any Wiegand controller. In this article, we will take ZKTeco’s access control panel as an example to demonstrate the hardware connection method and software configuration.

    1. Hardware:

    The ZK access control panel

    RTMU86 reader

    Hardware connecting

    Use RTMU86 Wiegand cable to connect to the READER interface of the ZK access control panel

    Connect lock with access control panel:

    Connect the network cable on the control board to the router lan port or directly plug it into the network port of the computer:

     

    2. Software preparation

    ZKAccess3.5.16

    ScannerConfigV2.3.7

    RTMU86 settings

    Manually select the scanner model to RTMU86

    Click Next

    Work mode settings

    • Word mode: Wigan,
    • Development mode: Protocol
    • Wiegand format: Wigan34

    Click Next

    Select Advanced->Output format->Digital Char turn Hex

    Click config code to generate a configuration QR code, use the MU86 to read the QR code to complete the configuration

     

    3. ZK Access control system software installation and setting

    1. Install ZKAccess3.5.16

    2. Log in to the ZKAccess control management system

    The default account is admin and the password is admin

    3. Add access controller device

    Click Devie->Search Device-> Search to find and add the ZK controller device in the LAN

    Modify the file controller IP.

    Select the found controller, right-click and choose Modify Address to configure the device IP address, or you can also specify the IP address for the device in the router DHCP server.

    Click Add Device to add the device

    4. Add personnel and card number

    Select Personnel->Personnel->Add to add personnel and information

    Add card number

    Click the card icon behind Card Number to select the device that reads the card number, and wait a moment

    Swipe the card or scan the bar code to add the card number

    5. Personnel registration and access control binding

    Add working time zone, Access Control ->Time zone

    Add group

    Add the previously added personnel to the group, then the personnel have the privilege to open and close doors

    6. Real-time monitoring of access control

    Click Access Control -> Real-Time Monitoring

    Swipe card or read bar code to control the switch

    7. Attention!

    Once the configuration is changed, the configuration needs to be synchronized to the device

    Related Products:


    Read More


    Simple Access Control System: Use Barcode Scanner RTMU86 Control The Lock Directly, Without Use Access Control Panel.

    RTMU86 uploads the scan data to the server and controls the door lock

    In most cases, the composition of the access control system is like this: barcode scanner / NFC reader + access control panel + lock + control software/server.

    However, if you use our RTMU86, we can make the system more simple.

    Firstly, connect use RTMU86 scanner with the lock, and then connect RTMU86 to the server via Ethernet. The scanned content is sent to the server through the Ethernet. After the server verifies the content and sends the unlock command to the RTMU86, the RTMU86 directly controls the lock to be opened. So the solution becomes:

    barcode scanner / NFC reader+ lock + control software/server.

    Through this solution, we do not need to use the access control panel, thereby reducing the cost and greatly simplifying the difficulty of system integration. So

    Tips:

    1. If you use this solution, customers need to develop/build their own access control management software.
    2. In this article, we introduce a solution without the use of an access controller, but you can also use the RTMU86 to work together with the access controller and then connect with the lock. To learn more about this solution, please read:  https://www.rtscan.net/wiegand-barcode-scanner-and-zkteco-access-control-system/

    Below, we describe the hardware connection and scanner configuration in detail.

    1. Hardware connection

    (1) RTMU86 connection with a lock

    12V is connected to the RTMU86 com terminal input, and NO is connected to the positive pole of the electromagnetic lock power supply. After mu86 receives the unlock command, the com and no ports are turned on, and the electromagnetic lock is energized and unlocked.

    Door lock connection diagram

    (2) RTMU86 network port connection

    The RTMU86 Ethernet version (the other version is the Wiegand version) directly leads out four network cable pins, which can be connected to four of the standard eight-core network cables according to the color. The network cable adopts the 568B connection method. Please refer to the table for wiring according to the color.

    RTMU86 pinsPin4Pin3Pin2Pin1
    Network cable colorOrangeOrange whiteGreenGreen white
    Network cable color icon

     

    2.RTMU86 Configuration

    (1).Select RTMU86

    Click next

    (2)Setup work mode

    work mode:Develop,

    Output: Ethernet

    Development:Protocol

    WIFI/Ethernet/2G output: TCP

    (3) Set NET

    SuccessAction:flash Green (Optional)

    FailAction:flash red(Optional)

    Set the service address and port to which the data is uploaded (*necessary settings)

    Address: server address, such as 192.168.4.1

    Port num: server port

    IP mode setting

    Dynamic IP: dynamic IP, IP address is automatically assigned by the router

    Static IP: manually specify the IP address, when set to static IP, you must specify the IP address, Subnet mask, Gateway, the format is as follows

    (4) Device scan code configuration

    Click config code to generate configuration code. Device scan code configuration code to complete the configuration

    For detailed usage of the configuration tool, please refer to “ScannerConfig Configuration Tool User Manual”.

    After the configuration is complete, the device automatically connects to the specified server, and then reports the scan data after scanning the code.

     

    3. Connect to the server

    As a client, the MU86 scanner can establish a long TCP connection to the server and process the response returned by the server. The interface specification is defined as follows

    TCP/TCP protocol

    The format of the requested TCP/IP server IP address is: xxx.xxx.xxx.xxx

    The format of the requested TCP/IP server port is: 0-65535

    The scanner sends the original scanned data to the server

    server:

    4. Register account and control door lock

    Use the server to build TCP server, accept the data reported by the scanner, determine the uploaded data, and issue the unlock command

    Relay control command: (command is a hexadecimal array)

    Command headerCommand wordData lengthByte 1Byte 2Check word
    2Byte1Byte2Byte1Byte1Byte1Byte
    0X55 0XAA0x2a0X02 0X00

    0x01 On

    0x00 Off

    Duration (unit: 50MS) 0x00: Default time 

    E.g:

    55 aa 2a 02 00 01 02 d4 Relay on 100ms

    55 aa 2a 02 00 00 02 d5 off relay

    More instructions reference<>

    In this test, the server side uses python to build tcpsever, reads the data uploaded by the device, and judges whether it meets the registered id and is in compliance with the issued unlock instruction

    Run py

    The device establishes a connection

    Uploaded data received

    ID is the same as the saved id, issue the unlock command

    Reference source code

    import binascii
    from quopri import HEX
    from socket import *
    from time import ctime
    
    HOST = '192.168.4.1'
    PORT = 8888
    BUFSIZ = 1024
    ADDR = (HOST, PORT)
    
    tcpSerSock = socket(AF_INET, SOCK_STREAM)
    tcpSerSock.bind(ADDR)
    tcpSerSock.listen(5)
    
    id_list = ["12345678", "abcdefg"]
    
    def calculate_bbc(data, len):
    bbc = 0
    for i in range(len):
    bbc ^= data[i]
    return bbc
    
    def detection_id(data):
    data_len = len(data)
    
    if data_len &lt; 8:
    return 0
    
    if data[0] == 0x55 and data[1] == 0xaa and data[2] == 0x30 and data[3] == 0x00:
    bbc = calculate_bbc(data, data_len - 1)
    if bbc == data[data_len - 1]:
    id_len = data[4] + data[5] * 256
    id = data[6:6+id_len]
    print("read id=", id)
    for cid in id_list:
    if id == cid.encode("UTF-8"):
    return 1
    
    print("Id not registered:", id)
    return 0
    else:
    return 0
    
    def send_lock_open(client, ms):
    buf = [0x55, 0xaa, 0x2a, 0x02, 0x00, 0x01, 0x00, 0x00]
    if ms &lt; 50: ms = 50
    buf[6] = int(ms / 50)
    buf[7] = calculate_bbc(buf, 7)
    # print("send:", bytes(buf))
    client.send(bytes(buf))
    
    recv = client.recv(BUFSIZ)
    if not recv:
    return -1
    # print(recv)
    if recv == b'\x55\xaa\x2a\x00\x00\x00\xd5':
    return 1
    else:
    return 0
    
    def send_lock_close(client):
    buf = [0x55, 0xaa, 0x2a, 0x02, 0x00, 0x00, 0x00]
    buf[6] = calculate_bbc(buf, 6)
    client.send(bytes(buf))
    
    while True:
    print('waiting for connection...')
    tcpCliSock, addr = tcpSerSock.accept()
    print('...connnecting from:', addr)
    
    while True:
    data = tcpCliSock.recv(BUFSIZ)
    if not data:
    break
    # print(data)
    if detection_id(data):
    print('open the door')
    if send_lock_open(tcpCliSock, 1000):
    print('open the door success')
    
    tcpCliSock.close()
    tcpSerSock.close()
    
    

    Related Products:


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

    Thanks!

    Read More


    WI-FI Wireless or Ethernet Barcode Scanner Solution

    1.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).

    Connection diagram

    2.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

     

    3.Hardware connection

    1.RT870 connects to RT001 via USB cable

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

    3.Connect the power supply to RT001

     

    4.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

    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: broker.hivemq.com
    • 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

     

    5.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.

    6.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:

    1. Output mode is WIFI or Ethernet

    Or

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

    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

    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

    OR

    Here we use the dynamic acquisition of IP

    1. NET Mode is set to MQTT mode

    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: broker.hivemq.com
    • 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

    5. Generate setting code

    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.

     

    7.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/

    (1).Easylink

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

    After connection, Subscribe to the topic published by the device

    Publish messages to topics subscribed by the device

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

     

    (2).Mqttfx

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

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

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

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

     

    8.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!

    Read More


    Wiegand Barcode Scanner & NFC reader And Access Control Solution

    Introduction:

    Most of the barcode scanners do not have Wiegand output. In addition, much often when we configure a barcode scanner with an access control panel,  we would meet these problems: 1. the output data are wrong–different from the original bar code content. 2. no output. These problems are usually because the data format does not match the requirements of the control panel. For example data length, ASCII, hex, or direct output data, with or without prefix/ suffix…

    Now we can use the RTWG01 Wiegand converter to achieve Wiegand output and solve the above problems. Via this RTWG01, we can easily customize the output data transferred to the access controller board. Data length, ASCII, hex, or direct output data, with or without prefix/ suffix… For example: if a barcode includes information: “William zhang, 2345666677, ****224455555*…” we can pick up number “34566667” or “23456666” or “5666677”…

    Firstly, we have the RTMU86 that output by the Wiegand interface directly:

    Wiegand NFC and 2D Barcode Scanner: RTMU86

    And we also developed solutions for three types of barcode scanners:

    In this article, we take barcode & NFC reader RTX200 as an example and tell you how to build the solution: configure the scanner and RTWG01 converter, detailed introduction for program the access control software. If you want to learn more about the above solutions for scan engines or embedded scanners, please email us: sales@rtscan.net.

    A. Hardware preparation:

    • RTX200 Barcode& NFC Scanner
    • RTWG01 converter
    • Type 5 and above 8 core RT45 wire

    Hardware connection

    RTX200 output the TTL signal through the RJ45 network cable, the other side of the network cable is connected to the RTWG01 which output with Wiegand signal and then connect to the access controller

    Connect RTX200 with Wiegand Converter RTWG01 via RT45 wire cable

    Connect RTWG01 Wiegand port using wire to access control board Wiegand port

    B. Software preparation

    • Access control system:  AccessControlV7.61en(ask RTscan sales engineers sales@rtscan.net to learn more about this system)
    • RTX200 Scanner Configuration Software:
    • Config Tool V2.3.12_JF
    • RTWG01 configuration software:
    • RTSCAN RTWG01Config Tool V1.1

    Firstly, use Config Tool V2.3.12_JF to set up RTX200 parameters, then connect the RTX200 with the RTWG01 converter, and configure the RTWG01 by RTSCAN RTWG01 Config Tool V1.1.

    C. RTX200 Scanner Settings

    The RTX200 needs to be set up to TTL output, baud rate 9600, 8 n 1; output mode: direct output, decoded data output to TTL directly.

    1. Select Product Model

    Run the Config Tool V2.3.12_JF, select: TX

    Click next

    2. Set Working Mode

    Set work mode to ordinary

    • Output TTL
    • Serial port setting
    • Baud rate:9600
    • Data Bit:8
    • Check Digit: NONE
    • Stop Bit:1

    3 Setting the output format

    Select Output format->Direct in the “Advanced” option

    4. Save Configuration

    Click config code to generate the configuration QR code, use the device to scan the QR code to complete the configuration

    D. RTWG01 converter settings

    RTWG01 default baud rate 9600, the output mode is the digital string to digital output, Wiegand format for automatic recognition, interception function off

    1.Set output format

    Select “Digital char turn Hex” output format

    After scanning the barcode, “Digital char turn Hex” converts the digital string to digital output.

    For example: scan a barcode “987654321”, and the access controller will also get data”987654321”.

    2. Set the Wiegand format

    Set the Wiegand format “auto”

    Set to auto mode, automatically output the corresponding format Wiegand signal according to the input content length.

    • 0-16777216 output Wiegand 26 signal
    • 16777216-4294967296 output Wiegand 34 signal
    • 429496729-18446744073709551616 output Wiegand 66 signal

    3. Save Configuration

    Connect RTWG01 with RTX200 scanner, use the scanner to read the configuration code generated by the RTWG01 config Tool.

    E. Installation and Setting of Access Control System Software

    1. installation AccessControlV7.61en

    This software comes with RTscan’s access controller board, if you want, please contact the RTscan sales team to get the controller and the software. But you can also use your own access control software & system.

    2.Run and log in to the Access Control System

    Login Control Software

    Default User Name: abc, password 123

    3. Add Access Controller device

    Click “1. add C controllers by Searching” scan to add a master controller board inside the LAN

    Or click on the Configuration>Controllers ->Search to scan the control access controller in your LAN

    4. Modify file controller IP

    Select the scanned controller, right-click to select “Configure” to configure the device IP address. You can also specify the device address in the router DHCP server.

    Click “Add Found To Database” Add Device

    5. Add Person and Card Number

    Choose Configuration ->Personnel->Auto Add Add Person

    Select the device to enter the door card and Click next

    Add card number to the list by reading the barcode or NFC card

    Click OK to enter these card numbers

     

    You can also manually enter user information by: Configuration ->Personnel->Add manually

     

    6. Access permissions

    Click Configuration ->Access Privilege->Change Privileges to assign permissions to users

     

    Click on > and >> to add users and access control

     

    Click Allow And Download to save the card number to the control panel

    7. Real-time monitoring

    Click Operation ->Real-Time Monitoring

    Read NFC card or scan bar code to control switch on/off of the access

     

    F. Intercepting data to output Wiegand signal to access controller

    More often, the bar code data or NFC card data exceeds the Wiegand length or contains other non-numeric characters. In these kinds of applications, we need to make the scanner intercept and only pick up the data we want, and then output to the Wiegand signal.

    For example: If a barcode contains information “mobile:11223344, emailuser@rtscan.net “, and we need to intercept the 11223344 only to output via Wiegand interface to the access controller, then we do like this:

    Run and Setup intercept function in RTWG01Config Tool

    The start bit is the starting position, the length is the intercept length, for the above example: “mobile:11223344,emailuser@rtscan.net”, to intercepts 11223344, we setup:

    “mobile:” length 6 byte and number “1” begin from the 7th

    “11223344: “8 bytes long

    So set to intercept 8 characters from bit 7

    When the length is set to 0, the intercept length is all the remaining data.

    For example:

    If “6914068019529” and we want to intercept 068019529, it is set to:

     

    Notes

    You need to set the RTX200 scanner to TTL output of 9600 8-N-1,  then work with RTWG01.

     

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

    Thanks

    Ask A Sample To Test Now!


    Send

    Read More


    Product Upgraded Notice

     

    Upgraded scanner model: RT206 2D barcode scanner engine.

     

    General modification description: The decoded chip has been upgraded to a new version which has a faster decoding speed; This chip also more stable in terms of product supply.

    To delete the Hanxin code, the product version has been upgraded to version 4.0.

    Modification details listed as following :

     

    1, Hardware modification: the decoded chip has been upgraded to a new version that has a much faster-decoding speed, besides it has lower power consumption, and it responds faster when it is turned on. The PCB layout has been modified as shown below.

     

    Item Old version V3.0 New version V4.0
     

     

    PCB layout modification

     

    2, Specification modifications :

     

    Item Old version V3.0 New version V4.0
    Decode capability PDF417, Data Matrix, QR code, Hanxin code, and most 1D & 2D barcodes Delete Hanxin code which is not used, others are the same
     

     

    Operation Current

     

    Current@3.3VDC Operating 131mA (typical)

    171mA (max.) Standby 8.2mA Sleep ≤10uA

     

    Current@3.3VDC Operating 100mA (typical)

    168mA (max.) Standby 8.1mA Sleep ≤100uA

    Serial mode Response time Awake time from deep low consumption: 131ms Turn on time from power off to power on 211ms Awake time from deep low consumption: 106ms Turn on time from power off to power on 206ms
     

    USB mode Response time

     

    Awake time from deep low consumption: 203ms Turn on time from power off to power on 287ms

     

    Awake time from deep low consumption: 117ms Turn on time from power off to power on 206ms

     

    3, Software modification description :

     

    After upgrading, it does not support reading Hanxin code.

    The default maximum length of the QR code has been changed to 6144.

     

    EAN-8 includes 2/5 digit extra code’s AIMID has been changed from “]E4…]E1..”/“]E4…]E 2..” to “]E4”.

     

     

    Conclusion remark:

    All the other parts including the installation screw holes, dimensions,

    configuration codes, barcode decoding, protocol commands, etc are completely the same as the old V3.0 version.

     

    Upgrade Effective date: 20th Oct. 2020

     

    Any technical questions, kindly contact our support team at support@rtscan.net.

     



     

    When we choose a 2d QR barcode scanner for transportation like metro and bus station, usually we would consider:

    – Ensure passengers can scan their barcode and go through quickly, especially when the flow of people is large, and avoid long queues.

    For this:

    1. The scanning speed must be fast enough.
    2. when users show their bar codes from different angles, from different distances, make sure the bar code can be read every time.
    3. when the bar code is shown in the user’s phone screen, the size of the phone screens would be various, and we need to make sure the barcode scanner can read the barcode from all of those different sizes of mobile phone screens.

    – Avoid failures as much as possible, reduce the cost of subsequent maintenance to the greatest extent, and facilitate maintenance.

    Consider these challenges, RTscan recently launched a new product RT820. This RT820 is a fast 2d and QR barcode scanner, which is specially designed for the Metro, train, and bus ticketing system.

    embedded / fixed ount design
    Metro station QR code ticketing system

     

    This RT820 is outstanding in:

    Large scanning window and excellent Bar Code Reading Performance

    With 70cm*50cm large scanning window, the bar code can be easily enter into the visible area of the scanner, so that the scanner can capture and read the code easily. In addition, whatever with a small size screen or big size screen, the scanner can read the code from the phone easily.

    Scan 2d QR and bar codes from 360 degree as you want, 90ms per scan, reading distance from 0cm to 11cm.

    Durable and flexible design for easy installation and disassemble

    IP66 industrial level, water-proof and dust-proof, use quick installation buckle on both sides, no screws required.

    Easy to install and disassemble.

    IP66 water / dust proof

     

    robust design
    Easy to be installed / fixed

    For full detailed information of this new product, please read:

    https://www.rtscan.net/Code-Readers/bus-metro-station-2d-barcode-scanner-rt820/

     

     

     

    Read More


    Presently, more and more access control system begins to mix bar code reading and NFC reading together. What’s more, wireless data transfer becomes a trend for access control.

    In order to meet these different requirements of our clients and different projects, RTscan recently launched a new product RTX200: NFC barcode Reader with Wifi interface.   

    This RTX200 serial aims to this kind of application and the trend. It can read 1d and 2d QR bar code, but optionally, and also read the NFC card, which makes it as a two-in-one terminal.

    Except for the USB (USB-HID) interface and RS232 interface, the RTX200 also supports Wi-Fi communication.

    For RTX200, we launched three models, RTX200-A External embedded version, RTX200-B internal embedded version, and RTX200-C on-counter version, suitable for different occasions and applications.

    RTX200-A: use quick installation buckle on both sides, no screws required. Easy to be installed.

    RTX200-B: tighten the nut from the back through the hole inside diameter, or crew the column directly through the scanner to fix the round hole internal diameter.

    RTX200-C: simple desktop type, easy to be used with bracket (optional).

    Application:

    Cinema self-service ticketing machine

    Car parking self-service payment machine

    Queuing machine

    hour unmanned shop

    Visitor turnstile

    Intelligent guidance machine in hospital

    Refuse machine

    Video Demo:

    For full detailed information of this new product, please read:

    Read More


    Presently, more and more access control system begins to combine bar code reading and NFC reading together, while traditionally, the Wiegand interface is widely used for the access control system. But at the same time, wireless or Ethernet data transfer becomes a trend and would be more and more popular for access control data transfer, because wireless or Ethernet is somehow more convenient, easy to install, supports remote control, and also it would be more cost-effective.

    In order to meet these different requirements of our clients and different projects, RTscan recently launched a new product RTMU86.   

    This RT-MU86 aims to meet this market requirement and the trend, it supports either Wiegand interface or Ethernet, read both bar codes and NFC.

    It’s an ideal choice for current and future all kinds of access control projects.

    This RT-MU86 is outstanding in:

    1. Capable to read both bar code and NFC card

    The RT-MU86 can read 1d code, 2d and QR bar code, and NFC card. This makes it a two-in-one terminal.

    2. Support Ethernet or Wiegand (optional)

    Except for the USB (USB-HID) interface and RS232 interface, the RT-MU86 also supports Wiegand and Ethernet communication. It’s a Wiegand barcode Scanner and also an ethernet barcode scanner.

    3.Built-in relay

    With a Built-in relay and 12V-24V wide voltage input, the RTMU86 can connect to the access control system directly, and no need for Voltage conversion equipment.

    4.Holder design for easy installation

    Just fix the holder in the wall via 2 screws, then fix the reader in the holder and lock it by the screw from the bottom, done.

    Application:

    Can be widely used for all kinds of access control applications.

    Office visitors access control

    Building access control

    Factory  access control

    Museum

    Tourist sites

    School

    Video Demo:

     

    For full detailed information of this new product, please read:

    https://www.rtscan.net/Code-Readers/wiegand-and-ethernet-barcode-scanner/
    Read More


    QR Code scanner for Arduino: Use 2d and QR barcode scanner with Arduino microcontroller (MCU)

    If you are using Arduino MCU (microcontroller) to develop your system, and need a 1D/ 2D QR barcode scanner to work with it, then this article would be helpful for you. Here we introduce how we connect the Arduino Uno micro-controller with RTscan QR barcode scanners, and how to make them work with each other.

    When we try to integrate a QR barcode scanner with the Arduino microcontroller board, we would meet these problems:

    1. The QR barcode scanner normally goes with a USB cable and RS232 cable, but Arduino board without this type of connector, then how can we connect them together?
    2. Whatever QR barcode scanners we choose, how can we control the barcode scanner by Arduino and also upload decoded data to the Ardunio system?

    Read below and find how RTscan provides solutions for the above questions.

    Contents

    Part I: Introduction of Arduino UNO and RTscan QR barcode scanner

    Part II: Connection solutions

    • Solution 1: Connect via UART/ 12PIN TTL-232
    • Solution 2: Connect via USB interface

    Part III: Sample code/ Control the QR barcode scanner via Arduino system

    • TTL-232 Communication
    • USB CDC Communication
    • USB-HID Communication

    Part VI: Video Demo


     

    Part I:  Introduction of Arduino UNO and RTscan QR barcode scanner

    Arduino UNO: The UNO is the most used and documented board of the whole Arduino microcontrollers family, many people choose this model for their projects. Arduino Uno has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller.

    And for our application to connect with the QR barcode scanner, we need the 3.3V (or the 5.0v) power supply pin, and GND pin, RXD, TXD pins.

    Arduino UNO:

    Arduino UNO Pinout

    RTscan QR barcode scanners:

     

    In this article, we choose RT870 and RT830C as examples to introduce our solutions.

     

     

    Part II: Connection solutions:

    Solution 1: Connect the QR barcode scanner via a 12pins flat cable (TTL-232 signal) interface ( for RT830C): 

    RTscan developed a multi-interface Shield, connect the shield with Arduino UNO, then connect the RT830C via a 12pins flat cable:

     
     

    Solution 2: Connect the QR barcode scanner via a 4 pins UART (RS232 signal) interface ( for RT830C): 

    Use the multi-interface Shield, connect the shield with Arduino UNO, then connect the RT830C via a 4pins cable. The RT830C comes out RS232 signal to the shield, and the shield converts it to TTL-232 signal and transmits to Arduino board.

     

    Note: to learn more about RT830C, please view:   https://www.rtscan.net/Code-Readers/fixed-mount-embedded-kiosk-barcode-scanner-rt830c/

     

    Solution 3: Connect the 2D QR barcode scanner via USB interface ( for RT870)

    The RT830C without its own glass window, if you prefer an embedded barcode scanner with its own glass window, then you can choose our RT870 and use this solution: use an Arduino USB host shield as shown below.

     

     

    Part III: Sample code/ Control the QR barcode scanner via Arduino system

    We developed sample code to work with our scanners so that you can copy our source codes and program your system very quickly and no need to write the whole code one by one; save your time and speed up your integration work!

    1. TTL-232 Communication (compatible with above solution 1 and solution 2)

    Step 1: Hardware connection

    Follow above solution 1 or solution 2 to connect the RT830C with Arduino Uno.

     

    Step 2: RT830C barcode scanner settings

    RT830C needs to be set up with 232 output, scan the following barcode
    Set to 232 Mode, the default baud rate is 115200, 8-n-1

    Scan the below code to set the baud rate to 9600:

    For more details, please refer to the full user manual.

     

    Step 3: Run the sample code

    Upload the below sample code rt830c_test_demo.ino to Arduino UNO.

     
     /* RT830c Test demo by RTSCAN 20200903 */ #include &quot;SoftwareSerial.h&quot; SoftwareSerial mySerial(2, 3); // RX, TX   void printHex(char *p, int len) {   char tmp[5];   for (int i = 0; i  lt; len; i++)   {     sprintf(tmp, &quot;%02x &quot;, p[i]);     Serial.print(tmp);   }   Serial.println(); }   bool check_response(unsigned long timeout, String response) {   char c;   String buffer;   bool found = false;   unsigned long t = millis();     while (millis() - t  lt; timeout)   {     if (mySerial.available()  gt; 0)     {       c = mySerial.read();       buffer += c;       if (buffer.indexOf(response) != -1 || buffer.equals(response))       {         found = true;         break;       }     }   }     while (mySerial.available()  gt; 0)   {     c = mySerial.read();     buffer += c;   }     Serial.println(buffer);   printHex(buffer.c_str(), buffer.length());     return found; }   void send_cmd(char *p) {   mySerial.print(p);   check_response(100, p + 3); }   void factory_defaults() {    ... Please contact us to get full sample codes: sales@rtscan.net 
     

     

     

    And the RT830c automatically detects and reads bar codes.

     


    Introduction of the serial port commands protocol for RT830c

     

    Command example: if we want to set the unit default, the command data as below

     

    2.USB CDC Communication (compatible with above solution 3 )

    In this solution, the scanner is set to USB Com port emulation mode, and the Arduino recognizes the scanner via the USB host shield.

     

    Step 1: Hardware connection

    Connect the RT870 scanner to the USB port of the Arduino USB host shield through a USB data cable.

     

    Step 2: RT870 settings

    RT870 set to USB CDC mode, scan the following Setting bar code

    Firstly, Set to USB cable

    Then, Set to USB-CDC mode

    *Recognized as USB com port device on the computer.

     

    Step 3:Include the library

     

    Arduino Library Manager

    First, install Arduino IDE version 1.6.2 or newer, then simply use the Arduino Library Manager to install the library.

    Please see the following page for instructions:

    http://www.arduino.cc/en/Guide/Libraries#toc3

    Manual installation

    First download the library by clicking on the following link:

    https://github.com/felis/USB_Host_Shield_2.0

    Then uncompress the zip folder and rename the directory to “USB_Host_Shield_20”, as any special characters are not supported by the Arduino IDE.

    Now open up the Arduino IDE and open “File>Preferences”. There you will see the location of your sketchbook. Open that directory and create a directory called “libraries” inside that directory. Now move the “USB_Host_Shield_20” directory to the “libraries” directory.

    The final structure should look like this:

    • Arduino/
      • libraries/
        • USB_Host_Shield_20/

    Now quit the Arduino IDE and reopen it.

    Now you should be able to open all the examples codes by navigating to “File>Examples>USB_Host_Shield_20”, and then select the example.

    For more information please visit the following sites:

    http://arduino.cc/en/Guide/Libraries

    https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use.

     

    Step 4: Run the sample code

    Run: acm_terminal. ino

     #include  &quot;cdcacm.h&quot; #include  &quot;usbhub.h&quot;  #include &quot;pgmstrings.h&quot;   // Satisfy the IDE, which needs to see the include statment in the ino too. #ifdef dobogusinclude #include  &quot;spi4teensy3.h&quot;&amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;gt;#endif #include  &quot;SPI.h&quot;&amp;amp;amp;amp;amp;amp;lt;br /&amp;amp;amp;amp;amp;amp;gt;  class ACMAsyncOper : public CDCAsyncOper { public:     uint8_t OnInit(ACM *pacm); };   uint8_t ACMAsyncOper::OnInit(ACM *pacm) {     uint8_t rcode;     // Set DTR = 1 RTS=1     rcode = pacm- gt;SetControlLineState(3);       if (rcode)     {         ErrorMessage lt;uint8_t gt;(PSTR(&quot;SetControlLineState&quot;), rcode);         return rcode;     }       LINE_CODING lc;     lc.dwDTERate = 115200;     lc.bCharFormat = 0;     lc.bParityType = 0;     lc.bDataBits = 8;       rcode = pacm- gt;SetLineCoding( lc);       if (rcode)         ErrorMessage lt;uint8_t gt;(PSTR(&quot;SetLineCoding&quot;), rcode);       return rcode; }   USB     Usb; //USBHub     Hub( Usb); ACMAsyncOper  AsyncOper; ACM           Acm( Usb,  AsyncOper);   void setup() {   Serial.begin( 115200 ); #if !defined(__MIPSEL__)   while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection #endif   Serial.println(&quot;Start&quot;);   Serial.println(&quot;Please set the scanner to USB CDC mode&quot;);     if (Usb.Init() == -1)       Serial.println(&quot;OSCOKIRQ failed to assert&quot;);     delay( 200 ); } ... Please contact us to get full sample codes: sales@rtscan.net 

     

    Open the serial port for debugging

    Scan any barcode and it will be shown as below:

     

    3.USB-HIDCommunication

    In this solution, the scanner is set to USB HID KBW mode. The Arduino recognizes the scanner via the USB host shield.

    Step 1: Hardware connection

    Connect the RT870 scanner to the USB port of the Arduino USB host shield through a USB data cable.

    Step 2: RT870 settings

    RT870 set to USB-HID mode, scan the following Setting bar code

    Set to the USB output

    Set to USB-HID mode

    *Recognized as HID Keyboard Device on the computer.

     

    Step 3: Include the library

    Arduino Library Manager

    First, install Arduino IDE version 1.6.2 or newer, then simply use the Arduino Library Manager to install the library.

    Please see the following page for instructions:

    http://www.arduino.cc/en/Guide/Libraries#toc3

    Manual installation

    First download the library by clicking on the following link:

    https://github.com/felis/USB_Host_Shield_2.0

    Then uncompress the zip folder and rename the directory to “USB_Host_Shield_20”, as any special characters are not supported by the Arduino IDE.

    Now open up the Arduino IDE and open “File>Preferences”. There you will see the location of your sketchbook. Open that directory and create a directory called “libraries” inside that directory. Now move the “USB_Host_Shield_20” directory to the “libraries” directory.

    The final structure should look like this:

    • Arduino/
      • libraries/
        • USB_Host_Shield_20/

    Now quit the Arduino IDE and reopen it.

    Now you should be able to open all the examples codes by navigating to “File>Examples>USB_Host_Shield_20”, and then select the example.

    For more information please visit the following sites: 

    http://arduino.cc/en/Guide/Libraries 

    https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use.

     

    Step 4: Run the sample code

    Run:

    Scanner_USBHIDUniversalKbd. ino

    #include  lt;hidboot.h gt;
    #include  lt;usbhid.h gt;
    #include  lt;hiduniversal.h gt;
     
    #include  lt;SPI.h gt;
     
    class KbdRptParser : public KeyboardReportParser
    {
      public:
        void PrintKey(uint8_t mod, uint8_t key);
     
        bool isScanEnd();
        void PrintScanCode();
     
      protected:
        void OnControlKeysChanged(uint8_t before, uint8_t after);
     
        void OnKeyDown  (uint8_t mod, uint8_t key);
        void OnKeyUp    (uint8_t mod, uint8_t key);
        void OnKeyPressed(uint8_t key);
     
        String ScanCode = &quot;&quot;;
        uint32_t FreeTime = 0;
        bool StartScan = false;
    };
     
    void KbdRptParser::PrintKey(uint8_t m, uint8_t key)
    {
      MODIFIERKEYS mod;
      *((uint8_t*) mod) = m;
      Serial.print((mod.bmLeftCtrl   == 1) ? &quot;C&quot; : &quot; &quot;);
      Serial.print((mod.bmLeftShift  == 1) ? &quot;S&quot; : &quot; &quot;);
      ...
    
    Please contact us to get full sample codes: sales@rtscan.net
    

     

    Open the serial port for debugging

    Scan any barcode and it will be shown as below:

     

    Part VI: Video Demo

    Please refer to the following video for specific operations:

     

    If you need an OEM barcode scanner module for Arduino, please read: 

    Arduino Barcode Scanner

    If you need an OEM barcode scanner for Raspberry Pi, please read:

    Raspberry Pi Barcode Scanner

    If you need an Embedded barcode scanner for Raspberry Pi, please read:

    Embedded barcode scanner for Raspberry Pi

    Read More


    If you are using Raspberry Pi microcontroller / single-board computer to develop your system, and at the same time, you need a 1d/ 2d embedded barcode scanner to work with it, then this article would be helpful for you:

    Here we introduce how we connect the Raspberry Pi 3 Model B+ micro-controller with RTscan embedded barcode scanner and how to make them work with each other.

    When we try to integrate an embedded barcode scanner with the Raspberry Pi microcontroller board, but we would meet these problems:

    1. How can we connect the embedded barcode scanner with the Raspberry Pi board together?
    2. When we choose an embedded barcode scanner, how can we control the barcode scanner by Raspberry Pi, meanwhile, how to upload decoded data to the Raspberry Pi system?

    Read below and find how RTscan provides solutions for above questions.

    Contents

     

    Part I: Introduction of Raspberry Pi 3 model B+ and RTscan embedded barcode scanner

    Part II: Connection solutions

    • Solution 1: Connect via Dupont interface
    • Solution 2: Connect via USB interface

    Part III: Python Sample code/ Make the embedded barcode scanner work with Raspberry Pi system:

    • TTL-232 Communication& Python Sample code
    • USB CDC Communication
    • USB-HID

    Part VI: Video Demo

     

    Part I: Introduction of Raspberry Pi 3 model B+ and RTscan embedded barcode scanners

    Raspberry Pi 3B+:

    Raspberry Pi 3 Model B is the latest iteration of the most popular single-board computer. It provides a quad-core 64-bit ARM Cortex-A53 CPU running at 1.2GHz, four USB 2.0 ports, wired and wireless networking, HDMI and composite video output, and a 40-pin GPIO connector for physical interfacing projects.

     

    Raspberry Pi 3 Pinout

    And for our application to connect with embedded barcode scanners, we need the 3.3V (or the 5.0v) power supply pin, and GND pin, RXD, TXD pins.

    And also, we will demo how to connect our embedded barcode scanners: with raspberry Pi via USB interface.

    RTscan embedded barcode scanners:

    In this article, we just choose RT870 as an example to do the connection and integration, all the above listed models like RT830C, RT234 and RT231 etc are also ideal for connection with Raspberry Pi for different applications.

    RT870 has RJ45 and micro USB output.

    Part II: Connection solutions:

    RTscan provides two types of solutions:

    • Solution1: Dupont interface 

    RTscan provides the following DuPont interface to connect the embedded barcode scanner with Raspberry Pi:

    This is a simple solution, just connect the 5.0V power supply (the EVK needs 5.0v power supply), GND, RX, and TX pins.

     

    RT870 RJ45 Pinout

     

    PIN Connection:

    RT870Raspberry Pi 3B+
    Pin4 VDD5V(Pin2 / Pin4)
    Pin8 GNDGND(Pin6)
    Pin6 RXTx(Pin8)
    Pin7 TXRx(Pin10)

    Solution 2: Connect via USB interface

    For Raspberry Pi, if you prefer to connect the embedded barcode scanner via USB interface, it also is fine, setup RTscan’s barcode scanner to HID mode (work directly) or USB CDC/Virtual Com mode (follow Part III/USB CDC communication).

     

     

    Part III: Python Sample code/ Make the embedded barcode scanner work with Raspberry Pi system:

     

    We developed Python sample code to work with our scanners so that you can copy our source codes and program your system very quickly and no need to write the whole code one by one; save your time and speed up your integration work!

    In this article, we choose the RT870 as an example to do the programming. Below we show how they work together when they connect via TTL-232, USB-CDC, and USB-HID.

     

     

    TTL-232 Communication& Python Sample Code

     

    Step 1: Hardware connection

    Connect the 5.0v power supply pin, and GND pin, RXD, TXD pins via Dupont cable.

    RaspberryRT870
    TX(GPIO14)(PIN8)RX
    RX(GPIO15)(PIN10)TX
    5VPOWER
    GNDGROUND

     

    Step 2: RT870 settings

    RT870 needs to be set up with RS232 mode, scan the following barcode
    Set to RS232 Mode, the default baud rate is 115200, 8-n-1

    For more details, please refer to “User-Manual-RT830A-RT870-RT860_V1.2.3”

     

     

    Step 3: Raspberry Pi Settings

    Use serial port 0 in Raspberry Pi,

    /dev/ttyS0

    More settings would be required to enable Raspberry Pi serial0, please see below (If you already opened it, then ignore this):

    1.Enable serial port ttyS0

    Open the serial port/dev/ttyS0 
    Via command window, input:
    sudo rasp-config

    2.Open the system configuration interface as shown below, select Interfacing Options

    Then select serial:

    Select No:

    Choose Yes:

    Finally, save and exit.

    Now, please enter the following command, check the serial port ttyS0:
    ls -la /dev/
    But, if it still cannot be used, please double-check and re-configure it.

    3. Close the Console

    In the terminal, input:

    sudo systemctl stop serial-getty@ttyS0.service
    sudo systemctl disable serial-getty@ttyS0.service

    Then, restart

    And input:

    sudo systemctl mask serial-getty@ttyS0.service

    Now it works!

    4. Modify Raspberry Pi CPU frequency (optional, you would no need to do this)

    After the above steps 1 and 2, the settings are theoretically completed. But some times:

    (1)After sending a string via serial port, in most cases the receiver shows up garbled data.

    (2) When the serial port receives data, if it appear data like: **\xe8 \xe9**

    This would be caused by the wrong working frequency of the Raspberry Pi, information link:
    Raspberry Pi 3 login via UART on GPIO Baud Rates broken

    The modification method is described as below:

    sudo vim /boot/config.txt

    Find out whether the sentence core_freq=250 is enabled. If not, remove the # number in front of this sentence, or add core_freq=250 at the boot/config.txt, done.

     

     

    Step 4: Run the Python sample code

    Run: RT870_TTL_RS232.py

    #RT870 python test demo
    #ttl-232 readme
    #by RTSCAN 20200901
    &amp;nbsp;
    &amp;nbsp;
    import sys
    import serial
    import time
    &amp;nbsp;
    #default usb device /dev/ttyS0 115200 8n1
    ser = serial.Serial(&quot;/dev/ttyS0&quot;,115200,timeout=0.5)
    &amp;nbsp;
    print('serial test start ...')
    if ser != None:
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('serial ready...')
    else:
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('serial not ready')
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.exit()
    &amp;nbsp;
    ...
    
    Please contact us to get full sample codes: sales@rtscan.net
    

     

    And the RT870 automatically detects and reads bar code.

    Output:

     

    Introduction of commands protocol for RT870

    Example:

    Response: 30 44 30 31 30 30 06 2e

    For more details, please refer to 《Programming_Commands_Guide(RT203-RT830).pdf》

     

     

    USB CDC Communication

    If we want to use the USB port and make it work as a virtual serial port, set up the RT870 to USB Com port emulation mode. And the RT870 scanner will be detected as a COM device in Raspberry Pi.

     

    Step 1: Hardware connection

    Connect RT870 to the USB port of Raspberry Pi through a data cable

    Step 2: RT870 Settings

    RT870 set to USB CDC mode, please scan the following Setting bar code

    Set to USB output

    Set to USB CDC mode

     

    Step 3: Raspberry Pi Settings

    The RT870 USB CDC mode is the USB Com port emulation mode, the device name usually is:

    /dev/ttyACM0

     

     

    Step 4: Run the Python sample code

    Run:  python RT870_USB_CDC.py

    #RT870 python test demo
    #USB-CDC readme
    #by RTSCAN 20200901
    &amp;nbsp;
    &amp;nbsp;
    import sys
    import serial
    import time
    &amp;nbsp;
    #default usb device /dev/ttyS0 115200 8n1
    ser = serial.Serial(&quot;/dev/ttyACM0&quot;,115200,timeout=0.5)
    &amp;nbsp;
    print('serial test start ...')
    if ser != None:
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('serial ready...')
    else:
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('serial not ready')
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.exit()
    &amp;nbsp;
    ser.timerout=1 #read time out
    ser.writeTimeout = 0.5 #write time out.
    &amp;nbsp;
    def printHex(str):
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for i in str:
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print('0x%02x'%ord(i)),
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(&quot;&quot;)
    &amp;nbsp;
    def send_cmd(str):
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ser.write(str)
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;time.sleep(0.2)
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;t = ser.read(ser.in_waiting)
    &amp;nbsp;&amp;nbsp;&amp;nbsp;...
    
    Please contact us to get full sample codes: sales@rtscan.net
    

     

    Output:

     

     

    USB-HID

    If you prefer to connect the embedded barcode scanner via USB Keyboard simulation, it also is fine, setup RTscan’s barcode scanner to HID mode:

    Then open “Text editor” from Raspberry Pi software, now run the bar code scanning, the decoded data will show up directly.

    The above python sample code can be used for other embedded barcode scanners, e.g: RT830B.  But we can provide sample code for most of our embedded scanners, if you want to learn more about them, please view the links below: 

    https://www.rtscan.net/barcode-readers/fixed-mount-barcode-readers/

    Part VI: Video Demo

    You can also refer to the following video demo, to see how the embedded barcode scanner work with Raspberry Pi:

     

     

    If you need an barcode scanner module/ engine for Arduino, please read: 

    Arduino Barcode Scanner

    If you need an OEM barcode scanner for Raspberry Pi, please read:

    Raspberry Pi Barcode Scanner

     

    Read More




    16th-March-2020

    Dear All Customers,

    So far, our production has fully recovered, and almost all of our supplies are also fully recovered, includes all of our shipping forwarders. So all of the delivery and lead time recover to normal time.

    At the same time, in order to help our customers to protect themselves from the Corona-virus, our company decided to send masks free of charge to some of our customers. All masks will be purchased from the regular pharmacies in China to ensure the quality of masks.

    Please apply to our sales department if you need masks. We will arrange to send to you as soon as possible.

    Read More


    Dear Customers,

    As the government policy for resisting Corona-virus, most of the companies are partly return to work or still stop out until the government gives permission; and the logistics companies are also partly return to work. So product delivery would be some days’ delay.

    RTscan sales team and technical support team has returned to work, we will keep in touch with you and do our best to support you in this period.

    We are sorry for any inconvenience caused. It’s much appreciated for your understanding and we will do best to arrange production & shipping as soon as the condition permits.

    RTscan technoligy Limited

    12th-Feb.2020

    Read More




    Image ID Scanner, SDK for OCR-B and Bar Codes: IDE200

    The IDE200 captures the full-color image and also ultraviolet (UV) and infrared (IR) images of the ID card or driver’s license. At the same time, it supports Optical Character Recognition (OCR) for the machine-readable zone (MRZ) which is ICAO9303 compliant, and also supports PDF417 and QR bar codes reading.

    With special design, it’s suitable for both desktop/ on-counter use and kiosk embedded use.

     


     

    Handheld OCR and Barcode Reader: IDE302

    The IDE302 is a handheld OCR & MRZ reader and barcode reader, it can read OCR-B MRZ ( Machine Readable Zone) from ID card, driver’s license, passport, or read 1d and 2d big size PDF417 code from ID card or driver’s license.


     

     

    Fixed Mount Document Reader: Read MRZ/ PDF417 of ID Card and Passport: IDE237

    The IDE237 is a fixed mount document reader for ID card and passport, it can read OCR-B MRZ ( Machine Readable Zone ) from ID card, driver’s license, or read those big size PDF417 code from ID card or driver’s license. With fixed mount design, it’s suitable for kiosk & self-service terminals embedded use. (If you need a handheld document reader, you can use our IDE302)

     


     

     

    Mobile Wireless MRZ reader / OCR-B reader for Passport, ID cards, Driver’s license: IDE101

    The IDE101 is a mobile wireless MRZ reader for passport/ ID card and driver’s license, it can read OCR-B MRZ ( machine readable zone) data— the ICAO 9303 compliant ID documents such as ID card, passport, visa, driver’s license.The MRZ usually includes information like nationality, name, birthday, document expiry date, ID numbers. By using the IDE101, we can get these personal data quickly and accurately so as to highly speed up the personal data collection. And finally, the scanned data can be store “locally” in the scanner, or can be transfer to a PC/ Tablet/ mobile phone via Bluetooth communication.               Learn More About IDE101

     

    Contact Us Now!



    Send

    Read More


    Raspberry Pi barcode scanner: connect OEM barcode scanners modules with Raspberry Pi microcontroller (MCU)

    If you are using Raspberry Pi microcontroller / single-board computer to develop your system and need a 1d/ 2d OEM barcode scanner module at the same time, then this article would be helpful for you: here we introduce how we connect the Raspberry Pi 3 Model B+ micro-controller with RTscan OEM barcode scanner modules and how to make them work each other.

    When we try to integrate an OEM barcode scanner with the Raspberry Pi microcontroller board, we would meet these problems:

    1. The OEM barcode scanner module with 12pins TTL interface, but Raspberry Pi board without this type of connector, then how can we connect them together?
    2. Whatever the OEM barcode scanner module we choose, how can we make the barcode scanner to work with Raspberry Pi and also upload decoded data to the Raspberry Pi system?

    Read below and find how RTscan provides solutions for the above questions.

    Part I: Introduction of Raspberry Pi 3 Model B+ and RTscan OEM barcode scanners

    Raspberry Pi 3B+:

    Raspberry Pi 3 Model B is the latest iteration of the most popular single-board computer. It provides a quad-core 64-bit ARM Cortex-A53 CPU running at 1.2GHz, four USB 2.0 ports, wired and wireless networking, HDMI and composite video output, and a 40-pin GPIO connector for physical interfacing projects.

    Raspberry Pi 3 Pinout

    And for our application to connect with the OEM barcode scanner module, we need the 3.3V (or the 5.0v) power supply pin, and GND pin, RXD, TXD pins.

    And also, we will demo how to connect our OEM barcode scanner with Raspberry Pi via the USB interface.

    RTscan OEM barcode scanners:

     

    They all with 12pins connector and TTL-232 signal, and use FFC cable and connector like this :

    And if we use an EVK board, they can come out with a USB interface:

    In this article, we choose RT214 as an example to do the connection and integration.

     

    Part II: Connection solutions:

    RTscan provides two types of solutions:

    Solution1: Dupont interface

    RTscan provides the following DuPont interface EVK kit (with trigger button and buzzer) to connect the OEM barcode scanner module with Raspberry Pi:

    This is a simple solution, just connect the 5.0V power supply (the EVK needs a 5.0v power supply), GND, RX, and TX pins.

     

    RT214-12pins Pinout

    PIN# Signal Name I/O State Function
    1 NC
    2 VDD 3.3V power input
    3 GND Power-supply ground
    4 RXD I TTL level 232 receives data
    5 TXD O TTL level 232 transmits data
    6 USB_D- USB_D- signal
    7 USB_D+ USB_D+ signal
    8 NC
    9 BUZ O Beeper output
    10 LED O Good Read LED output
    11 nRST I Reset signal input
    12 nTRIG I Trigger signal input

    After connecting with the EVK board, it comes out 6pins:

     

    PIN Connection:

    PIN# Signal Name I/O State Function
    1 GND Ground Power-supply ground
    2 RXD I/O TTL level 232 receive
    3 TXD I/O TTL level 232 transmits
    4 USB_D+ I/O USB_D+ signal
    5 USB_D- I/O USB_D- signal
    6 VBUS Power-supply 5V

    PIN Connection:

    RT203/RT206/RT207/RT208/RT211/RT214/ RT830B+EVK board 6pins out Raspberry Pi 3B+
    Pin6 Vin 5V(Pin2)
    Pin1 GND GND(Pin6)
    Pin2 RX Tx(Pin8)
    Pin3 TX Rx(Pin10)

     

    ♠ OEM Scanner Modules that compliant with this solution:

    RT203 RT206 RT207 RT208 RT212 RT211 RT214

    ∗please click the model number to view the full product introduction page.

    Solution 2: Connect via USB interface

    For Raspberry Pi, if you prefer to connect the OEM barcode scanner module via USB interface, it also is fine, setup RTscan’s barcode scanner to HID mode (work directly) or USB CDC/Virtual Com mode (follow Part III/USB CDC communication).

     

    ♠ Barcode Scanner Modules that compliant with this solution:

    All barcode scanners that have a USB interface.  All OEM scanner modules, all fixed-mount types, all handheld types. 

     

    Part III:

    Make the OEM barcode scanner module work with Raspberry Pi system/ Python Sample code:

    We developed Python sample code to work with our scanners so that you can copy our source codes and program your system very quickly and no need to write the whole code one by one; save your time and speed up your integration work!

    In this article, we choose RT214 as an example to do the programming. Below we show how they work together when they connect via TTL-232, USB-CDC, and USB-HID.

    1. TTL-232 Communication& Python Sample Code

    Step 1: Hardware connection

    Connect the 5.0v power supply pin, and GND pin, RXD, TXD pins via Dupont cable. Please refer to the image in “Solution1: Dupont interface”

     

    RT214+EVK board 6pins out Raspberry Pi 3B+
    Pin6 Vin 5V(Pin2)
    Pin1 GND GND(Pin6)
    Pin2 RX Tx(Pin8)
    Pin3 TX Rx(Pin10)

     

    Step 2: RT214 settings

    RT214 scanner needs to be set to TTL-232 mode, scan the following barcode:

    For more setting codes, please refer to “RT214_User_Guide”.

     

    Step 3: Raspberry Pi Settings

    (Ignore if you already have done this.)

    (1).Enable serial port ttyS0

    Open the serial port/dev/ttyS0 
    Via the command window, input:
    sudo rasp-config

    Open the system configuration interface as shown below, select Interfacing Options

    Then select serial:

    Select No:

    Then Yes:

    Finally choose to save and exit.

     

    At this time, enter the following command to see the serial port ttyS0:
    ls -la /dev/
    But if it still cannot be used, please double-check and re-configure it.

     

    (2). Close the Console

    In the terminal, input:

    sudo systemctl stop serial-getty@ttyS0.service
    sudo systemctl disable serial-getty@ttyS0.service

    Then, restart.

    And then input:

    sudo systemctl mask serial-getty@ttyS0.service

    Then it works!

     

    (3). Modify Raspberry Pi CPU frequency (optional)

    After the above steps 1 and 2, the settings are theoretically completed, but some times:

    (1)After sending a string via serial port, in most cases the receiver shows up garbled data.

    (2)When the serial port receives data, it appears data like **\xe8 \xe9**

    This would be caused by the wrong working frequency of the Raspberry Pi, information link:
    Raspberry Pi 3 login via UART on GPIO Baud Rates broken

    The modification method is described as below:

    sudo vim /boot/config.txt

    Find out whether the sentence core_freq=250 is enabled. If not, remove the # number in front of this sentence, or add core_freq=250 at the boot/config.txt, done.

     

    Step 4: Run the Python sample code

    Run: RT214_TTL_RS232.py

    #!/usr/bin/python
    # -*- coding: utf-8 -*-
    
    # RT214 scaner python test demo
    #
    # by RTSCAN 20200901
    
    import sys
    import serial
    import time
    
    tel
    web
    # raspberry pi usb cdc
    # default usb device /dev/ttyACM0 115200 8n1
    # ser = serial.Serial("/dev/ttyACM0", 115200, timeout=0.5)
    
    # raspberry pi ttl
    ser = serial.Serial("/dev/ttyS0", 115200, timeout=0.5)
    
    #windows
    # ser = serial.Serial("COM45", 115200, timeout=0.5)
    
    
    print('serial test start ...')
    if ser != None:
        print('serial ready...')
    else:
        print('serial not ready')
        sys.exit()
    
    ser.timerout = 1  # read time out
    ser.writeTimeout = 0.5  # write time out.
    
    
    def printHex(_str):
        for i in _str:
            print('%02x' % i, end=" ")
        print("")
    
    
    # Command Syntax
    # 
    # Prefix Storage Tag SubTag {Data} [, SubTag {Data}] [; Tag SubTag {Data}] […] ;
    # Suffix Among which, {data} means integrant while [data] means optional data.
    # 
    # Prefix: “~<SOH>0000” (HEX: 7E 01 30 30 30 30), 6 characters.
    # StorageType: 
    #   “@” or “#”,1 character. 
    #   “@” means permanent setting which will not be lost by removing power from the scanner or rebooting it;
    #   “#” means temporary setting which will be lost by removing power from the scanner or rebooting it.
    # Tag: 
    #   A 3-character case-sensitive field that identifies the desired command group. 
    #   For example, the Tag for the Enable Code 11 is C11 (see Example 1 of Chapter 1).
    # SubTag: 
    #   A 3-character case-sensitive field that identifies the desired parameter within the tag group. 
    #   For example, the SubTag for the Enable Code 11 is ENA (see Example 1 of Chapter 1).
    # Data: 
    #   The value for a feature or parameter setting, identified by the Tag and SubTag. 
    #   For example, the Data for the Enable Code 11 is 1 (see Example 1 of Chapter 1).
    # Suffix:
    #   “;<ETX>” (HEX: 3B 03), 2 characters.
    
    def send_cmd(StorageType_Tag):
        Prefix = bytes("\x7E\x01\x30\x30\x30\x30", encoding="utf-8")
        Suffix = bytes("\x3B\x03", encoding="utf-8")
    
        cmd = Prefix + bytes(StorageType_Tag, encoding="utf-8") + Suffix
    
        print("Sending:")
        printHex(cmd)
    
        ser.write(cmd)
    
        time.sleep(0.1)
        recv = ser.read(ser.in_waiting)
        print("Response:")
        printHex(recv)
    
    
    def start_scanning():
        print("start scanning")
        send_cmd("#SCNTRG1")
        return
    
    
    def stop_scanning():
        print("stop scanning")
        send_cmd("#SCNTRG0")
        return
    

    Output:And the RT214 automatically detects and reads bar code.

    2. USB CDC Communication

    If we want to use the USB port and make it work as a virtual serial port, set up the RT214 to USB Com port emulation mode. And the RT214 scanner will be detected as a COM device in Raspberry Pi.

     

    Step 1: Hardware connection

    Connect RT214 + USB Kit board to the USB port of Raspberry Pi:

     

    Step 2: RT214 settings

    RT214 set to USB CDC mode, scan the following Setting bar code

    Enter setup

    Set to USB-CDC mode

     Exit setup

     

    Step 3: Raspberry Pi Settings

    The RT214 USB CDC mode is the USB Com port emulation mode, the device name usually is:

    /dev/ttyACM*

     

    Step 4: Run the Python sample code

    Run:  python RT214_USB_CDC.py

    import sys
    import serial
    import time
    
    tel
    web
    # raspberry pi usb cdc
    # default usb device /dev/ttyACM0 115200 8n1
    ser = serial.Serial("/dev/ttyACM0", 115200, timeout=0.5)
    
    # raspberry pi ttl
    # ser = serial.Serial("/dev/ttyS0", 115200, timeout=0.5)
    
    #windows
    # ser = serial.Serial("COM45", 115200, timeout=0.5)
    
    
    print('serial test start ...')
    if ser != None:
        print('serial ready...')
    else:
        print('serial not ready')
        sys.exit()
    
    ser.timerout = 1  # read time out
    ser.writeTimeout = 0.5  # write time out.
    
    
    def printHex(_str):
        for i in _str:
            print('%02x' % i, end=" ")
        print("")
    
    
    # Command Syntax
    # 
    # Prefix Storage Tag SubTag {Data} [, SubTag {Data}] [; Tag SubTag {Data}] […] ;
    # Suffix Among which, {data} means integrant while [data] means optional data.
    # 
    # Prefix: “~<SOH>0000” (HEX: 7E 01 30 30 30 30), 6 characters.
    # StorageType: 
    #   “@” or “#”,1 character. 
    #   “@” means permanent setting which will not be lost by removing power from the scanner or rebooting it;
    #   “#” means temporary setting which will be lost by removing power from the scanner or rebooting it.
    # Tag: 
    #   A 3-character case-sensitive field that identifies the desired command group. 
    #   For example, the Tag for the Enable Code 11 is C11 (see Example 1 of Chapter 1).
    # SubTag: 
    #   A 3-character case-sensitive field that identifies the desired parameter within the tag group. 
    #   For example, the SubTag for the Enable Code 11 is ENA (see Example 1 of Chapter 1).
    # Data: 
    #   The value for a feature or parameter setting, identified by the Tag and SubTag. 
    #   For example, the Data for the Enable Code 11 is 1 (see Example 1 of Chapter 1).
    # Suffix:
    #   “;<ETX>” (HEX: 3B 03), 2 characters.
    
    def send_cmd(StorageType_Tag):
        Prefix = bytes("\x7E\x01\x30\x30\x30\x30", encoding="utf-8")
        Suffix = bytes("\x3B\x03", encoding="utf-8")
    
        cmd = Prefix + bytes(StorageType_Tag, encoding="utf-8") + Suffix
    
        print("Sending:")
        printHex(cmd)
    
        ser.write(cmd)
    
        time.sleep(0.1)
        recv = ser.read(ser.in_waiting)
        print("Response:")
        printHex(recv)
    
    
    def start_scanning():
        print("start scanning")
        send_cmd("#SCNTRG1")
        return
    
    
    def stop_scanning():
        print("stop scanning")
        send_cmd("#SCNTRG0")
        return
    

    Output:

     

    3. USB-HID

    If you prefer to connect the OEM barcode scanner module via USB Keyboard simulation, it also is fine, setup RTscan’s barcode scanner to HID mode,

    Then open “Text editor” from Raspberry Pi software, run the bar code scanning, the decoded data will show up directly.

     

    The above python sample code can be used for most of our OEM barcode scanners, includes RT206 RT207 RT208 RT209 RT214,  if you want to learn more about them, please view the link below: 

     

    https://www.rtscan.net/barcode-readers/oem-barcode-scanners/

    Part VI: Video Demo

     

    You can also refer to the following video demo to see how the OEM barcode scanner works with Raspberry Pi:

    https://www.youtube.com/watch?v=M9ATa9BmlrU&feature=emb_logo

    If you need a barcode scanner module for the Arduino microcontroller, please read:

     Arduino barcode scanner

    If you need an embedded type 2d and QR barcode scanner for Arduino, please read:

    Embedded QR Code scanner for Arduino

    If you need an Embedded barcode scanner for Raspberry Pi, please read:

    Embedded barcode scanner for Raspberry Pi

    Read More


    Arduino barcode scanner: connect OEM barcode scanners modules with Arduino microcontroller (MCU)

    If you are using an Arduino microcontroller to develop your system, and you need a 1d/ 2d OEM barcode scanner module at the same time, then this article would be helpful for you:

    Here we introduce how we connect the Arduino Uno microcontroller with RTscan OEM barcode scanner modules and make them work.

    When we try to integrate an OEM barcode scanner with the Arduino microcontroller board, we would meet these problems:

    1. The OEM barcode scanner with 12pins TTL interface, but Arduino board without this connector, how can we connect them?
    2. Whatever OEM barcode scanners we choose, how can we control the barcode scanner by Arduino and also upload decoded data to the Ardunio system?

    Read below and find how RTscan provides solutions for the above questions.

    Part I: Introduction of Arduino UNO and RTscan barcode scanners

    Arduino UNO:

    The UNO is the most used and documented board of the whole Arduino microcontrollers family, many people choose this model for their projects. Arduino Uno has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, and ICSP header, and a reset button. It contains everything needed to support the microcontroller.

     

    Arduino UNO Pinout

    And for our application to connect with the OEM barcode scanner, we need the 5.0v power supply pin, and GND pin, RXD, TXD pins.

     

    RTscan OEM barcode scanners:

    They all with 12pins connector and TTL signal, and use FFC cable and connector like this :

    In this article, we choose RT214 as an example to do the connection and integration.

     

     

    Part II: Connection solutions:

    RTscan provides two types of solutions:

    Solution 1: UART TTL Interface

    RTscan developed a multi-interface Shield, connect the shield with Arduino UNO, connect the OEM barcode scanners to our EVK board (with trigger button and beeper ), then connect them via a 6pins UART TTL cable:

     

    Via this solution, we make the connection between the barcode scanner engine and Arduino much durable/ solid.


    And for this solution, the RT214 scanner needs to be set to TTL-232 Communication (follow Part III/TTL-232 communication).

     

    ♠ OEM Scanner Modules that compliant with this solution:

    RT217 RT206 RT207 RT208 RT214 RT214B RT214C

    ∗please click the model number to view the full product introduction page.

     

    Note: we have similar solutions for fixed mount type scanner RT830C and RT830i

    UART-TTL:

    12pins flat cable TTL-232:

    If you prefer this type of scanner, please contact our sales team to get detailed information: sales@rtscan.net

    Solution 2: Connect via USB host A

    If you prefer your barcode scanner with a USB interface instead of a UART TTL cable,  then you can use this solution:  use an Arduino USB host shield.

    The Arduino USB Host Shield allows you to connect a USB barcode scanner to your Arduino board, set up RTscan’s barcode scanner to HID mode, or USB CDC (Virtual Com mode).

     

    Please follow Part III/USB CDC Communication/USB-HID Communication to check how to make them work together.

     

    ♠ Barcode Scanner Modules that compliant with this solution:

    All barcode scanners have a USB interface.  All RTscan’s OEM scanner modules, fixed-mount types, and handheld types. 

     

    Part III:
    Get the OEM barcode scanner module work with the Arduino system /Arduino C++ sample code:

    We developed sample code (only compatible with RTscan’s scanners) to work with our scanners so that you can copy our source codes and program your system very quickly and no need to write the whole code one by one; save your time and speed up your integration work!

    In this article, we choose RT214 as an example to do the programming.

    1. UART-TTL Communication

    Step 1: Hardware connection

    Connect RT214+EVK board to Arduino UNO as said above

     

    Step 2: RT214 settings

    RT214 needs to be set up with TTL-232 mode, scan the following barcode

    Set to TTL-232 Mode, the default baud rate is 9600, 8-n-1

    Enter setup

    Set to TTL-232 mode

    For more details, please refer to “RT214_User_Guide”

     

    Step 3: Run the sample code

    Upload the below sample code rt214_test_demo.ino to Arduino UNO.

    /*
    # RT214/RT212 Command Syntax
    #
    # Prefix Storage Tag SubTag {Data} [, SubTag {Data}] [; Tag SubTag {Data}] […] ;
    # Suffix Among which, {data} means integrant while [data] means optional data.
    #
    # Prefix: “~<SOH>0000” (HEX: 7E 01 30 30 30 30), 6 characters.
    # StorageType:
    #   “@” or “#”,1 character.
    #   “@” means permanent setting which will not be lost by removing power from the scanner or rebooting it;
    #   “#” means temporary setting which will be lost by removing power from the scanner or rebooting it.
    # Tag:
    #   A 3-character case-sensitive field that identifies the desired command group.
    #   For example, the Tag for the Enable Code 11 is C11 (see Example 1 of Chapter 1).
    # SubTag:
    #   A 3-character case-sensitive field that identifies the desired parameter within the tag group.
    #   For example, the SubTag for the Enable Code 11 is ENA (see Example 1 of Chapter 1).
    # Data:
    #   The value for a feature or parameter setting, identified by the Tag and SubTag.
    #   For example, the Data for the Enable Code 11 is 1 (see Example 1 of Chapter 1).
    # Suffix:
    #   “;<ETX>” (HEX: 3B 03), 2 characters.
    */
    
    
    void send_cmd(char * StorageType_Tag)
    {
    	const char *Prefix = "\x7E\x01\x30\x30\x30\x30";
    	const char *Suffix = "\x3B\x03";
    
    	mySerial.print(Prefix);
    	mySerial.print(StorageType_Tag);
    	mySerial.print(Suffix);
    
    	Serial.print("Send Command:");
    	printHex(Prefix, strlen(Prefix));
    	printHex(StorageType_Tag, strlen(StorageType_Tag));
    	printHex(Suffix, strlen(Suffix));
    
    	Serial.println();
    
    	Serial.print("Command response:");
    	read_response(50);
    
    	Serial.println();
    }
    
    void read_response(unsigned long timeout)
    {
    	unsigned long t = millis();
    	unsigned char c;
    
    	while (millis() - t < timeout)
    	{
    		if (mySerial.available() > 0)
    		{
    			c = mySerial.read();
    			printHex((char *)&c, 1);
    		}
    	}
    }
    
    void start_scanning()
    {
    	Serial.println("start scanning");
    	send_cmd("#SCNTRG1");
    }
    
    
    void stop_scanning()
    {
    	Serial.println("stop scanning");
    	send_cmd("#SCNTRG0");
    }
    

    Please contact us to get full sample codes: sales@rtscan.net

    And the RT214 automatically detects and reads bar codes.

    Output:

     

    Introduction of the serial port commands protocol for RT214

    The often-used serial port commands are as below (HEX):

    Trigger mode:1B 31

    Stop scanning:1B 30

    Auto mode:1B 32

    Continuous read mode:1B 33

    For more details, please refer to 《RTscan Serial Programming Command Manual.PDF》

    2. USB CDC Communication

    In this solution, we connect the OEM barcode scanner to Arduino via USB host shield, and firstly we need to set the scanner to USB Virtual Com emulation mode, and the Arduino recognizes the scanner as a USB CDC device. Follow the steps as below:

     

    Step 1: Hardware connection

    Connect the RT214 scanner to the USB port of the Arduino USB host shield through a USB data cable.

     

    Step 2: RT214 settings

    RT214 set to USB CDC mode, scan the following Setting bar code.

    Enter setup

    Set to USB-CDC mode:

    Recognized as a COM port device on the computer:

     

    Step 3: Include the library

    Arduino Library Manager

    First, install Arduino IDE version 1.6.2 or newer, then simply use the Arduino Library Manager to install the library.

    Please see the following page for instructions:

    http://www.arduino.cc/en/Guide/Libraries#toc3

     

    Manual installation

    First download the library by clicking on the following link:

    https://github.com/felis/USB_Host_Shield_2.0

    Then uncompress the zip folder and rename the directory to “USB_Host_Shield_20”, as any special characters are not supported by the Arduino IDE.

    Now open up the Arduino IDE and open “File>Preferences”. There you will see the location of your sketchbook. Open that directory and create a directory called “libraries” inside that directory. Now move the “USB_Host_Shield_20” directory to the “libraries” directory.

    The final structure should look like this:

    • Arduino/
      • libraries/
        • USB_Host_Shield_20/

    Now quit the Arduino IDE and reopen it.

    Now you should be able to open all the examples codes by navigating to “File>Examples>USB_Host_Shield_20” and then select the example you will like to open.

    For more information please visit the following sites:

    http://arduino.cc/en/Guide/Libraries

    https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use.

     

    Step 4: Run the sample code

    Run:

    acm_terminal. ino

    #include <cdcacm.h>
    #include <usbhub.h>
    
    #include "pgmstrings.h"
    
    // Satisfy the IDE, which needs to see the include statment in the ino too.
    #ifdef dobogusinclude
    #include <spi4teensy3.h>
    #endif
    #include <SPI.h>
    
    class ACMAsyncOper : public CDCAsyncOper
    {
    public:
        uint8_t OnInit(ACM *pacm);
    };
    
    uint8_t ACMAsyncOper::OnInit(ACM *pacm)
    {
        uint8_t rcode;
        // Set DTR = 1 RTS=1
        rcode = pacm->SetControlLineState(3);
    
        if (rcode)
        {
            ErrorMessage<uint8_t>(PSTR("SetControlLineState"), rcode);
            return rcode;
        }
    
        LINE_CODING	lc;
        lc.dwDTERate	= 115200;
        lc.bCharFormat	= 0;
        lc.bParityType	= 0;
        lc.bDataBits	= 8;
    
        rcode = pacm->SetLineCoding(&lc);
    
        if (rcode)
            ErrorMessage<uint8_t>(PSTR("SetLineCoding"), rcode);
    
        return rcode;
    }
    
    USB     Usb;
    //USBHub     Hub(&Usb);
    ACMAsyncOper  AsyncOper;
    ACM           Acm(&Usb, &AsyncOper);
    
    void setup()
    {
      Serial.begin( 115200 );
    #if !defined(__MIPSEL__)
      while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
    #endif
      Serial.println("Start");
      Serial.println("Please set the scanner to USB CDC mode");
    
      if (Usb.Init() == -1)
          Serial.println("OSCOKIRQ failed to assert");
    
      delay( 200 );
    }
    
    void loop()
    {
    ...
    
    Please contact us to get full sample codes: sales@rtscan.net

     

    Open the serial port for debugging:

     

    Scan any barcode and it will be shown as below:

     

    3. USB-HID Communication

    In this solution, the scanner is set to USB HID KBW mode, and the Arduino recognizes the scanner as a USB keyboard simulation device.

     

    Step 1: Hardware connection

    Connect the RT214 scanner to the USB port of the Arduino USB host shield through a USB data cable.

     

    Step 2: RT214 settings

    RT214 set to USB CDC mode, scan the following Setting bar code

    Enter setup:

    Set to USB-HID mode:

    Recognized as  on the computer:

     

    Step 3: Include the library

    Arduino Library Manager

    First, install Arduino IDE version 1.6.2 or newer, then simply use the Arduino Library Manager to install the library.

    Please see the following page for instructions:

    http://www.arduino.cc/en/Guide/Libraries#toc3

     

    Manual installation

    First download the library by clicking on the following link:

    https://github.com/felis/USB_Host_Shield_2.0

    Then uncompress the zip folder and rename the directory to “USB_Host_Shield_20”, as any special characters are not supported by the Arduino IDE.

    Now open up the Arduino IDE and open “File>Preferences”. There you will see the location of your sketchbook. Open that directory and create a directory called “libraries” inside that directory. Now move the “USB_Host_Shield_20” directory to the “libraries” directory.

    The final structure should look like this:

    • Arduino/
      • libraries/
        • USB_Host_Shield_20/

    Now quit the Arduino IDE and reopen it.

    Now you should be able to open all the examples codes by navigating to “File>Examples>USB_Host_Shield_20” and then selecting the example you would like to open.

    For more information please visit the following sites:

    http://arduino.cc/en/Guide/Libraries

    https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use.

     

    Step 4: Run the sample code

    Run: Scanner_USBHIDUniversalKbd. ino

    #include <hidboot.h>
    #include <usbhid.h>
    #include <hiduniversal.h>
    
    #include <SPI.h>
    
    class KbdRptParser : public KeyboardReportParser
    {
      public:
        void PrintKey(uint8_t mod, uint8_t key);
    
        bool isScanEnd();
        void PrintScanCode();
    
      protected:
        void OnControlKeysChanged(uint8_t before, uint8_t after);
    
        void OnKeyDown  (uint8_t mod, uint8_t key);
        void OnKeyUp    (uint8_t mod, uint8_t key);
        void OnKeyPressed(uint8_t key);
    
        String ScanCode = "";
        uint32_t FreeTime = 0;
        bool StartScan = false;
    };
    
    void KbdRptParser::PrintKey(uint8_t m, uint8_t key)
    {
      MODIFIERKEYS mod;
      *((uint8_t*)&mod) = m;
      Serial.print((mod.bmLeftCtrl   == 1) ? "C" : " ");
      Serial.print((mod.bmLeftShift  == 1) ? "S" : " ");
      Serial.print((mod.bmLeftAlt    == 1) ? "A" : " ");
      Serial.print((mod.bmLeftGUI    == 1) ? "G" : " ");
    
      Serial.print(" >");
      PrintHex<uint8_t>(key, 0x80);
      Serial.print("< ");
    
      Serial.print((mod.bmRightCtrl   == 1) ? "C" : " ");
      Serial.print((mod.bmRightShift  == 1) ? "S" : " ");
      Serial.print((mod.bmRightAlt    == 1) ? "A" : " ");
      Serial.println((mod.bmRightGUI    == 1) ? "G" : " ");
    };
    
    void KbdRptParser::OnControlKeysChanged(uint8_t before, uint8_t after) {
    
      MODIFIERKEYS beforeMod;
      *((uint8_t*)&beforeMod) = before;
    
      MODIFIERKEYS afterMod;
      *((uint8_t*)&afterMod) = after;
    
      if (beforeMod.bmLeftCtrl != afterMod.bmLeftCtrl) {
        Serial.println("LeftCtrl changed");
      }
      if (beforeMod.bmLeftShift != afterMod.bmLeftShift) {
        Serial.println("LeftShift changed");
      }
      if (beforeMod.bmLeftAlt != afterMod.bmLeftAlt) {
        Serial.println("LeftAlt changed");
      }
      if (beforeMod.bmLeftGUI != afterMod.bmLeftGUI) {
        Serial.println("LeftGUI changed");
      }
    
      if (beforeMod.bmRightCtrl != afterMod.bmRightCtrl) {
        Serial.println("RightCtrl changed");
      }
      if (beforeMod.bmRightShift != afterMod.bmRightShift) {
        Serial.println("RightShift changed");
      }
      if (beforeMod.bmRightAlt != afterMod.bmRightAlt) {
        Serial.println("RightAlt changed");
      }
      if (beforeMod.bmRightGUI != afterMod.bmRightGUI) {
        Serial.println("RightGUI changed");
      }
    
    }
    
    void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key)
    {
      // Serial.print("DN ");
      // PrintKey(mod, key);
      uint8_t c = OemToAscii(mod, key);
    
      if (c)
        OnKeyPressed(c);
    }
    
    void KbdRptParser::OnKeyUp(uint8_t mod, uint8_t key)
    {
      // Serial.print("UP ");
      // PrintKey(mod, key);
      
      FreeTime = millis();
      StartScan = true;
    }
    
    void KbdRptParser::OnKeyPressed(uint8_t key)
    {
      // Serial.print("ASCII: ");
      // Serial.println((char)key);
      ScanCode = ScanCode + String((char)key);
    };
    
    bool KbdRptParser::isScanEnd()
    {
      if(millis() - FreeTime > 200 && StartScan){
          StartScan = false;
          return true;
      }
    
      return false;
    };
    
    void KbdRptParser::PrintScanCode()
    {
      Serial.print("ScanCode: ");
      Serial.println(ScanCode);
      ScanCode = "";
    };
    
    USB          Usb;
    HIDUniversal Hid(&Usb);
    KbdRptParser Prs;
    
    void setup()
    {
      Serial.begin( 115200 );
    #if !defined(__MIPSEL__)
      while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
    #endif
      Serial.println("Start");
      Serial.println("Please set the scanner to USB HID mode");
    
      if (Usb.Init() == -1)
        Serial.println("OSC did not start.");
    
      delay( 200 );
    
      Hid.SetReportParser(0, &Prs);
    }
    
    void loop()
    {
    

    Please contact us to get full sample codes: sales@rtscan.net

     

     

    Open the serial port for debugging:

    Scan any barcode and it will be shown as below:

     

    This article is a solution introduction for Arduino barcode scanners, if you are using Raspberry Pi and need an OEM barcode scanner, please read: Raspberry Pi barcode scanner

    If you need an embedded type 2d and QR barcode scanner for Arduino, please read:

    Embedded QR Code scanner for Arduino

    If you need an Embedded barcode scanner for Raspberry Pi, please read:

    Embedded barcode scanner for Raspberry Pi

    We developed an Arduino solution for most of our OEM barcode scanners, includes RT203 RT206 RT207 RT208 RT209 RT211 RT830B, if you want to learn more about them, please view below: https://www.rtscan.net/barcode-readers/oem-barcode-scanners/