D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] USB barcode reader in X

 

On Thu, Jul 3, 2008 at 4:59 PM, kevin <kevin.lucas@xxxxxxxxxxxxxxxxxx> wrote:
>> usb 4-1: new full speed USB device using uhci_hcd and address 3
>> usb 4-1: configuration #1 chosen from 1 choice
>> pl2303 4-1:1.0: pl2303 converter detected
>> usb 4-1: pl2303 converter now attached to ttyUSB0
>> usb 4-1: New USB device found, idVendor=067b, idProduct=2303
>> usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
> and if I scan and do a
>
> [root@kevinspc ~]#  cat /dev/ttyUSB0
> 5000157024671
> i get a code for Heinz Beans
> I think Xorg.conf may be the answer but am unsure this is the best way to go.

Looks like its an absolutely plain USB to serial converter that is
spitting back codes in straight ASCII. Hooray!

What you need is a very simple application that reads the device
/dev/ttyUSB0 and when it sees a string (i guess \r or \n terminated)
it adds this in the box in your application.

What form box are you trying to get it into? is it an existing
application? Possible to use some an X automation perl library to get
focus on your existing form window and box and inject a keyboard event
of your number, but this seems over complex.

Robin

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html