# Barcode Scanner input

**URL:** <https://discourse.nodered.org/t/barcode-scanner-input/16905>\
**Category:** General\
**Created:** [19 October 2019 23:51 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905 "2019-10-19T23:51:01Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [8 February 2020 09:49 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/21 "2020-02-08T09:49:46Z")

</div>

Can you please share more what kind of text input?

I used dashboard text input but i don't get anything out of it?  
Am i missing something of that configuration ?

---

<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:** [8 February 2020 09:50 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/22 "2020-02-08T09:50:10Z")

</div>

> [@pranavthakkar](#):
>
> it is working on text editor

In that case if you deploy a dashboard text input node, switch to the dashboard page in the browser, **click on the text node** (that is very important) and do the scan, then the text should appear there. If it doesn't then hit a key on the keyboard and check the key you entered appears on the display, then try scanning again.

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [8 February 2020 09:57 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/23 "2020-02-08T09:57:23Z")

</div>

Thanks @Colin, It is working. showing me on screen but what i want is every scan payload.  
My application is i want to capture image and save a file name with it's barcode name.

Right now I'm just see the values of barcode on dashboard.

How can i get the values of every individual scan so that i can save every image with its name.

---

<div class="post-metadata">

**Author:** ![Henjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henjoe/32/52335_2.png) [@Henjoe](https://discourse.nodered.org/u/Henjoe)\
**Post date:** [8 February 2020 11:45 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/24 "2020-02-08T11:45:37Z")

</div>

Okay I get it.  
In this case you want to automatically focus the cursor to text input everytime the scan is finished.  
I actually didnit before but not using Text input, I used UI template and create a basic HTML text input there.

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [8 February 2020 12:36 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/25 "2020-02-08T12:36:01Z")

</div>

Can you guide me through that?  
What will be the HTML part of that template node?

---

<div class="post-metadata">

**Author:** ![Kenmazing](https://avatars.discourse-cdn.com/v4/letter/k/e68b1a/32.png) [@Kenmazing](https://discourse.nodered.org/u/Kenmazing)\
**Post date:** [18 February 2020 17:26 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/26 "2020-02-18T17:26:12Z")

</div>

What do you mean by capture image? Do you mean you want the barcode scanner to send, fo example, a jpeg picture of the barcode? Or simply the machine-readable value of the barcode? And what do you mean by "with itsname?"

---

<div class="post-metadata">

**Author:** ![pranavthakkar](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@pranavthakkar](https://discourse.nodered.org/u/pranavthakkar)\
**Post date:** [19 February 2020 12:43 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/27 "2020-02-19T12:43:51Z")

</div>

Hi @Kenmazing , I mean i have camera module which will capture image of object, and the barcode scanner for the scanning the barcode on the object.

after scan it's value will be the image name like (barcode\_value.jpeg)

---

<div class="post-metadata">

**Author:** ![robertsLando](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertslando/32/6937_2.png) [@robertsLando](https://discourse.nodered.org/u/robertsLando)\
**Post date:** [14 July 2020 06:49 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/28 "2020-07-14T06:49:59Z")

</div>

If anyone is still interested in this I have forked node-red-contrib-usbhid into this one: [https://www.npmjs.com/package/node-red-contrib-usbhid-reader](https://www.npmjs.com/package/node-red-contrib-usbhid-reader)

Follow the instructions on readme and you will be able to parse the data from your HID device

---

<div class="post-metadata">

**Author:** ![thms\_murthy](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@thms\_murthy](https://discourse.nodered.org/u/thms_murthy)\
**Post date:** [18 February 2021 15:14 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/29 "2021-02-18T15:14:05Z")

</div>

Hello,

Can you please suggest a method to read barcode data from scanner connected to Ethernet (Network)?

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [18 February 2021 15:31 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/30 "2021-02-18T15:31:39Z")

</div>

Good Morning,  
May I ask by what means you have the data to come into Node-RED? Also, what brand of barcode scanner and what protocol you intend to use?

Or, are you asking in general how to get data from the scanner? and what nodes to use etc.?

Kind Regards,  
@tree-frog

---

<div class="post-metadata">

**Author:** ![thms\_murthy](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@thms\_murthy](https://discourse.nodered.org/u/thms_murthy)\
**Post date:** [18 February 2021 15:48 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/31 "2021-02-18T15:48:57Z")

</div>

Very Good Morning !!!

Thanks for quick response.

I am asking in general, how to read the barcode data from Scanner connected through ethernet network. If you can share the method and nodes to be used, that would be great.

And, if you have sample flow please share it here.

Best Regards,  
@thms_murthy

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [18 February 2021 15:50 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/32 "2021-02-18T15:50:52Z")

</div>

In order to get you where you need to be, I need some detail on your scanner. What brand is it and how do you have it configured to "report" data? Any info would help minimize the back-and-forth.

@tree-frog

---

<div class="post-metadata">

**Author:** ![thms\_murthy](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@thms\_murthy](https://discourse.nodered.org/u/thms_murthy)\
**Post date:** [18 February 2021 15:56 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/33 "2021-02-18T15:56:56Z")

</div>

Scanner is not available for the moment. Placed an order for 1 unit of Zebra LI3678 and EA3600 (ethernet module). I would like to read the scanned data using node-red.

---

<div class="post-metadata">

**Author:** ![tree-frog](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tree-frog/32/89303_2.png) [@tree-frog](https://discourse.nodered.org/u/tree-frog)\
**Post date:** [18 February 2021 16:25 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/34 "2021-02-18T16:25:39Z")

</div>

import this text into a new flow. It is very simple. Cognex is the brand of the scanner, it uses telnet port 23 to communicate. you probably can enable the telnet port for this purpose. Otherwise you'll need to know the port address as well as your IP address.

Your scanner may differ. It sounds like you have some kind of hand-held item. You'll need to go through the configuration to get it to do what you want. I suggest a good go at reading the setup software guide. They are easy once you get going.

In the example I included, the scanner has the 'String Commands' "+" and "-" basically accepts these to triggers. This is remote triggering. For your purpose, pull the trigger. You'll only need the top portion to listen on the port you have. The "String" node is just a value filter to trim-right any non-printable code from the output. (carriage return/line feed) /r/n etc.

Enjoy 😀

```auto
[{"id":"3e94d37a.b66c9c","type":"tcp out","z":"9a8046ff.f923d","host":"192.168.75.25","port":"23","beserver":"client","base64":false,"end":true,"name":"Cognex 192.168.75.25","x":530,"y":260,"wires":[]},{"id":"2540ac49.f65e24","type":"inject","z":"9a8046ff.f923d","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"+","payloadType":"str","x":150,"y":240,"wires":[["3e94d37a.b66c9c"]]},{"id":"24eef49a.e8d5c4","type":"tcp in","z":"9a8046ff.f923d","name":"Cognex 192.168.75.25","server":"client","host":"192.168.75.25","port":"23","datamode":"stream","datatype":"utf8","newline":"\\n","topic":"","base64":false,"x":180,"y":100,"wires":[["d086b8a.70032c8"]]},{"id":"16acc33f.518ded","type":"debug","z":"9a8046ff.f923d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":570,"y":100,"wires":[]},{"id":"d086b8a.70032c8","type":"string","z":"9a8046ff.f923d","name":"","methods":[{"name":"trimRight","params":[]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":410,"y":100,"wires":[["16acc33f.518ded"]]},{"id":"5c8e4a1b.21044c","type":"inject","z":"9a8046ff.f923d","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"-","payloadType":"str","x":150,"y":280,"wires":[["3e94d37a.b66c9c"]]}]

```

---

<div class="post-metadata">

**Author:** ![thms\_murthy](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@thms\_murthy](https://discourse.nodered.org/u/thms_murthy)\
**Post date:** [18 February 2021 16:50 UTC](https://discourse.nodered.org/t/barcode-scanner-input/16905/35 "2021-02-18T16:50:49Z")

</div>

That's really good !!!

First flow is important to listen to Port on Device IP address and take the stream as result !!!

Thanks for help !!!

Best regards,  
@thms_murthy

[Previous page](https://discourse.nodered.org/t/barcode-scanner-input/16905.md?page=1)
