# Henex BarCode / QR Code Scanner Interface on Serial Port not working

**URL:** <https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669>\
**Category:** General\
**Created:** [10 March 2022 17:53 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669 "2022-03-10T17:53:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![saxenaramesh](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@saxenaramesh](https://discourse.nodered.org/u/saxenaramesh)\
**Post date:** [10 March 2022 17:53 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/1 "2022-03-10T17:53:35Z")

</div>

I am trying to connect a bar code scanner to Node Red on Serial Port.  
Scanner : Make: Henex, Model: HC3208R  
This scanner is a wireless type. We need to use its wireless dongle at USB port and then scanner should work wireless.  
Normally this scanner provide output to any text editor field like a keyboard entry. When I use it for Node Red on WINDOWS OS. I need to change the interface to "USB Virtual COM". Then It works perfectly fine via serial port. I configure the right COM Port - COM4 to which scanner is connected in node red Serial IN node.  
Now when I try the same thing with Raspberry pi with Raspbian OS, this device (wireless dongle) is detected at ttyUSB0. I configure USB0 at serial IN port. Connection is successful and serial in node status is "Connected". But I don't get any input at debug when I scan any code using scanner.  
I have rightly used the settings "USB Virtual COM" which works really well with windows OS.

For text editor input, it works fine with Raspberry pi also.  
I need this to work with node red Serial IN on raspberry pi. Please suggest what can be wrong and how this can be solved? I tried with the manufacturer, but did not get much details.  
Node Red Version: V1.3.5. Flow example is as below:

```auto
[
    {
        "id": "736c7e71.a8a8",
        "type": "serial in",
        "z": "d3889328.d4132",
        "name": "",
        "serial": "85ed1317.7df08",
        "x": 330,
        "y": 160,
        "wires": [
            [
                "7ab9457.d922dbc"
            ]
        ]
    },
    {
        "id": "7ab9457.d922dbc",
        "type": "debug",
        "z": "d3889328.d4132",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 580,
        "y": 180,
        "wires": []
    },
    {
        "id": "85ed1317.7df08",
        "type": "serial-port",
        "serialport": "/dev/ttyUSB0",
        "serialbaud": "9600",
        "databits": "8",
        "parity": "none",
        "stopbits": "1",
        "waitfor": "",
        "dtr": "none",
        "rts": "none",
        "cts": "none",
        "dsr": "none",
        "newline": "0",
        "bin": "false",
        "out": "time",
        "addchar": "",
        "responsetimeout": "10000"
    }
]

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [10 March 2022 18:48 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/2 "2022-03-10T18:48:20Z")

</div>

Apart from the serial port device, are the serial port settings exactly the same as the windows node-red?

Does the serial config node find your device?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b46ab787883d18c24f0265b01eb015351546e93a.png)

Do you get anything if you set it to output "after a silence of"?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4dbd7ddf608226185320ad3587ba8070ea87dfc7.png)

---

<div class="post-metadata">

**Author:** ![saxenaramesh](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@saxenaramesh](https://discourse.nodered.org/u/saxenaramesh)\
**Post date:** [11 March 2022 17:28 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/3 "2022-03-11T17:28:07Z")

</div>

Thanks for the reply.

1. Yes, all the settings are same. Baud rate, parity, stop bit etc.
2. Yes, Serial config node find my device at /dev/ttyUSB0.
3. No, I did not get any input even after using the split input to "after a silence of" - 200 ms.

from the same company - Henex, I am using another scanner model HC-666. This works very well using serial IN node. This goes to default USB Port of /dev/ttyASM0 and this one is a wired.  
The scanner which is not working is a wireless scanner HC3208R. Even Henex Support engineer is clueless on this. However, if I use text input field in node red and use this HC3208R, it works alright.

---

<div class="post-metadata">

**Author:** ![vikingsraven](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vikingsraven/32/49243_2.png) [@vikingsraven](https://discourse.nodered.org/u/vikingsraven)\
**Post date:** [12 March 2022 11:45 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/4 "2022-03-12T11:45:27Z")

</div>

Quick question have you set the user to dialout?

on the command line type groups  
you should get something like this

`pi adm dialout cdrom sudo audio video plugdev games users input render netdev lpadmin gpio i2c spi`  
if dial out is not on there you wont be able to access the ttyUSB0.  
so to add you as a user  
in the command line type  
`sudo adduser second_user dialout`  
where second user is your user name on the pi, which is pi by default.  
Then reboot.  
if you are on there then as in the picture

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a97aefd1c8f08d858fb8e0e09c4a86328bd83116.png)  
Spilt input on the character , put a hex value in here that you think may appear say 0x38 ( which is the number 8, just a random choice!) the serial node had me stumped for a while when i started with node red.

---

<div class="post-metadata">

**Author:** ![saxenaramesh](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@saxenaramesh](https://discourse.nodered.org/u/saxenaramesh)\
**Post date:** [13 March 2022 04:41 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/5 "2022-03-13T04:41:00Z")

</div>

Thanks. I checked this. "dialout" is already there when I run command "groups". Please see below picture.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/a/6a704de500421806dbb91f1ba497b762fd96c4ad.png)

I also tried to add pi as user to dialout. It was also already there.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/02a7c5d1156ef37114c7b4da241777bae6927e83.png)

So, its still not working.  
Reagrds,

---

<div class="post-metadata">

**Author:** ![saxenaramesh](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@saxenaramesh](https://discourse.nodered.org/u/saxenaramesh)\
**Post date:** [13 March 2022 04:45 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/6 "2022-03-13T04:45:33Z")

</div>

I also tried to split the input at "0x38". This still does not work.  
Can you please suggest some other options? Thanks a lot for your support.

---

<div class="post-metadata">

**Author:** ![saxenaramesh](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@saxenaramesh](https://discourse.nodered.org/u/saxenaramesh)\
**Post date:** [16 March 2022 14:07 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/7 "2022-03-16T14:07:58Z")

</div>

Hi Steve,  
One question:  
what is the difference between USB0 and ACM0?  
I have one wired scanned and it connects at ACM0. It works very well with Serial IN node. So I am wondering if there can be tweak for this? Please suggest.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 March 2022 14:29 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/8 "2022-03-16T14:29:48Z")

</div>

> [@saxenaramesh](#):
>
> what is the difference between USB0 and ACM0

It just indicates they are different types of devices, requiring different drivers. As I understand it a ttyACM device uses a linux serial modem driver. The other uses the newer USB to serial device driver framework. In use it doesn't make any difference.

---

<div class="post-metadata">

**Author:** ![saxenaramesh](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@saxenaramesh](https://discourse.nodered.org/u/saxenaramesh)\
**Post date:** [17 March 2022 17:13 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/9 "2022-03-17T17:13:04Z")

</div>

Thanks for the reply. Any further suggestions for serial port communication?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 March 2022 20:53 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/10 "2022-03-17T20:53:25Z")

</div>

Typically, cheap USB based wireless input devices use HID for communicating to computer.

Have you tried getting input via the [USB-HID node](https://flows.nodered.org/node/node-red-contrib-usbhid)?

Alternatively, here are a few wireless scanners WITH serial connection (from the base)

> **[RS-232 Reader - Serial Barcode Scanner - Barcodes Inc](https://www.barcodesinc.com/cats/barcode-scanners/Connectivity=Cordless/rs232.htm?page=1)**
>
> Serial (RS-232) Barcode Scanner connects to a computer's serial port. Shop RS-232 scanners and get low prices and fast shipping from Barcodes Inc.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 May 2022 20:53 UTC](https://discourse.nodered.org/t/henex-barcode-qr-code-scanner-interface-on-serial-port-not-working/59669/11 "2022-05-16T20:53:28Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
