login | register
Tue 02 of Dec, 2008 [02:44 UTC]

voip-info.org

Discuss [6] History

Asterisk AVM Fritz CAPI Driver Install

Created by: drbob,Last modification on Fri 05 of Jan, 2007 [02:45 UTC] by samburney

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:


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

  • Now, download and unpack the Fritz drivers:


# cd /usr/src

# wget ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.82/fcpci-suse8.2-03.11.02.tar.gz
# tar -xzvf fcpci-suse8.2-03.11.02.tar.gz
# 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:

# vi src.drv/makefile

you have to replace:
 CARD_PATH       = /lib/modules/`uname -r`/misc
with
 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
#KRNLINCL        = /lib/modules/`uname -r`/build/include
#KRNLINCL        = /usr/src/linux/include

then you have to change:



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

with:
DEFINES = -DMODULE -DMODVERSIONS -D__KERNEL__ -DNDEBUG \
                 -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:

# vi src.drv/defs.h
and change:
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
with
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)

save and exit.
  • Compile the driver using make:

/usr/src/fritz# make

try loading the module as root

# modprobe capi
# insmod ./fcpci.o
or
# modprobe capi
# modprobe fcpci     ; some licensing info shows up on the screen
# 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:

http://www.quiss.org/caiviar/Two-Fritzcards-HOWTO
http://amatisoft.homelinux.com/atswiki/MultipleFritzPCI

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:
# 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)
etc...



Now go on to Step 3 here.

Comments

Comments Filter
222

333Tutorial of how to install Fritz ISDN card in Trixbox

by ivanoiu, Sunday 04 of May, 2008 [16:22:44 UTC]
I wrote down a small tutorial on my blog in which I describe how to install a fritz card on trixbox. Here it is: http://www.ivanoiu.com/avm-isdn-fritz-card-pci-on-trixbox-asterisk/
222

333

by izan, Monday 05 of June, 2006 [13:08:18 UTC]
You dont speak about the firmware
Is the firmware needed for the Fritz! card ??
Where you must place it?
Thank you
222

333Re: make is going wrong

by , Tuesday 25 of January, 2005 [12:11:34 UTC]
problem is solved by buying an active AVM card.
222

333make is going wrong

by pieteralje, Monday 10 of January, 2005 [14:35:36 UTC]
Help!! I'm trying to set up my AVM fritz, but I can't come true the part on this page. (:redface:) I'm newbee on Debian and Linux, so I'm not really now what i'm doing. When i'm executing "make" the system says : debian:/usr/src/fritz# make
(cd src.drv; make CARD=fcpci)
make1: Entering directory `/usr/src/fritz/src.drv'
makefile:29: *** ontbrekend scheidingsteken. Stop. -->(divorse sign ??!!)
make1: Leaving directory `/usr/src/fritz/src.drv'
make: *** drv Fout 2

Who can help me???! (:cry:)


222

333Re: apt-get install kernel-source-2.4.24 with fedora ?

by , Tuesday 02 of November, 2004 [07:55:53 UTC]
apt-get is for debian OS, for fedora i guess you should check the rpm for the headers and sources ;-)
222

333apt-get install kernel-source-2.4.24 with fedora ?

by , Thursday 14 of October, 2004 [02:12:31 UTC]
  1. apt-get install kernel-source-2.4.24

does not work with fedora.. does anybody knows a solution ?