# Ruby intergation with barcode scanner

**URL:** <https://www.ruby-forum.com/t/ruby-intergation-with-barcode-scanner/81590>\
**Category:** Ruby\
**Created:** [January 10, 2007, 11:25am UTC](https://www.ruby-forum.com/t/ruby-intergation-with-barcode-scanner/81590 "2007-01-10T11:25:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 10, 2007, 11:25am UTC](https://www.ruby-forum.com/t/ruby-intergation-with-barcode-scanner/81590/1 "2007-01-10T11:25:49Z")

</div>

Hi

I was wondering whether any one had got any experience or software to  
access the USB ports. I have got a rs232 scanner that I can connect to a  
USB port. I would like to get it to work to read ISBN numbers so I can  
put the details in a mysql database. I have done programming before  
(java C shell scripts) but am quite new to ruby, what I have seen so far  
is really good. I would be very glade of some help/or software I can  
hack to do what I want to do with ruby as the language of choice.

Adrian

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 10, 2007, 11:35am UTC](https://www.ruby-forum.com/t/ruby-intergation-with-barcode-scanner/81590/2 "2007-01-10T11:35:16Z")

</div>

On Wed, 10 Jan 2007 19:25:51 +0900, Adrian R. wrote:

> Adrian

the barcode scanners I know emulate a keyboard, so using them from  
ruby should be a matter of plugging them in and reading from $stdin.

s.

---

<div class="post-metadata">

**Author:** ![madsurfer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ce7236/32.png) [@madsurfer](https://www.ruby-forum.com/u/madsurfer)\
**Post date:** [January 10, 2007, 11:49am UTC](https://www.ruby-forum.com/t/ruby-intergation-with-barcode-scanner/81590/3 "2007-01-10T11:49:19Z")

</div>

On Wed, 2007-01-10 at 19:35 +0900, Stefan S. wrote:

> > hack to do what I want to do with ruby as the language of choice.
> > 
> > Adrian
> 
> the barcode scanners I know emulate a keyboard, so using them from  
> ruby should be a matter of plugging them in and reading from $stdin.
> 
> s.

There’s also OPOS ( Ole for Point Of Sale), is another mechanism that is  
common with scanners, especially in the retail/POS industry. They can  
run through USB, parallel or rs-232. I know that there is some VB code  
out there to test the OPOS interface, so it might be possible to find  
that, and convert it. Sorry I don’t remember how they did it, but it  
wasn’t too complex (c’mon, it was in VB)

Matt
