Conexant fax-modem configuration

In the process of sending a fax in ubuntu on my Dell D820 I did not expected at all that the bigest problem would be getting the modem driver to work. I guess I forgot the old days of linux driver configuration. So, after loosing almost an hour with the linuxant “free” drivers which do not allow fax and the dell free drivers which somehow managed to kill my sound I finally found the solution on ubuntu site which solved the problem and I got both modem and sound back.

efax-gtk and efax

First try was using the efax-gtk interface which actually did the trick immediately with almost no hassle at all and sent a pdf file as a fax. However my goal was to do the same from the command line. This was a bit more complicated and involved the following steps:

1. generating a postscript .ps file. This was easy because the .pdf file was generated by openoffice so I just printed it “to file”. This generated a nice .ps file. As an alternative the pdf2ps command could have been used:

pdf2ps test_fax.pdf

2. creating a tiffg3 file from the .ps file. Following the efax manual I arrived a this wonderfull command:

gs -q -sDEVICE=tiffg3 -dNOPAUSE -sOutputFile=fax.%02d test_fax.ps </dev/null

which generated a fax.01 file from my 1 page .pdf file.

I lost some time in the process with the following error:

gs -q -sDEVICE=tiffg3 -dNOPAUSE -sOutputFile fax.%03d test_fax.ps </dev/null
Error: /undefinedfilename in (fax.%03d)
Operand stack:

Execution stack:
 %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
 --dict:1149/1684(ro)(G)--   --dict:0/20(G)--   --dict:69/200(L)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.64: Unrecoverable error, exit code 1

which I finally debuged with strace:

open("/usr/share/ghostscript/fonts/fax.%03d", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/var/lib/defoma/gs.d/dirs/fonts/fax.%03d", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/cups/fonts/fax.%03d", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/ghostscript/fonts/fax.%03d", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/ghostscript/fonts/fax.%03d", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/fonts/fax.%03d", O_RDONLY) = -1 ENOENT (No such file or directory)

Trying to find a fax.%03d font ? Just a typo in

-sOutputFile fax.%02d
-sOutputFile<strong>=</strong>fax.%02d

3. using efax to send the fax.01 file:

efax -d /dev/ttySHSF0 -h 'Test fax %d/%d' -k 'Z &FE&D2S7=120 &C0 M1L2 S11=55' -l "+40211111111" -o 1 -t 'T0211111111' fax.01

This worked without any problem and the fax was sent succesfully:

efax -d /dev/ttySHSF0 -h 'Test fax %d/%d' -k 'Z &FE&D2S7=120 &C0 M1L2 S11=55' -l "+40211111111" -o 1 -t 'T0211111111' fax.01
efax: Sun Sep 20 10:19:13 2009 efax v 0.9a-001114 Copyright 1999 Ed Casasefax: Sun Sep 20 10:19:13 2009 efax v 0.9a-001114 Copyright 1999 Ed Casas
efax: 19:13 compiled Jun 21 2006 05:59:09
efax: 19:13 opened /dev/ttySHSF0
efax: 19:13 using hsfmodem-7.68.00.09oem in class 1
efax: 19:13 dialing T0211111111
efax: 19:55 connected
efax: 19:56 received NSF - answering features
efax: 19:57 received CSI - answering ID
efax: 19:57 remote ID ->
efax: 19:57 received DIS - answering capabilities
efax: 19:57 remote has no document(s) to send, and can receive
efax: 19:57 local   196lpi 14.4kbps 8.5"/215mm  any   1D    -     -  0ms
efax: 19:57 remote  196lpi 14.4kbps 8.5"/215mm  any   2D ECM-64   -  10/5ms
efax: 19:57 session 196lpi 14.4kbps 8.5"/215mm  any   1D    -     -  5ms
efax: 19:57 sent TSI - caller ID
efax: 19:59 sent DCS - session format
efax: 20:03 sent TCF - channel check of 2700 bytes
efax: 20:04 received CFR - channel OK
efax: 20:05 header:[Test fax 1/1]
efax: 21:00 sent 20+2156 lines, 97495+1189 bytes, 55 s  14354 bps
efax: 21:00 sent EOP - done
efax: 21:03 received MCF - page OK
efax: 21:03 sent -> fax.001
efax: 21:03 sent DCN - disconnect
efax: 21:05 done, returning 0 (success)

That’s it, sending a fax.