Previous Next Table of Contents

2. fax

Your modem has to act as a receptionist for incoming calls. DATA gets the login prompt, FAX gets the FAX_machine software. VOICE just makes it more complicated.

This is the job of 'getty', a program that converts serial lines to usable login tty lines. You don't need mgetty, efax is ok.

Jun 17 19:29          686 disc4/apps/comm/fax/efax07a.lsm
Jun 17 19:53        82617 disc4/apps/comm/fax/efax07a.tar.gz
Later I thought I'd go for mgetty. It does audio?
Aug 31 07:03         1342 disc4/system/Serial/mgetty+sendfax-0.98.lsm
Aug 31 14:11       444017 disc4/system/Serial/mgetty+sendfax-0.98.tar.gz

2.1 efax-07a

This is a tiny system at 82K, mgetty weighs 444K (uncompiled).

It builds and installs out of the box. You have to customise ONE file - to set your station-id and other parameters.

You have to

2.2 vi /usr/bin/fax

vi /usr/bin/fax and make at least these changes ...

2.3 Test the fax

The fax test command, will look at your modem, to see that all is OK. Avoid spaces in the phone number, it's confusing with shell.

At first glance, the fonts used in faxes seem quite horrific. This is a problem with the viewer scaling down the image. You will see the difference.

Setup for incoming

It's mostly all done, you just need to print the faxes, or email them to someone (a message is sent, the files remain in /var/spool). Delete files when ??

2.4 fax view

I tried looking at /tmp/fax_out.001 I was not happy.

efix -o pbm -n fax_out.pbm fax_out.001

converted the 20 k g3 file, to a 500 k pbm.

If you don't want to collect .pbm files, you can use .pbm file format for the viewer's stdin.

xv fax_out.pbm

xv displays the 1728 x 2287 pbm in a 'lossy' way, the g3 file is OK, the pmb file is OK, the xv display is fuzzy.

xloadimage fax_out.pbm

This shows that the fonts are crystal clear, which may be too high a resolution for the fax paper, or viewer. Unfortunately I couldn't get xloadimage to read the fax_out.001 file directly, it said the format was not recognised. ie the efix program is needed to convert the file formats.

The same effect happens when efix outputs a .pgm. Its because everbody's library code decimates by 4 and cut lines somewhere.

efix -o pbm fax_out.001 | xloadimage stdin

This is the hottest FAX viewer in town!

efix -o pgm -n fax_out.pgm fax_out.001

This file is a mere 250 K, and the display is worse, it is probaby due to the resolution having taken groups of 4 pixels into grey scales.

/usr/bin/fax view uses pgm as default, this saves switching screen res, but pbm is more readable, albeit bigger than the screen. To avoid creating lots of big .pbm files, I edit /usr/bin/fax to use xloadimage, with the .pbm data travelling through a unix pipe, but not getting stored on the disk.

2.5 URGENT! 50 page postscript document to send NOW!

First you have to create your file, probably using a wordprocessor and postscript output to disk. I used Raven-Issue-One.dvi. You can use netscape to convert .html to .ps, or ghostview, or whatever.

dvips ssr1.dvi

Converted ssr1.dvi to ssr1.ps. And much quicker than I expected.

ghostview ssr1.ps &

With X11 running, this confirmed that the file is a valid postscript file, and preview it for formatting problems.

fax make ssr1.ps

created ssr1.fax.052, ie one page per file in g3 format. Typically 50 K big.

efix -o pbm fax_out.001 | loadimage stdin

This is a high res fax viewer.

fax send 0123-456-7689 ssr1.ps

Hopefully that worked.

hi-res lo-res

FAX has two different vertical reolutions (horizontal is a fixed 204 dpi,

        HI-RES  204 x 196       1728 x 2100 # page length arbitrary
        LO-RES  204 x  96       1728 x 1000 # eg A4, legal, other

fax make -l ssr1.ps

According to the /usr/bin/fax script, HI-RES is the default. Just to prove a point try adding the -l after fax make.

Switching to .pbm for fax view

If .pgm files are the right size, but unacceptable for detail, you can make .pbm your default viewer, by editing the /usr/bin/fax script.

Of course when the library is fixed, you may wish to change it back.

Viewing postscript pictures

Whilst playing, look in /usr/lib/ghostscript/examples. fax make just calls ghostscript which does the conversion, but it shows how colour pictures get converted.

It is easier to use ghostview directly.

mgetty+sendfax-0.98.tar.gz

This untars to it's own relative dir. It's got it's own license. All the docs are in (or start at) ./doc/mgetty.texti-in, including documentation for packages such as voice support.

I decided to go for efax first, but it is an alternative.


Previous Next Table of Contents