[Asterisk-Users] Mandrake & CAPI & EPIA!
Razza
rjames31 at btopenworld.com
Wed Feb 23 08:10:11 MST 2005
Looked at the mISDN bits and pieces, which looked promising, so decided
to take the plung and go for Mandrake 10.1 (Kernel 2.6.8.1) and well -
What a disaster!
I should probably have mentioned I am using an EPIA 5000/classic
motherboard, which between Mandrake 10.1 and the motherboard come up
with an i686 processor which clearly it isn't. Anyway after numerous
rebuilds etc, I have made various changes to the makefiles for libpri
and * and they believe it is now an i586 and asterisk loads fine.
Trying the get back to position of a running * PBX, I tried to install
the zaptel drivers, using the following process -
CD zaptel.....
Make linux26
Make install
When I modprobe zaptel I get the following errors -
[root at asterisk zaptel-1.0.4]# modprobe zaptel
FATAL: Error inserting zaptel
(/lib/modules/2.6.8.1-12mdk-i586-up-1GB/misc/zaptel.ko): Invalid module
format
When I modprobe wcfxo I get the following errors -
[root at asterisk zaptel-1.0.4]# modprobe wcfxo
WARNING: Error inserting zaptel
(/lib/modules/2.6.8.1-12mdk-i586-up-1GB/misc/zaptel.ko): Invalid module
format
WARNING: Error inserting zaptel
(/lib/modules/2.6.8.1-12mdk-i586-up-1GB/misc/zaptel.ko): Invalid module
format
FATAL: Error inserting wcfxo
(/lib/modules/2.6.8.1-12mdk-i586-up-1GB/misc/wcfxo.ko): Invalid module
format
FATAL: Error running install command for wcfxo
I picked up the following article
http://lists.digium.com/pipermail/asterisk-users/2004-November/072043.ht
ml and made the changes described, although i'm still getting the same
errors.
I think there may be a problem with the kernal description/location
mismatch e.g. -
/lib/modules/2.6.8.1-12mdk-i586-up-1GB as opposed to the source being
/usr/src/linux-2.6.8.1-12mdk
Can anyone help me?
and at least i'm learning!
Ray
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Craig Guy
Sent: 22 February 2005 03:14
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Mandrake & CAPI
I've been using FC2 with Kernel 2.6.9, the hardest thing for me was
getting my capi startup script right, you should not have any capi
related stuff in modprobe.conf. I have included my startup script. If
you are using a DID or Point to Point line for the Fritz! then change
protocol=2 to protocol=34 for the avmfritz driver. The mISDN fritz!
driver will support up to four cards and I am successfully using both a
Eicon Diva Server 4-BRI card (With melware drivers) and Fritz! card in
the same system. The Fritz! must be loaded first with the capi script,
followed by divas_cfg for the Diva card. The divas_cfg script must have
its own modprobe capi line removed or commented out.
Craig
#!/bin/bash
#
# System startup script for the isdn-capi subsystem
case "$1" in
start)
echo -n "Starting mISDN and CAPI"
modprobe capi
modprobe mISDN_core
modprobe mISDN_l1
modprobe mISDN_l2
modprobe l3udss1
modprobe mISDN_capi
modprobe mISDN_isac
modprobe avmfritz protocol=2
;;
stop)
echo -n "Stopping mISDN and CAPI"
rmmod avmfritz
rmmod mISDN_isac
rmmod mISDN_capi
rmmod l3udss1
rmmod mISDN_l2
rmmod mISDN_l1
rmmod mISDN_dtmf
rmmod mISDN_core
rmmod capi
rmmod kernelcapi
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage:$0{start|stop|restart}"
;;
esac
exit 0
----- Original Message -----
From: "Razza" <rjames31 at btopenworld.com>
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
<asterisk-users at lists.digium.com>
Sent: Tuesday, February 22, 2005 3:02 AM
Subject: RE: [Asterisk-Users] Mandrake & CAPI
> I was looking at the exercise as a bit of Linux lerning for myself, so
> I guess Mandrake 10.1 and mISDN? Does anyone have working examples?
> Ray
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Craig
> Guy
> Sent: 20 February 2005 23:57
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] Mandrake & CAPI
>
>
> Or you could go to a 2.6 kernel and use the mISDN drivers.
>
> Craig
>
> ----- Original Message -----
> From: "Razza" <rjames31 at btopenworld.com>
> To: <asterisk-users at lists.digium.com>
> Sent: Sunday, February 20, 2005 8:00 PM
> Subject: [Asterisk-Users] Mandrake & CAPI
>
>
> > All,
> > I have been trying to get CAPI4Linux working on my machine and being
> > frank am failing miserably! I am looking for any help available, I
> > am real newbie (so please be gentle) and choose to run Mandrake 9.2
> > as it
>
> > appears quite friendly (or so I thought!).
> >
> > I have been following the guidance found at
> > http://www.voip-info.org/wiki-Asterisk+How+to+connect+with+CAPI for
> > the AVM card (actually I have a BT Speedway - apparently the same
> > thing).
> >
> > I guess the best approach is to detail what I have done in tandem
> > with
>
> > the guidance? So here we go -
> >
> > Type -
> > # modprobe capi
> >
> > Great! I get no response (which is expected!), so move to step 2
> > (http://www.voip-info.org/wiki-Asterisk+AVM+Fritz+CAPI+Driver+Instal
> > l)
> >
> > Guidance states 'Download and install your kernel sources' - I
> > installed these as part of the original installation, so I'll
> > ignore.
> >
> > I download and install the CAPI driver -
> > # cd /usr/src
> > # wget
> > ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.82/fcpci-suse8.2-0
> > 3.
> > 11
> > .02.tar.gz
> > # tar -xzvf fcpci-suse8.2-03.11.02.tar.gz
> > # cd fritz
> > Great! Looking good!
> >
> > Guidance states modify the makefile in /usr/src/src.drv as follows -
> > Replace -
> > CARD_PATH = /lib/modules/`uname -r`/misc
> > with -
> > CARD_PATH = /lib/modules/$(uname
-r)/kernel/drivers/isdn/avmb1
> >
> > I am aware this chap is running Debian and I am running Mandrake, so
> > after searching decided to modify the line as such -
> > CARD_PATH =
/lib/modules/2.4.22-10mdk/kernel/drivers/isdn/avmb1
> >
> > Guidance states modify the KRNLINCL lines for the correct include
> > path
>
> > -
> >
> > KRNLINCL = /usr/src/kernel-headers-`uname -r`/include
> > #KRNLINCL = /lib/modules/`uname -r`/build/include
> > #KRNLINCL = /usr/src/linux/include
> >
> > And modify the lines as thus -
> > 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
> >
> > Again aware of the Debian V's Mandrake configuration, I searched the
> > web and found the following guidance for Mandrake (using the google
> > translation feature - http://translate.google.com/translate?hl=en
> > <http://translate.google.com/translate?hl=en&sl=de&u=http://ixi.thep
> > en
> > gu
> >
> in.de/&prev=/search%3Fq%3Dcapi%2Bmandrake%26hl%3Den%26lr%3D%26rls%3DRN
> WE
> > ,RNWE:2004-35,RNWE:en>
> >
> &sl=de&u=http://ixi.thepenguin.de/&prev=/search%3Fq%3Dcapi%2Bmandrake%
> 26
> > hl%3Den%26lr%3D%26rls%3DRNWE,RNWE:2004-35,RNWE:en )
> >
> > And made the following changes to the makefile in /usr/src/src.drv
> > as that seemed more appropriate and saved the file -
> >
> > KRNLINCL =/usr/src/linux/include
> >
> > DEFINES = Dmodule Dmodversions D__kernel __ Dndebug \
> > D__$(card) __ Dtarget=\"$(card) \ "
> >
> > CCFLAGS = C $(defines) -march=i586 -O2 barrier i $(krnlincl) \
> > include/usr/src/linux/include/linux/modversions.h
> >
> > Going back to the original Guidance
> > (http://www.voip-info.org/wiki-Asterisk+AVM+Fritz+CAPI+Driver+Instal
> > l)
> > I am instructed to modify the defs.h file in /usr/src/fritz/src.drv
as
>
> > follows - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) with
> > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)
> >
> > Great, I'm now ready to run the make command! Unfortunately the
> > first couple of responses are as follows which to me looks very bad?
> > And not
>
> > sure what to do next?
> >
> > [root at asterisk src.drv]# make
> > cc C Dmodule Dmodversions D__kernel__ DNDEBUG D____ Dtarget=\"\"
> > -march=i586 -O2 barrier i /usr/src/linux/include
> > include/usr/src/linux/include/linux/modversions.h main.c -o main.o
> > cc: C: No such file or directory
> > cc: Dmodule: No such file or directory
> > cc: Dmodversions: No such file or directory
> > cc: D__kernel__: No such file or directory
> > cc: DNDEBUG: No such file or directory
> > cc: D____: No such file or directory
> > cc: Dtarget="": No such file or directory
> > cc: barrier: No such file or directory
> > cc: i: No such file or directory
> > cc: include/usr/src/linux/include/linux/modversions.h: No such file
> > or
>
> > directory
> >
> >
> > For completeness I Have included the makefile and defs.h files
> >
> > -------- Makefile --------
> > SOURCES = main.c driver.c tables.c queue.c lib.c tools.c OBJECTS =
> > $(patsubst %.c,%.o,$(SOURCES)) LIBRARY = ../lib/$(CARD)-lib.o
> >
> > CARD_PATH = /lib/modules/2.4.22-10mdk/kernel/drivers/isdn/avmb1
> > CS_PATH = /lib/modules/`uname -r`/pcmcia-external
> >
> > KRNLINCL = /usr/src/linux/include
> >
> > DEFINES = Dmodule Dmodversions D__kernel__ DNDEBUG \
> > D__$(CARD)__ Dtarget=\"$(CARD)\"
> > CCFLAGS = C $(DEFINES) -march=i586 -O2 barrier i $(KRNLINCL) \
> > include/usr/src/linux/include/linux/modversions.h
> > LDFLAGS = -r
> >
> > ifeq ($(CARD),fcpcmcia)
> > CS_MOD = fcpcmcia_cs.o
> > CS_SRC = fcpcmcia_cs.c
> > else
> > CS_MOD =
> > CS_SRC =
> > endif
> >
> > all: $(CARD).o $(LIBRARY) $(CS_MOD)
> >
> > install: $(CARD).o $(LIBRARY) $(CS_MOD)
> > mkdir -p $(CARD_PATH)
> > cp -f $(CARD).o $(CARD_PATH)
> > ifeq ($(CARD),fcpcmcia)
> > mkdir -p $(CS_PATH)
> > cp -f $(CS_MOD) $(CS_PATH)
> > endif
> >
> > clean:
> > $(RM) $(OBJECTS) $(CARD).o $(CS_MOD)
> >
> > $(CARD).o: $(OBJECTS)
> > $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBRARY)
> >
> > $(OBJECTS): %.o: %.c
> > $(CC) $(CCFLAGS) $< -o $@
> >
> > $(CS_MOD): $(CS_SRC)
> > $(CC) $(CCFLAGS) $< -o $@
> >
> > # No dependencies yet...
> >
> >
> > -------- Defs.h --------
> > /*
> > * defs.h
> > * Copyright (C) 2002, AVM GmbH. All rights reserved.
> > *
> > * This Software is free software. You can redistribute and/or
> > * modify such free software under the terms of the GNU Lesser
> > General
>
> > Public
> > * License as published by the Free Software Foundation; either
> > * version 2.1 of the License, or (at your option) any later
> > version.
> > *
> > * The free software is distributed in the hope that it will be
> > useful,
> > * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > * Lesser General Public License for more details.
> > *
> > * You should have received a copy of the GNU Lesser General Public
> > * License along with this Software; if not, write to the Free
> Software
> > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> > 02111-1307 USA, or see
> > * http://www.opensource.org/licenses/lgpl-license.html
> > *
> > * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email:
> > info at avm.de */
> >
> > #ifndef __have_defs_h__
> > #define __have_defs_h__
> >
> > #ifndef LINUX_VERSION_CODE
> > # include <linux/version.h>
> > #endif
> >
> > #ifndef TRUE
> > # define TRUE (1==1)
> > # define FALSE (1==0)
> > #endif
> >
> > /*------------------------------------------------------------------
> > --
> > --
> > -----*\
> >
> \*--------------------------------------------------------------------
> --
> > -----*/
> > #if defined (__fcclassic__)
> > # define PRODUCT_LOGO "AVM FRITZ!Card Classic"
> > # define INTERFACE "isa"
> > #elif defined (__fcpnp__)
> > # define PRODUCT_LOGO "AVM FRITZ!Card PnP"
> > # define INTERFACE "pnp"
> > #elif defined (__fcpcmcia__)
> > # define PRODUCT_LOGO "AVM FRITZ!Card PCMCIA"
> > # define INTERFACE "pcmcia"
> > #elif defined (__fcpci__)
> > # define PRODUCT_LOGO "AVM FRITZ!Card PCI"
> > # define INTERFACE "pci"
> > #endif
> > #define DRIVER_LOGO PRODUCT_LOGO " driver"
> > #define SHORT_LOGO "fritz-" INTERFACE
> >
> > #define REV_DEFAULT "0.5.2"
> >
> > /*------------------------------------------------------------------
> > --
> > --
> > -----*\
> >
> \*--------------------------------------------------------------------
> --
> > -----*/
> > #if defined (OSDEBUG) && defined (NDEBUG)
> > # undef NDEBUG
> > #endif
> >
> > #define UNUSED_ARG(x) (x)=(x)
> >
> > /*------------------------------------------------------------------
> > --
> > --
> > -----*\
> >
> \*--------------------------------------------------------------------
> --
> > -----*/
> > #define KB 1024
> > #define MIN_LIB_HEAP_SIZE (64 * KB)
> > #define MAX_LIB_HEAP_SIZE (600 * KB)
> >
> > /*------------------------------------------------------------------
> > --
> > --
> > -----*\
> >
> \*--------------------------------------------------------------------
> --
> > -----*/
> > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 13)
> > # define GET_PCI_BASE(d, r) (d)->base_address[r]
> > #else
> > # define GET_PCI_BASE(d, r) (d)->resource[r].start
> > #endif
> >
> > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 43)
> > # define KFREE_SKB(x) dev_kfree_skb(x)
> > #else
> > # include <linux/netdevice.h>
> > # define KFREE_SKB(x) dev_kfree_skb_any(x)
> > #endif
> >
> > #if defined (CONFIG_ISAPNP_MODULE) && !defined (CONFIG_ISAPNP)
> > #define
>
> > CONFIG_ISAPNP #endif
> >
> > #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)
> > typedef void irqreturn_t;
> >
> > #define IRQ_NONE
> > #define IRQ_HANDLED
> > #define IRQ_RETVAL(x)
> > #endif
> >
> > #endif
> >
> >
>
>
> ----------------------------------------------------------------------
> --
> ----
> ----
>
>
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list