Not knowing that this would cause some problems, I started to get a small fax server running in the office. We had a RedHat 9 server and a passive AVM ISDN card (Fritz PCI) available.
Accepting that the passive AVM cards need CAPI to receive faxes, I was surprised seeing CAPI support compiled into the RH9 kernel. The required binaries are found in the isdn4k-utils package (use them, not the ones coming with capi4-utils).
First you need to stop the ISDN service. Best use chkconfig --del isdn (if you use your isdn card to connect to the internet or as an answering machine, you are most likely get a conflict between these services).
The next step is to download the appropriate CAPI driver from AVM, they are available from their ftp-server, choose your card type and install the latest sources (I simply took the latest release for Suse 8.2, which seem to work fine for RedHat).
Install the kernel-sources package and the isdn4k-utils-devel and type make all in the driver’s source directory (the available install-script seems not to work on RH9).
Then copy the driver (here fcpci.o) to /lib/modules/<your kernel>/misc/
Now, CAPI needs to know what driver to use, edit /etc/capi.conf and prefix all lines with a '#' to comment them out and append one line with the drivers name and 6 dashes in the columns (probably this is different for your card).
Here is how it looks on my installation:
# card file proto io irq mem cardnr options fcpci – – – – – -
Startup CAPI using the command capiinit start (you are tainting the kernel right now, ignore it).
To make capi a permanent feature on your system, write a script to call capiinit start and capiinit stop. Mine looks like the following (a quick hack):
#!/bin/sh # Startup script for capi # # chkconfig: 2345 85 15 # description: Calls capiinit # # Source function library. . /etc/rc.d/init.d/functions [ -f /sbin/capiinit ] || exit 0 prog="capiinit" start() { echo -n $"Starting $prog: " capiinit start RETVAL=$? echo return $RETVAL } stop() { echo -n $"Stopping $prog: " capiinit stop echo RETVAL=$? return $RETVAL } case "$1" in start) start ;; stop) stop ;; status) echo "status not implemented" ;; restart) stop start ;; condrestart) echo "condrestart not implemented" ;; *) echo $"Usage: $0 {start|stop}" exit 1 esac exit 0
Put this script into /etc/rc.d/init.d/capi and install it using chkconfig --add capi.
So, now that we have the first part running, we are ready to take the next one. At first install the current Hylafax version (available at www.hylafax.org). The basic installation should work as expected.
Now, to make Hylafax work with CAPI, you need the Hylafax CAPI support executables (c2faxsend and c2faxrecv). Download the sources from ftp.avm.de.
Before compiling them, change the following (there is a bug in the c2faxsend source, which seems RedHat specific):
line 436 of src/faxsend/sendmain.cpp must be changed from
sem_wait(&syncsema);
to
while(sem_wait(&syncsema) && errno = EINTR);
Additionally add the line
#include <errno.h>Compile the sources using ./configure and make, and install them using make install.
Now continue the configuration of Hylafax like described at www.hylafax.org.
Here the settings I needed to change in the config.faxCAPI:
SpoolDir: /var/spool/hylafax HylafaxDeviceName: capi20
Additionally I added the following line to my inittab:
fr:45:once:/usr/local/bin/c2faxrecv -q "/var/spool/hylafax"
So I hope you get this running on your machine. I needed to make some changes to the /var/spool/hylafax/bin/faxrcvd script to get the emails delivered with the attachments in the correct format. Additionally I installed the CUPS printer script salsafax to enable printing from Windows boxes via Samba. Here the only fileformat working was Postscript using the Adobe Distiller Postscript driver.
I wish you a happy faxing.
Comments
hello
very cool realy thanks….evden eve nakliyat