<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>All,<BR>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!).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have been following the guidance found at <A
href="http://www.voip-info.org/wiki-Asterisk+How+to+connect+with+CAPI">http://www.voip-info.org/wiki-Asterisk+How+to+connect+with+CAPI</A>
for the AVM card (actually I have a BT Speedway - apparently the same
thing).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I guess the best approach is to detail what I have
done in tandem with the guidance? So here we go - </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Type - <BR># modprobe capi</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Great! I get no response (which is expected!), so
move to step 2 (<A
href="http://www.voip-info.org/wiki-Asterisk+AVM+Fritz+CAPI+Driver+Install">http://www.voip-info.org/wiki-Asterisk+AVM+Fritz+CAPI+Driver+Install</A>)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Guidance states 'Download and install your kernel
sources' - I installed these as part of the original installation, so I'll
ignore.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I download and install the CAPI driver - <BR># cd
/usr/src <BR># wget <A
href="ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.82/fcpci-suse8.2-03.11.02.tar.gz">ftp://ftp.avm.de/cardware/fritzcrd.pci/linux/suse.82/fcpci-suse8.2-03.11.02.tar.gz</A>
<BR># tar -xzvf fcpci-suse8.2-03.11.02.tar.gz <BR># cd fritz<BR>Great! Looking
good!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Guidance states modify the makefile in
/usr/src/src.drv as follows - <BR>Replace -
<BR> CARD_PATH = /lib/modules/`uname
-r`/misc <BR>with -
<BR> CARD_PATH = /lib/modules/$(uname
-r)/kernel/drivers/isdn/avmb1</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I am aware this chap is running Debian and I am
running Mandrake, so after searching decided to modify the line as such -
<BR> CARD_PATH =
/lib/modules/2.4.22-10mdk/kernel/drivers/isdn/avmb1</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Guidance states modify the KRNLINCL lines for the
correct include path - <BR>KRNLINCL =
/usr/src/kernel-headers-`uname -r`/include
<BR>#KRNLINCL = /lib/modules/`uname
-r`/build/include <BR>#KRNLINCL =
/usr/src/linux/include</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>And modify the lines as thus - <BR>DEFINES =
-DMODULE -D__KERNEL__ -DNDEBUG \
<BR>
-D__$(CARD)__ -DTARGET=\"$(CARD)\" <BR>CCFLAGS = -c $(DEFINES) -O2 -Wall -I
$(KRNLINCL) <BR>With - <BR>DEFINES = -DMODULE -DMODVERSIONS -D__KERNEL__
-DNDEBUG \
<BR>
-D__$(CARD)__ -DTARGET=\"$(CARD)\" <BR>CCFLAGS = -c $(DEFINES) -march=i686 -O2
-Wall -I $(KRNLINCL) \
<BR>
-include $(KRNLINCL)/linux/modversions.h</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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 - <A
href="http://translate.google.com/translate?hl=en&sl=de&u=http://ixi.thepenguin.de/&prev=/search%3Fq%3Dcapi%2Bmandrake%26hl%3Den%26lr%3D%26rls%3DRNWE,RNWE:2004-35,RNWE:en">http://translate.google.com/translate?hl=en&sl=de&u=http://ixi.thepenguin.de/&prev=/search%3Fq%3Dcapi%2Bmandrake%26hl%3Den%26lr%3D%26rls%3DRNWE,RNWE:2004-35,RNWE:en</A>
)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>And made the following changes to the makefile in
/usr/src/src.drv as that seemed more appropriate and saved the file -
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>KRNLINCL =/usr/src/linux/include</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>DEFINES = Dmodule Dmodversions D__kernel __ Dndebug
\<BR>D__$(card) __ Dtarget=\"$(card) \ "</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>CCFLAGS = C $(defines) -march=i586 -O2 barrier i
$(krnlincl) \<BR>include/usr/src/linux/include/linux/modversions.h</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Going back to the original Guidance (<A
href="http://www.voip-info.org/wiki-Asterisk+AVM+Fritz+CAPI+Driver+Install">http://www.voip-info.org/wiki-Asterisk+AVM+Fritz+CAPI+Driver+Install</A>)<BR>I
am instructed to modify the defs.h file in /usr/src/fritz/src.drv as follows -
<BR>#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) <BR>with <BR>#if
LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>[root@asterisk src.drv]# make<BR>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<BR>cc: C: No such file or directory<BR>cc: Dmodule: No such file or
directory<BR>cc: Dmodversions: No such file or directory<BR>cc: D__kernel__: No
such file or directory<BR>cc: DNDEBUG: No such file or directory<BR>cc: D____:
No such file or directory<BR>cc: Dtarget="": No such file or directory<BR>cc:
barrier: No such file or directory<BR>cc: i: No such file or directory<BR>cc:
include/usr/src/linux/include/linux/modversions.h: No such file or
directory</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>For completeness I Have included the makefile and defs.h files</DIV>
<DIV> </DIV>
<DIV>-------- Makefile --------<BR>SOURCES = main.c driver.c tables.c
queue.c lib.c tools.c<BR>OBJECTS = $(patsubst %.c,%.o,$(SOURCES))
<BR>LIBRARY = ../lib/$(CARD)-lib.o</DIV>
<DIV> </DIV>
<DIV>CARD_PATH =
/lib/modules/2.4.22-10mdk/kernel/drivers/isdn/avmb1<BR>CS_PATH =
/lib/modules/`uname -r`/pcmcia-external</DIV>
<DIV> </DIV>
<DIV>KRNLINCL = /usr/src/linux/include</DIV>
<DIV> </DIV>
<DIV>DEFINES = Dmodule Dmodversions D__kernel__ DNDEBUG
\<BR> D__$(CARD)__ Dtarget=\"$(CARD)\"<BR>CCFLAGS = C
$(DEFINES) -march=i586 -O2 barrier i $(KRNLINCL)
\<BR> include/usr/src/linux/include/linux/modversions.h<BR>LDFLAGS =
-r</DIV>
<DIV> </DIV>
<DIV>ifeq ($(CARD),fcpcmcia)<BR>CS_MOD =
fcpcmcia_cs.o<BR>CS_SRC =
fcpcmcia_cs.c<BR>else<BR>CS_MOD =<BR>CS_SRC =<BR>endif</DIV>
<DIV> </DIV>
<DIV>all: $(CARD).o $(LIBRARY) $(CS_MOD)</DIV>
<DIV> </DIV>
<DIV>install: $(CARD).o $(LIBRARY) $(CS_MOD)<BR> mkdir -p
$(CARD_PATH)<BR> cp -f $(CARD).o $(CARD_PATH)<BR>ifeq
($(CARD),fcpcmcia)<BR> mkdir -p $(CS_PATH)<BR> cp -f
$(CS_MOD) $(CS_PATH)<BR>endif</DIV>
<DIV> </DIV>
<DIV>clean: <BR> $(RM) $(OBJECTS) $(CARD).o
$(CS_MOD)</DIV>
<DIV> </DIV>
<DIV>$(CARD).o: $(OBJECTS)<BR> $(LD) $(LDFLAGS) -o $@ $(OBJECTS)
$(LIBRARY)</DIV>
<DIV> </DIV>
<DIV>$(OBJECTS): %.o: %.c<BR> $(CC) $(CCFLAGS) $< -o $@
</DIV>
<DIV> </DIV>
<DIV>$(CS_MOD): $(CS_SRC)<BR> $(CC) $(CCFLAGS) $< -o $@</DIV>
<DIV> </DIV>
<DIV># No dependencies yet...</DIV>
<DIV> </DIV>
<DIV><BR>-------- Defs.h --------<BR>/*<BR> * defs.h<BR> * Copyright
(C) 2002, AVM GmbH. All rights reserved.<BR> * <BR> * This Software
is free software. You can redistribute and/or<BR> * modify such free
software under the terms of the GNU Lesser General Public<BR> * License as
published by the Free Software Foundation; either<BR> * version 2.1 of the
License, or (at your option) any later version.<BR> * <BR> * The free
software is distributed in the hope that it will be useful,<BR> * but
WITHOUT ANY WARRANTY; without even the implied warranty of<BR> *
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<BR> *
Lesser General Public License for more details.<BR> * <BR> * You
should have received a copy of the GNU Lesser General Public<BR> * License
along with this Software; if not, write to the Free Software<BR> *
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA, or
see<BR> * <A
href="http://www.opensource.org/licenses/lgpl-license.html">http://www.opensource.org/licenses/lgpl-license.html</A><BR> *
<BR> * Contact: AVM GmbH, Alt-Moabit 95, 10559 Berlin, Germany, email: <A
href="mailto:info@avm.de">info@avm.de</A><BR> */</DIV>
<DIV> </DIV>
<DIV>#ifndef __have_defs_h__<BR>#define __have_defs_h__</DIV>
<DIV> </DIV>
<DIV>#ifndef LINUX_VERSION_CODE<BR># include
<linux/version.h><BR>#endif</DIV>
<DIV> </DIV>
<DIV>#ifndef TRUE<BR># define TRUE (1==1)<BR># define
FALSE (1==0)<BR>#endif</DIV>
<DIV> </DIV>
<DIV>/*---------------------------------------------------------------------------*\<BR>\*---------------------------------------------------------------------------*/<BR>#if
defined (__fcclassic__)<BR># define PRODUCT_LOGO "AVM FRITZ!Card
Classic"<BR># define INTERFACE "isa"<BR>#elif defined (__fcpnp__)<BR>#
define PRODUCT_LOGO "AVM FRITZ!Card PnP"<BR># define
INTERFACE "pnp"<BR>#elif defined (__fcpcmcia__)<BR># define
PRODUCT_LOGO "AVM FRITZ!Card PCMCIA"<BR># define
INTERFACE "pcmcia"<BR>#elif defined (__fcpci__)<BR># define
PRODUCT_LOGO "AVM FRITZ!Card PCI"<BR># define
INTERFACE "pci"<BR>#endif<BR>#define DRIVER_LOGO PRODUCT_LOGO "
driver"<BR>#define SHORT_LOGO "fritz-" INTERFACE</DIV>
<DIV> </DIV>
<DIV>#define REV_DEFAULT "0.5.2"</DIV>
<DIV> </DIV>
<DIV>/*---------------------------------------------------------------------------*\<BR>\*---------------------------------------------------------------------------*/<BR>#if
defined (OSDEBUG) && defined (NDEBUG)<BR># undef NDEBUG<BR>#endif</DIV>
<DIV> </DIV>
<DIV>#define UNUSED_ARG(x) (x)=(x)</DIV>
<DIV> </DIV>
<DIV>/*---------------------------------------------------------------------------*\<BR>\*---------------------------------------------------------------------------*/<BR>#define KB 1024<BR>#define MIN_LIB_HEAP_SIZE (64
* KB)<BR>#define MAX_LIB_HEAP_SIZE (600 * KB)</DIV>
<DIV> </DIV>
<DIV>/*---------------------------------------------------------------------------*\<BR>\*---------------------------------------------------------------------------*/<BR>#if
LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 13)<BR># define GET_PCI_BASE(d,
r) (d)->base_address[r]<BR>#else<BR># define GET_PCI_BASE(d,
r) (d)->resource[r].start<BR>#endif</DIV>
<DIV> </DIV>
<DIV>#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 43)<BR># define
KFREE_SKB(x) dev_kfree_skb(x)<BR>#else<BR># include
<linux/netdevice.h><BR># define
KFREE_SKB(x) dev_kfree_skb_any(x)<BR>#endif</DIV>
<DIV> </DIV>
<DIV>#if defined (CONFIG_ISAPNP_MODULE) && !defined
(CONFIG_ISAPNP)<BR>#define CONFIG_ISAPNP<BR>#endif</DIV>
<DIV> </DIV>
<DIV>#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 23)<BR>typedef void
irqreturn_t;</DIV>
<DIV> </DIV>
<DIV>#define IRQ_NONE<BR>#define IRQ_HANDLED<BR>#define
IRQ_RETVAL(x)<BR>#endif</DIV>
<DIV> </DIV>
<DIV>#endif<BR></FONT></DIV></BODY></HTML>