Asterisk AVM Fritz CAPI Driver Install

AVM Fritz! CAPI driver

Instructions follow on how to install the CAPI driver for the passive AVM Fritz! ISDN card (also known as the BT speedway card in the UK). Installation of the CAPI driver for other AVM card shouldn't be much different.

In SUSE Linux 8.1 or higher an AVM CAPI4Linux driver is already integrated into the operating system, install the AVM ISDN-Controller by using YaST2.

If you use another distro (I use Debian sid, 2.4.24-K7 kernel), do the following:

  • Become root.

  • Download and install your kernel sources, that will be used in the CAPI compilation ($ uname -r for the exact version of your current kernel):

i.e., I use 2.4.24, optimized for K7 CPU:

  1. apt-get install kernel-source-2.4.24
  2. /usr/src# tar -jxvf kernel-source-2.4.24.tar.bz2
  3. apt-get install kernel-headers-2.4.24-1-k7

  • Now, download and unpack the Fritz drivers:

  1. cd /usr/src

  1. wget ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.82/fcpci-suse8.2-03.11.02.tar.gz
  2. tar -xzvf fcpci-suse8.2-03.11.02.tar.gz
  3. cd fritz

  • There are two makefile, the one at /usr/src/fritz level, and the most important in the src.drv subdir.
You need to modify that makefile:

  1. vi src.drv/makefile

you have to replace:
CARD_PATH = /lib/modules/`uname -r`/misc
CARD_PATH = /lib/modules/$(uname -r)/kernel/drivers/isdn/avmb1

then you find some lines about KRNLINCL. You must test using "ls" which is the correct path for the include. I've uncommented the one that works for me:

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

then you have to change:

-D__$(CARD)__ -DTARGET=\"$(CARD)\"

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

(I use -march=K7 since I've a AMD cpu and a K7 optimized kernel)

Save and exit.
Now you have to edit the following file:

  1. vi src.drv/defs.h
and change:

save and exit.
  • Compile the driver using make:

/usr/src/fritz# make

try loading the module as root

  1. modprobe capi
  2. insmod ./fcpci.o
  1. modprobe capi
  2. modprobe fcpci ; some licensing info shows up on the screen
  3. lsmod shows the installed drivers.

if the first modprobe fails the kernel needs recompiling with capi support, see step 1 of the CAPI Installation page

It is possible to install two Fritz Cards in one System, see here for instructions:


Note: Linux 2.6.17 and up kernels require a patch to compile

capi4linux utils

This package provides commands such as "capiinfo" and "capiinit" (this might not be required but it allows checking of the capi driver setup). Install your distro's capi4k-utils package, under debian use:
  1. apt-get install isdnactivecards
or download the source code from ftp://ftp.in-berlin.de/pub/capi4linux/. Don't forget to run makedev.sh in the scripts directory to build the /dev/capi* files after compiling capi4linux. Copy the "capi.conf" from this package to "/etc/capi.conf" and make the following the only uncommented line in the file
fcpci - - - - - -

"capiinfo" seems to work without this file and should print some details about the card;

Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.17-02 (49.18)

Now go on to Step 3 here.
Created by: drbob, Last modification: Fri 05 of Jan, 2007 (02:45 UTC) by samburney
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+