Hylafax en Ubuntu

De GALPon WiKi
Saltar a: navegación, buscar

Documento creado por capri99 (Carlos Rodríguez). Cualquier aportación será bienvenida :-)

Después de haber configurado el módem SmartLink PCI que tengo, me decido a configurar el hylafax para poder enviar faxes por la línea de teléfono convencional.

Aunque este COMO está hecho desde Ubuntu, se puede extrapolar a cualquier distribución de GNU/Linux fácilmente.

Instalo los paquetes necesarios con sus correspondientes dependencias

sudo apt-get install hylafax-server hylafax-client hylafax-doc

Después de la instalación de los paquetes necesarios, comienza automáticamente la configuración del hylafax-server:

Configurando hylafax-server (4.2.5-1) ...
Adding system user `faxmaster'...
Adding new group `faxmaster' (114).
Adding new user `faxmaster' (114) with group `faxmaster'.
Not creating home directory `/var/spool/hylafax'.
Setup program for HylaFAX (tm) 4.2.5.
Created for i686-pc-linux-gnu on Mon Jan 16 17:09:50 UTC 2006.
Looks like /usr/bin/base64-encode supports base64 encoding.
Checking system for proper server configuration.
Warning: /etc/hylafax/getty-link does not exist or is not an executable program!
The file:
    /etc/hylafax/getty-link
does not exist or this file is not an executable program.  The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error.  If the
program resides in a different location and you do not want to
install a symbolic link for /etc/hylafax/getty-link that points to your program
then you must reconfigure and rebuild HylaFAX from source code.

Warning: /etc/hylafax/vgetty-link does not exist or is not an executable program!
The file:
    /etc/hylafax/vgetty-link
does not exist or this file is not an executable program.  The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error.  If the
program resides in a different location and you do not want to
install a symbolic link for /etc/hylafax/vgetty-link that points to your program
then you must reconfigure and rebuild HylaFAX from source code.
Warning: /etc/hylafax/egetty-link does not exist or is not an executable program!
The file:
    /etc/hylafax/egetty-link
does not exist or this file is not an executable program.  The
HylaFAX software optionally uses this program and the fact that
it does not exist on the system is not a fatal error.  If the
program resides in a different location and you do not want to
install a symbolic link for /etc/hylafax/egetty-link that points to your program
then you must reconfigure and rebuild HylaFAX from source code.
Make /var/spool/hylafax/bin/ps2fax a link to /var/spool/hylafax/bin/ps2fax.gs.
Make /var/spool/hylafax/bin/pdf2fax a link to /var/spool/hylafax/bin/pdf2fax.gs.
Update /var/spool/hylafax/status/any.info.
        HylaFAX configuration parameters are:
        [1] Init script starts faxq:            yes
        [2] Init script starts hfaxd            yes
        [3] Start old protocol:                 no
        [4] Start paging protocol:              no
Are these ok [yes]?
Modem support functions written to /var/spool/hylafax/etc/setup.modem.
Configuration parameters written to /var/spool/hylafax/etc/setup.cache.
Restarting HylaFAX server processes.
You do not appear to have any modems configured for use.  Modems are
configured for use with HylaFAX with the faxaddmodem(8) command.
Do you want to run faxaddmodem to configure a modem [yes]?
Done verifying system setup.
Creating /etc/hylafax/setup.cache from /var/spool/hylafax/etc/setup.cache.
Creating /etc/hylafax/setup.modem from /var/spool/hylafax/etc/setup.modem.
/var/spool/hylafax
Stopping HylaFAX daemons: faxq(not running) hfaxd(not running) faxgetty.
+ /bin/cp -a "/etc/hylafax/setup.cache" "/var/spool/hylafax/etc/setup.cache"
Starting HylaFAX daemons: faxq hfaxd faxgetty.

Tal y como nos indica, no hemos configurado aún nuestro módem. Para ello nos comenta que empleemos el comando faxaddmodem.

sudo faxaddmodem

Y nos pregunta en qué puerto está el modem escuchando (en mi caso es el ttySL0):

Serial port that modem is connected to [ttyS0]? ttySL0

Ya en este momento nos preguntará diferentes datos necesarios para poder enviar faxes como prefijos, número nuestro, algún código que identifique nuestro fax, etc. En aquellas preguntas en las que no modifico la opción por defecto (la que está entre corchetes) simplemente le doy al Intro o Return para aceptar.

Ok, time to setup a configuration file for the modem.  The manual
page config(5) may be useful during this process.  Also be aware
that at any time you can safely interrupt this procedure.
Reading scheduler config file /var/spool/hylafax/etc/config.
No existing configuration, let's do this from scratch.
Country code [1]? 34
Area code [415]? 91
Phone number of fax modem [+1.999.555.1212]? +34.91.234.5678
Local identification string (for TSI/CIG) ["NothingSetup"]? Pepito-de-los-palotes
Long distance dialing prefix [1]? 0 
International dialing prefix [011]? 00
Dial string rules file (relative to /var/spool/hylafax) [etc/dialrules]?
Tracing during normal server operation [1]?
Tracing during send and receive sessions [11]? 
Protection mode for received facsimile [0600]?
Protection mode for session logs [0600]?
Protection mode for ttySL0 [0600]?
Rings to wait before answering [1]? 10
Modem speaker volume [off]?
Command line arguments to getty program ["-h %l dx_%s"]?
Pathname of TSI access control list file (relative to /var/spool/hylafax) [""]?
Pathname of Caller-ID access control list file (relative to /var/spool/hylafax) [""]?
Tag line font file (relative to /var/spool/hylafax) [etc/lutRS18.pcf]?
Tag line format string ["From %%l|%c|Page %%P of %%T"]?
Time before purging a stale UUCP lock file (secs) [30]?
Hold UUCP lockfile during inbound data calls [Yes]?
Hold UUCP lockfile during inbound voice calls [Yes]?
Percent good lines to accept during copy quality checking [95]?
Max consecutive bad lines to accept during copy quality checking [5]?
Max number of pages to accept in a received facsimile [25]?
Syslog facility name for ServerTracing messages [daemon]?
Set UID to 0 to manipulate CLOCAL [""]?
Use available priority job scheduling mechanism [""]? 
The non-default server configuration parameters are:
CountryCode:            34
AreaCode:               91
FAXNumber:              +34.91.234.5678
LongDistancePrefix:     0
InternationalPrefix:    00
DialStringRules:        etc/dialrules
SessionTracing:         11
RingsBeforeAnswer:      10
SpeakerVolume:          off
GettyArgs:              "-h %l dx_%s"
LocalIdentifier:        Pepito-de-los-palotes
TagLineFont:            etc/lutRS18.pcf
TagLineFormat:          "From %%l|%c|Page %%P of %%T"
MaxRecvPages:           25
Are these ok [yes]? yes

Ahora procederá a ponerse en contacto con el módem para ver qué capacidades tiene:

Now we are going to probe the tty port to figure out the type
of modem that is attached.  This takes a few seconds, so be patient.
Note that if you do not have the modem cabled to the port, or the
modem is turned off, this may hang (just go and cable up the modem
or turn it on, or whatever).
Probing for best speed to talk to modem: 38400 OK.
About fax classes:
The difference between fax classes has to do with how HylaFAX interacts
with the modem and the fax protocol features that are used when sending
or receiving faxes.  One class isn't inherently better than another;
however, one probably will suit a user's needs better than others.
Class 1 relies on HylaFAX to perform the bulk of the fax protocol.
Class 2 relies on the modem to perform the bulk of the fax protocol.
Class 2.0 is similar to Class 2 but may include more features.
Class 1.0 is similar to Class 1 but may add V.34-fax capability.
Class 2.1 is similar to Class 2.0 but adds V.34-fax capability.
HylaFAX generally will have more features when using Class 1/1.0 than
when using most modems' Class 2 or Class 2.0 implementations.  Generally
any problems encountered in Class 1/1.0 can be resolved by modifications
to HylaFAX, but usually any problems encountered in Class 2/2.0/2.1 will
require the modem manufacturer to resolve it.
If you're unsure and your modem supports it, use Class 1.
Hmm, this looks like a Class 1 modem.
Product code (ATI0) is "SmartLink Soft Modem".
Other information (ATI3) is "/dev/slamr0".
DTE-DCE flow control scheme [default]?
Modem manufacturer is "Unknown".
Modem model is "Unknown".
Using prototype configuration file class1...

A pesar de que ha detectado el módem correctamente, no encuentra una configuración "prototipo" para controlarlo. En principio nuestro módem debería cumplir con los comandos típicos de Hayes, por lo que le damos a aceptar en todas las preguntas. Lo ideal es configurar este apartado con el manual del módem.

There is no prototype configuration file for your modem, so we will
have to fill in the appropriate parameters by hand.  You will need the
manual for how to program your modem to do this task.  In case you are
uncertain of the meaning of a configuration parameter you should
consult the config(5) manual page for an explanation.
Note that modem commands must be specified exactly as they are to be
sent to the modem.  Note also that quote marks (") will not be displayed
and will automatically be deleted.  You can use this facility to supply
null parameters as "".
Finally, beware that the set of parameters is long.  If you prefer to
use your favorite editor instead of this script you should fill things
in here as best you can and then edit the configuration file
"/var/spool/hylafax/etc/config.ttySL0"
after completing this procedure.
Command to enter Class 1 [AT+FCLASS=1]?
Command to stop and wait prior to sending PPM [AT+FTS=7]?
Command to stop and wait prior to sending TCF [AT+FTS=7]?
Command to stop and wait prior to sending EOP [AT+FTS=9]?
Extra bytes in a received HDLC frame [4]?
Maximum time to wait for OK after aborting a receive (ms) [200]?
Maximum wait for initial identification frame (ms) [40000]?
Delay after completing training (ms) [200]?
Command to ensure silence after receiving HDLC and before sending [AT+FRS=7]?
Delay after failed training (ms) [1500]?
The modem configuration parameters are:
Class1Cmd:              AT+FCLASS=1
Class1PPMWaitCmd:       AT+FTS=7
Class1TCFWaitCmd:       AT+FTS=7
Class1EOPWaitCmd:       AT+FTS=9
Class1FrameOverhead:    4
Class1RecvAbortOK:      200
Class1RecvIdentTimer:   40000
Class1SendMsgDelay:     200
Class1SwitchingCmd:     AT+FRS=7
Class1TCFMaxNonZero:    10
Class1TCFMinRun:        1000
Class1TrainingRecovery: 1500

Are these ok [yes]?

Aceptando la configuración por defecto, nos crea los archivos correspondientes:

Creating new configuration file /var/spool/hylafax/etc/config.ttySL0...
Creating fifo /var/spool/hylafax/FIFO.ttySL0 for faxgetty... done.
Done setting up the modem configuration.
Checking /var/spool/hylafax/etc/config for consistency...
...everything looks ok; leaving existing file unchanged.
Don't forget to run faxmodem(8) (if you have a send-only environment)
or configure init to run faxgetty on ttySL0.
Creating /etc/hylafax/config.ttySL0 from /var/spool/hylafax/etc/config.ttySL0.
/var/spool/hylafax/config

Finalmente nos indica que ejecutemos faxmodem ttySL0 para que hylafax pueda enviar faxes a través de él.