Linbar - the Linux driver for serial barcode
This page was visited (who knows anymore ? ) times
since 30 Jul 1998
This is a very OBSOLETE piece of code, from the previous millennium!!
I'm not even sure if it works with the new Linux kernels.
It is here for emotional reasons, to remind me the old days, when I had time to write code and enjoy it.
linbar is a driver for barcode readers connected on serial
Actually it reads from the specified device and puts any
characters to the keyboard buffer of a Linux console. It works
only for the Linux console ttys.
Of course you can use it for many proposes (let say to
control the console with a serial port), but the primary thought was for
reading barcode labels.
(For the history : my plane was to have about 10 POS diskless Linux
terminals -boot to Linux with a bootdisk, rlogin to server- with barcode
readers on them. What a speed !!!!. That was 1997, 1998 and we used to make our own mini-linux bootable floppies :) )
You can use any serial port , and you can also have multiply
readers the same time.
Linbar is (C) 1998-2003 Ioannis
Ioannou , and it is released under the conditions
of GPL version
2 or later.
Where to get it
linbar [parameters] [&]
Optional parameters are :
-T output tty default /dev/tty0
-t input tty default /dev/ttyS0
-d data bits default 8
-p parity default
-b stop bits default 1
-c cut off cr default no
-n cut off nl default no
-l log messages default no
-D enable debug messages
-h this help screen
for example :
at ttyS0, 9600 8N1
(?) at ttyS1 38400 7E2
linbar -t /dev/ttyS1 -s 38400 -d 7 -p E -b 2 &
debug the driver
(note that it runs in the foreground)
This link always points to the latest version
(currently 0.5) :
Arrrg!!!! My hosting server keeps deleting the zip file!!! Email me if you really need it!!
There used to be Contrib directory - with an X linbar version for xterm, contributed by Simon Falvey, but after many years I lost it. Maybe if you Google it you can find it in an old mirror of argeas.cs-net.gr
0.5 NOTES :
Mainly a bug fix release, no consept changes from 0.4.
Sorry but I don't have time for linbar, and since 1999 I have stoped working
with projects that use bar-code readers. As the matter of fact these days
(in the case I had time) I would re-wrote the hole thing in perl without
linserial and g++ - anyway....
PLS. Don't ask me to recomment to you barcode readers, barcode decoding
programms, etc. I don't know anything about.
It uses the TIOCSTI call to pass the characters
into the keyboard buffer, so it must be run by root (or suid root).
Starting, exiting and any problems are NO MORE (since version
0.3) logged as LOG_DAEMON thru the syslog by default. I have noticed
a drammatical decrease in the speed , so if you realy need this option
you have to define it in the command line (option -l).
I haven't search for any security flaws. The program must
be run suid root, so be careful.
It uses a modified version of libSerial library made by Linas
Vepstas . The library sources are included.
BTW we all thank you Linus :-)