[Wlug] Seeking help with a USB barcode scanner

Andy Stewart andystewart at comcast.net
Mon Apr 2 18:03:33 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Keller wrote:
> This is what I would do.
> 
> 1. Install "lsusb".  It behaves much like lspci so you can what devices
> are on your system.
> 
> When you do a "lsusb" it'll list what devices are hanging off of each
> USB bus. Do a before and after so you can see the major/minor numbers.
> 
> 2. When you know the devices major and minor number you can write a
> program using libusb that'll look for the device, open the device if it
> exists,  take posession of it and then read data to and from it, hopefully.
> http://libusb.sourceforge.net/doc/examples-code.html
> 
> Looking at that example, I don't think it would be too hard to whip up a
> program to open the device and then loop until there's input and then
> dump it on the screen.
> 
> Thanks,
> Tim.

HI Tim,

Thanks for the tip about libusb.  I have lsusb installed, and I also
have usbview.

I'm surprised that I can't find the proper thing to "cat" to see output
from the barcode reader.  That would be the shell equivalent of what you
propose.  If I could find that, I'd be in business.  I'm 99% certain
that I'm looking in the right place.  Now, I wonder if it is possible
that the barcode reader is defective.......hummmmm.

Once I find the right file to "cat", whipping up a program to grab the
bytes and deal with them would be fairly trivial, I agree.

Thanks!

Andy


- --
Andy Stewart, Founder
Worcester Linux Users' Group (http://www.wlug.org)
Chelmsford Linux Meetup Group (http://linux.meetup.com/393)
Amateur Radio:  KB1OIQ
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGEX21Hl0iXDssISsRAhhCAJ9Y4iidL2WKRRyAqMFz06c1Nbd7yQCffu6p
2XTWxxQuiKaj27rVAGw9HxY=
=Q0Ie
-----END PGP SIGNATURE-----


More information about the Wlug mailing list