LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2007, 01:57 AM   #1
bricedebrignaisplage
Member
 
Registered: Apr 2006
Location: singapore
Distribution: debian
Posts: 51

Rep: Reputation: 16
redirecting the output of a USB barcode scanner (= USB keyboard)


Hi

I have a USB barcode scanner that acts like a keyboard: whenever a
barcode is read it sends the code where the keyboard would normally write.
I would like to redirect the output to /dev/rtfX (RTAI FIFO).

What I do know is to read from the USB barcode scanner using libhid and
write to the FIFO using dedicated API. However, it's a bit complicated,
and I have the feeling that the result could be obtained with very few
lines of code.

MardukKurios suggested this:
They normally configure as a keyboard, though in Linux, by default, some
of the COM ports may not be accessible. Add "8250.nr_uarts=8" to the end
of your kernel line to have it configure past COM4. I.E.:
kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ 8250.nr_uarts=8
If you cat /dev/ttySX (X is the number of the COM port you want to listen
to) and scan something, you should see input.

This seems like a good idea, but unfortunately 8250.nr_uarts is not an
option recognized by my kernel. However, this suggests that what I want to
do should be possible.

Does anybody have an idea?

Thanks,
Brice

PS: dmesg shows this
usb 2-1: new full speed USB device using uhci_hcd and address 3 input: �
Symbol Technologies, Inc, 2000 Symbol Bar Code Scanner as
/class/input/input3 input: USB HID v1.10 Keyboard [� Symbol
Technologies, Inc, 2000 Symbol Bar Code Scanner ] on usb-0000:00:1d.0-1
 
Old 06-10-2009, 07:26 PM   #2
ellappan
LQ Newbie
 
Registered: May 2009
Posts: 14

Rep: Reputation: 0
Quote:
Originally Posted by bricedebrignaisplage View Post
Hi

I have a USB barcode scanner that acts like a keyboard: whenever a
barcode is read it sends the code where the keyboard would normally write.
I would like to redirect the output to /dev/rtfX (RTAI FIFO).

What I do know is to read from the USB barcode scanner using libhid and
write to the FIFO using dedicated API. However, it's a bit complicated,
and I have the feeling that the result could be obtained with very few
lines of code.

MardukKurios suggested this:
They normally configure as a keyboard, though in Linux, by default, some
of the COM ports may not be accessible. Add "8250.nr_uarts=8" to the end
of your kernel line to have it configure past COM4. I.E.:
kernel /boot/vmlinuz-2.6.15-1.2054_FC5 ro root=LABEL=/ 8250.nr_uarts=8
If you cat /dev/ttySX (X is the number of the COM port you want to listen
to) and scan something, you should see input.

This seems like a good idea, but unfortunately 8250.nr_uarts is not an
option recognized by my kernel. However, this suggests that what I want to
do should be possible.

Does anybody have an idea?

Thanks,
Brice

PS: dmesg shows this
usb 2-1: new full speed USB device using uhci_hcd and address 3 input: �
Symbol Technologies, Inc, 2000 Symbol Bar Code Scanner as
/class/input/input3 input: USB HID v1.10 Keyboard [� Symbol
Technologies, Inc, 2000 Symbol Bar Code Scanner ] on usb-0000:00:1d.0-1
Hi...


I also want to read from barcode reader. I tried to read from it is device descriptor at /dev/input/by-id/kbd. But I am receiving scan code with the original input. Please can you help me to read barcode scanner using hid lib? ...Thanks in advance it will really help me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
read from a USB barcode scanner that simulates a keyboard bricedebrignaisplage Programming 12 12-06-2016 01:14 PM
Debian/SPARC USB keyboard - output to screen not ttya? Komakino Linux - Hardware 0 04-06-2006 04:30 AM
FC4 and Symbol USB Microscan Barcode Scanner MardukKurios Linux - Hardware 0 10-20-2005 04:17 PM
USB Scanner problem: usb 1-2: device not accepting address 3, error -71 lagartoflojo Slackware 1 11-13-2004 04:26 PM
usb scanner bind hp:linusb:002:005 to /dev/usb/scanner0 TroelsSmit Linux - Newbie 5 07-29-2004 06:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration