Skip to content

Capture text from a parallel printer port to a file.

Notifications You must be signed in to change notification settings

EvansMike/LPT-Capture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LPT Capture

Capture text from a parallel port to a file, then convert that to a LibreOffice document. Assumes that the format is plain text.

This was written to capture the parallel print output from a Megger used for PAT. It will likely work for other legacy devices with parallel LPT ports.

This consists of hardware/firmware in /firmware and PC, Linux, software in /userware.

Micro controller code is C AVR not Arduino. To make the firmware:

cd firmware
make install

To build and install. Edit the Makefile for your favourite installer tool.

First build your device using the schematic.

I used perf-board and wires since the wiring is very simple. Resistor values are 1K but other values around this may work too. No resistors at all will also work but may expose your parallel port to currents it can’s handle. There should probably be voltage spike protection too with suitable diodes and/or a buffer chip.

Compile the pc side utility with:

cd userware
make install

How to Use

  • Plug it in to the port you want to capture from and a USB cable.

  • Press Print on the device, a Megger AV4 in my case. It should wait until a printer becomes attached

  • Do:

lpt_capture /dev/ttyUSB0 report.fodt

Command line arguments are input port and output file name.

Then don’t open the output file.

Or rather use the LPT.log file as the printfile.fodt wil be empty because this doesn’t work and I can’t remember why anymore.

////[source, bash] ////libreoffice printfile.fodt

To open the file in LibreOffice Writer. Or you can do all that mouse clicky malarky in your GUI.

Enjoy. Also post bugs and improvements.

This was really a one off for some specific data I need to liberate. I need to make it more generic.

Maybe.

I guess this could realistically convert direct to PDF but using LibreOffice to check and edit the output is a useful intermediate step. LibreOffice can do the conversion directly with:

libreoffice7.0 --headless --convert-to pdf printfile.fodt

About

Capture text from a parallel printer port to a file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published