> Duplex is not an issue as this is a dumb, text only printer.
If the baud rate isn't too high, then call the guys at
www.bb-europe.com (they're located near Galway) and ask
for one of these:
http://www.bb-europe.com/product.asp?dept%5Fid=13&sku=232CDT
(There's also a slightly cheaper 9-pin version.) Simply
insert this into the serial line to the printer and connect
your linux box to the tap connector.
Then do something like:
cat /dev/ttyS0 > printer.log
If the data is too fast and you get dropouts in printer.log, then
just get a faster linux box.
A more "production version" would something along the lines of
/usr/local/bin/printlog
#!/bin/sh
mkdir -p /var/log/printlog
chmod 700 /var/log/printlog
echo $$ > /var/run/printlog.pid
cat /dev/ttyS0 > /var/log/printlog/`date "+%Y-%m-%d-%H:%M:%S"`.log
And then an entry in /etc/cron.daily that does
#!/bin/sh
kill -INT `cat /var/run/printlog.pid`
/usr/local/bin/printlog &
to rotate the logs (or use logrotate instead)
Later,
Kenn
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!