krogloth.de/alex/

ISDN with a passive card under Debian Tutorial


This howto is only for Debian Sarge and 2.4.x kernels!

Index

My system
Requirements
Preparations
The AVM CAPI driver
Capisuite

My system

  • CPU : 1,2 GHz Athlon
  • RAM : 768 MB SDRAM
  • AVM Fritzcard PCI
  • OS : Debian Sarge (stable)
  • Kernel : 2.4.27

Requirements

  • 2.4.x kernel
  • AVM Fritzcard PCI
  • kernel sources and headers

Preparations

First, we install the packages isdnactivecards (even if we use a passive card) and pppdcapiplugin via

apt-get install isdnactivecards pppdcapiplugin

Afterwards we check whether the kernel sources and headers are installed and unpacked in /usr/src/:

gate:/usr/src # ls -l
total 12k
drwxr-xr-x   5 root   src     4.0k Jan 22 17:10 kernel-headers-2.4.27-2
drwxr-xr-x   5 root   src     4.0k Jan 22 17:12 kernel-headers-2.4.27-2-k7
drwxr-xr-x  15 root  root     4.0k Jan 22 17:52 kernel-source-2.4.27
lrwxrwxrwx   1 root   src       20 Jan 22 17:12 linux -> kernel-source-2.4.27
gate:/usr/src #

If this is the case we can download the AVM capi driver (fcpci-suse8.1-03.10.02.tar.gz) from ftp://ftp.avm.de/ and unpacking in /usr/local/src/:

cd /usr/local/src
gzip -d fcpci-suse8.1-03.10.02.tar.gz
tar -xvf fcpci-suse8.1-03.10.02.tar

All driver versions newer than 8.1 won't compile under Debian!

The AVM capi driver

Now we change into the driver directory:

cd /usr/local/src/fritz

Because we want to build our own driver instead of using the pre-compiled version by AVM we must change some things in the file src.drv/makefile of the Fritz package:

KRNLINCL        = /usr/src/kernel-headers-`uname -r`/include
#KRNLINCL        = /lib/modules/`uname -r`/build/include
#KRNLINCL        = /usr/src/linux/include

Then we have to change

DEFINES         = -DMODULE -D__KERNEL__ -DNDEBUG \
                  -D__$(CARD)__ -DTARGET=\"$(CARD)\"
CCFLAGS         = -c $(DEFINES) -O2 -Wall -I $(KRNLINCL)

into

DEFINES         = -DMODULE -DMODVERSIONS -D__KERNEL__ -DNDEBUG \
                  -D__$(CARD)__ -DTARGET=\"$(CARD)\"
CCFLAGS         = -c $(DEFINES) -march=i386 -O2 -Wall -I $(KRNLINCL) \
                -include $(KRNLINCL)/linux/modversions.h

Finally we change lines 29 and 30 in src.drv/tools.c from

#else
#include <linux/malloc.h>

to

/* #else
#include <linux/malloc.h> */

Now we can build and install the driver:

cd /usr/local/src/fritz
make clean
make
make install

The following modules must be added to /etc/modules:

capi
capifs
capidrv
capiutil
fcpci

and are loaded via /etc/init.d/modutils restart. A possibly already loaded Hisax module must be unloaded first, of course. Capi should work this way. We can check this by calling capiinfo. If it works its output should look similar to this:

gate:/root # capiinfo
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.09-10  (48.154)
Serial Number: 1000001
BChannels: 2
Global Options: 0x00000039
   internal controller supported
   DTMF supported
   Supplementary Services supported
   channel allocation supported (leased lines)
B1 protocols support: 0x4000011f
   64 kbit/s with HDLC framing
   64 kbit/s bit-transparent operation
   V.110 asynconous operation with start/stop byte framing
   V.110 synconous operation with HDLC framing
   T.30 modem for fax group 3
   Modem asyncronous operation with start/stop byte framing
B2 protocols support: 0x00000b1b
   ISO 7776 (X.75 SLP)
   Transparent
   LAPD with Q.921 for D channel X.25 (SAPI 16)
   T.30 for fax group 3
   ISO 7776 (X.75 SLP) with V.42bis compression
   V.120 asyncronous mode
   V.120 bit-transparent mode
B3 protocols support: 0x800000bf
   Transparent
   T.90NL, T.70NL, T.90
   ISO 8208 (X.25 DTE-DTE)
   X.25 DCE
   T.30 for fax group 3
   T.30 for fax group 3 with extensions
   Modem

  0100
  0200
  39000000
  1f010040
  1b0b0000
  bf000080
  00000000 00000000 00000000 00000000 00000000 00000000
  01000001 00020000 00000000 00000000 00000000

Supplementary services support: 0x000003ff
   Hold / Retrieve
   Terminal Portability
   ECT
   3PTY
   Call Forwarding
   Call Deflection
   MCID
   CCBS

Capisuite

Install Capisuite via

apt-get install capisuite

To enable it, we have to change in the file /etc/default/capisuite fom "n" to "y":

run_capisuite_daemon=y

Now we start Capisuite calling /etc/init.d/capisuite start and verify that Capisuite is running properly via ps ax |grep capisuite. The configuration of Capisuite is explained using an example config:

/etc/capisuite/answering_machine.conf:

[GLOBAL]
audio_dir="/usr/share/capisuite/"
voice_user_dir="/var/spool/capisuite/users/"
user_audio_files="1"
record_silence_timeout="5"
voice_email_from="capisuite daemon "

[alex]
voice_numbers="123456"			# number to answer (without prefix)
voice_action="MailAndSave"		# MailAndSave / Mail / Save
voice_delay="30"
record_length="60"
voice_email="alex"			# address to mail to 
pin="12"

The file /etc/capisuite/capisuite.conf can stay mostly unganged.

/etc/capisuite/fax.conf

[GLOBAL]
spool_dir="/var/spool/capisuite/"
fax_user_dir="/var/spool/capisuite/users/"
send_tries="10"
send_delays="60,60,60,300,300,3600,3600,18000,36000"
send_controller="1"
outgoing_MSN="123457" 			# number to send from
outgoing_timeout="60"
dial_prefix=""
fax_email_from="capisuite daemon "

[alex]
fax_numbers="123457"			# number to answer (without prefix)
fax_stationID="+49 911 123457"		# number (with prefix)
fax_headline="send by alex"		# headline
fax_email="alex"			# address to mail to 
fax_action="MailAndSave"		# MailAndSave / Mail / Save

All changes take effect without requiring a restart. Further information about Capisuite can be found in the manpages or in the HOWTOs on the net.


If you have any questions or suggestions feel free to write me an email () or join the rrdtool channel (#rrdtool) on the IRCnet.

© by Alexander 'aleex' Krogloth