fax without hassle!

Introduce yourself, create test postings or talk nonsense
Post Reply
jessejazza
Posts: 5
Joined: 26. Jan 2013, 22:08

fax without hassle!

Post by jessejazza »

Just in case anyone has a spare serial modem and wants a use for it - i find being able to fax very useful if i don't have an email address to hand or want to send a letter to be read by perhaps several folk in an office (which wouldn't work with an email to an individual). I found it important to allow for flow control and explicitly state the modem class contrary to manpages and website info - otherwise quality won't be quite what you hoped. I hope the following is of interest for those that wish to give the redundant dial up modem a new lease of life - i wouldn't be without it! The following was done on xubuntu when i was using it (just in case someone notices something that could be different on Salix (can't think of anything though!)). I think it's easy to follow but let me know of anything that needs clarification. This is only for sending as i use an efax number (an alternative provider like Faxtastic and others an alternative) to receive faxes as they can be sent while the computer is off :lol: so it makes sense to just send from the computer imo. hth

*********

Not able to follow all info given in the .efax-gtcrc and .efaxrc i just sent a fax to see what i got using the options in efax manpage. The script 'fax' and efax-gtk are frontends so to me efax with options seemed an easier route first. The efax-gtk seemed to have several releases, some didn't work so i didn't want to rely on it. I found the only use i saw for 'fax' was the 'fax make' command for the splitting up of the ps file into the number of pages. I use Evince for reading tif and ps files as it's a document reader not just pdf viewer.

To send a fax one's got to convert to a ps (using cups or pdf2ps), break that up into separate pages (fax make file.ps) and then send those using device, telephone number and ps file.

james@james:~/Desktop$ efax -d /dev/ttyS0 -tT0018108212980 rowing.ps.001 rowing.ps.002
efax: Tue Jan 15 10:27:44 2013 efax v 0.9a-001114 Copyright 1999 Ed Casas
efax: Tue Jan 15 10:27:44 2013 efax v 0.9a-001114 Copyright 1999 Ed Casas
efax: 27:44 compiled Jun 21 2006 05:59:09
efax: 27:44 opened /dev/ttyS0
efax: 27:45 using BT Enabler Fax Modem VER 4.07 V.92 BT Enabler Fax Modem VER 4.07 V.92 BT Enabler Fax Modem VER 4.07 V.92 in class 2
efax: 27:45 dialing T0018108212980
efax: 28:01 remote ID -> " 18108212980"
efax: 28:01 connected
efax: 28:08 session 196lpi 14.4kbps 8.5"/215mm any 1D - - 0ms
efax: 28:08 header:[Tue 15 Jan 2013 10:27:44 GMT P. 1]
efax: 29:22 Warning: EOF before RTC
efax: 29:24 sent 20+2291 lines, 143356+0 bytes, 76 s 15090 bps
efax: 29:24 Error: flow control did not work
efax: 29:28 sent -> rowing.ps.001
efax: 29:28 header:[Tue 15 Jan 2013 10:27:44 GMT P. 2]
efax: 30:26 Warning: EOF before RTC
efax: 30:28 sent 20+2291 lines, 112414+0 bytes, 60 s 14988 bps
efax: 30:28 Error: flow control did not work
efax: 30:33 sent -> rowing.ps.002
efax: 30:34 done, returning 0 (success)

To test i chose to fax a sheet with diagrams and one of text.
Fax was a diagram of my rowing machine instructions p1 and p2 and the efax manpage.

This resulted in three issues to solve - perhaps just applicable to my modem.

a] Warning: EOF before RTC

Ed Casas replied when i emailed
"The warning means that the software that created the fax file (presumably ghostscript in this case) did not append the 'RTC'sequence to the end of the image data. efax (and/or the Class 2 modem) will append the RTC sequence itself. This is not really a bug in ghostscript as there is no standard for fax image files."

b] Series 2 modem and although the manpage claims Series 2 modems are default it would seem sensible to use the -o2 option to explicitly force it's use

c] Flow control not working as intended it would seem so use the -oh option to resolve

Perhaps worth looking at the options list (i was only interested in sending as i receive from efax through my email inbox).

-a (not required for most modems)
-c (not required for most modems)
-d /dev/ttyS0
-f (ignore leave as default)
-g (ignore as not receiving calls)
-h (ignore default will provide phone number and page numbers)
-i (ignore)
-j (ignore)
-k (ignore)
-i (ignore)
-o (explicitly force the use of class 2 and flow control)
[for Class 2 modem and flow control; hardware RTS/CTS and software XON/XOFF. Use options -o2 and -oh.]
-q (ignore)
-r (ignore)
-s (ignore)
-t number to be dialled - prefix number by T for Tone (don't think in fact required these days in UK anyway)
-v (ignore)
-w (ignore)
-x (ignore)

Looking at the list after reading the efax manpage very few options are in fact required for sending. The 196lpi 'fine' is also default and no intialisation code needs to be sent.

For me those were the three issues easily solved. Note the cli changes for the second attempt for the rowing machine (i didn't post the manpages).

james@james:~/Desktop$ efax -d /dev/ttyS0 -o2h -tT0018108212980 rowing.ps.001 rowing.ps.002
efax: Tue Jan 15 10:31:23 2013 efax v 0.9a-001114 Copyright 1999 Ed Casas
efax: Tue Jan 15 10:31:23 2013 efax v 0.9a-001114 Copyright 1999 Ed Casas
efax: 31:23 compiled Jun 21 2006 05:59:09
efax: 31:23 opened /dev/ttyS0
efax: 31:23 using BT Enabler Fax Modem VER 4.07 V.92 BT Enabler Fax Modem VER 4.07 V.92 BT Enabler Fax Modem VER 4.07 V.92 in class 2
efax: 31:24 dialing T0018108212980
efax: 31:50 remote ID -> " 18108212980"
efax: 31:50 connected
efax: 31:57 session 196lpi 14.4kbps 8.5"/215mm any 1D - - 0ms
efax: 31:57 header:[Tue 15 Jan 2013 10:31:23 GMT P. 1]
efax: 33:14 Warning: EOF before RTC
efax: 33:17 sent 20+2291 lines, 143351+0 bytes, 80 s 14335 bps
efax: 33:21 sent -> rowing.ps.001
efax: 33:21 header:[Tue 15 Jan 2013 10:31:23 GMT P. 2]
efax: 34:20 Warning: EOF before RTC
efax: 34:23 sent 20+2291 lines, 112409+0 bytes, 62 s 14504 bps
efax: 34:29 sent -> rowing.ps.002
efax: 34:29 done, returning 0 (success)

Spot the difference; note the rowing machine beam appears broken and on the manpage in the centre lines are mixed up. (didn't list the terminal output for the manpages).

Image

Image

Image

Image

Thus for sending one needs to state modem class and required flow control - that's all depending on one's modem of course. It's that simple and not really worth spending time on efax-gtk imo.

To make life easier worth adding an alias to .bash_aliases
alias jfax='efax -d /dev/ttyS0 -o2h -tT' is now in mine

Then one's terminal commands simply becomes
jfax number faxfile.ps.* (worth using a wildcard to save typing in each page).

That's the route i'd recommend and i hope what i've done is helpful to folk sometime. (I'd welcome any corrections/advice - i'm not that IT knowledgeable i just experimented).
Post Reply