Fritz USB on Linux

A Non-Howto on the Fritz USB ISDN Adapter

Let me first say that I wrote this in July 2001 and haven't touched a thing from AVM since then. So, chances are that what's in here may be obsolete. If someone wants to take up maintaining this document, preferably an active user of the device, just let me know. An updated version of a HOWTO for the device in German can be found at http://www.stud.uni-karlsruhe.de/~ural/fritzusb.html.

In July 2001, AVM finally and after quite a bit of delay released a driver for their Fritz external ISDN adapter. Let me first say that despite anything I'm ranting about below, I think that's a great move, even more so since they include source code (unfortunately not for the firmware, but that's another matter altogether), which is almost as good as releasing specs (probably -- I haven't really perused the various files and thus don't know if what's in there would actually suffice to write a driver).

Anyway, getting this thing to run is not exactly trivial at that point, or at least wasn't on my machine.

First, get yourself the archive fcusb2-suse7.2-03.09.10.tar.gz (or somesuch) from AVM. On unpacking it, you get a directory named fritz containing two rpms, a couple of scripts, the firmware, a lib directory with a mysterious library, appearently without source, and two source directories, src.sys containing basically a CAPI implementation, and src.drv that, as I understand it, lets the CAPI stuff talk to the device itself.

If you happen to run SuSE 7.2, you probably need to read no further, since running ./install in that directory might work. Everybody else should first compile what's there. Try make. Unfortunately, make will bomb out with the archive mentioned above, since it doesn't find the mysterious library. To fix this, do

cd lib; ln -s fxusb-lib.o fcusb2-lib.o
and edit src.drv/makefile; the line with LIBRARY = should read
LIBRARY		= ../lib/$(CARD)-lib.o

After this the package should compile. For some reason, the AVM didn't seperate building and installing, so you'll have to do the make as root (don't get me started on those make files). Also for some reason, src.drv/fcusb2.o -- the actual driver -- doesn't get installed, so you'll have to copy it to /lib/modules/2.4.5/kernel/drivers/isdn/avmb1/ yourself.

Now run -- as root -- depmod -a. Chances are that you'll get lots of messages about undefined symbols. If you do, configure your kernel not to "Set version information on all module symbols" (that's under "Loadable module support"), and while you're at it, make sure you have "m" checked in "ISDN subsystem/ISDN support" and also "m" in "Neworking devices/PPP support". You also need an "m" at "PPP support for sync tty ports", and you want the various compressions, too. Make and install your kernel (don't forget the modules!), go back to your fritz directory and do the make and copy as described above (it's somewhat silly that AVM installs their module into the kernel part of the modules tree, because that way each time you do a make modules_install, they get deleted -- ah well).

After a reboot, you should no longer have unresolved symbols when running depmod -a (if you do, a make mrproper in the kernel source tree might help, but save your configuration first, because it will get wiped then).

Fine -- the drivers are there. Now, what do you do with your capi? First, you need the support programs. These are in the c4l-lib-2001.04.18-1.i386.rpm rpm, but getting them out of there is tricky on a non-rpm machine.

rpm --force --nodeps -i c4l-lib-2001.04.18-1.i386.rpm
may do the trick, though. Steer clear of the rpm with "sys" in the file name -- these are the modules you just compiled, except that your kernel probably can't use them.

Personally, I believe it is a better idea if you got yourself a copy of the capi4k-utils (link coming up) package that contains the cruicial programs in source, specifically capiinit, capiinfo, and pppdcapiplugin. You should probably compile each of these in its seperate directory, since I bet the global Makefile will not work for you. Fortunately, there is some autoconf in there (which is a real treat after what you've been through up to here), but, alas, not all the modules sport GNU luxury.

At least with pppd 2.4.1, you'll need to copy pppd.h and patchlevel.h over from ppp-2.4.1/pppd into the pppdcapiplugin directory, or else you'll get "option name unknown" errors when starting the pppd. Of course, make sure that the plugins capiplugin.so and userpass.so really end up in ppp's plugin directory (usually /etc/ppp/plugins/).

We're not done yet, since we have yet to configure the damn thing. This is done using a file /etc/capi.conf that looks like this on my machine:

# card		file	proto	io	irq	mem	cardnr	options
fcusb2 fus2base.frm - - - - -
fus2base.frm refers to the firmware that's in your fritz directory. Since the capi can't know where that is any better than I can, it expects it in /usr/lib/isdn, so copy it there.

News: At least in the file fcusb-suse7.2-03.09.10.tar.gz (which is what AVM distributed on Aug 9, 2001), this fus2base.frm is missing. If you're desperate, you can probably use the fus2base.frm from a previous release. Thanks to Thomas Honer for pointing this out to me. (AVM: Don't get upset, I'll remove fus2base from this site as soon as the current confusion has cleared up).

At that point,

capiinit start
ought to work, and if it does, you're almost done. If you installed the rpm, you could try
pppd call isdn/avm 
otherwise use the peer file I give below. If you get an error message (check out /var/log/messages or whereever your syslog routes those messages) to the effect that some line discipline could not be registred, you'll need
alias tty-ldisc-14        ppp_synctty
in your /etc/modules.conf (you read that part about the kernel configuration above, didn't you?).

Of course, as with any ppp installation, you need to make sure that ppp_generic is loaded, either by manually inserting it or by saying

alias char-major-108     ppp_generic
in /etc/modules.conf.

If your Fritz now makes the funny sound and another one when you do killall pppd (chances are you'll have to run pppd as root, so the killall needs to be done from root, too), you're all set. Except that avm doesn't distribute chap/pap-secrets for the preconfigured providers in /etc/ppp/peers/isdn. I personally use (in Germany)

debug
sync
noauth
plugin /etc/ppp/plugins/userpass.so
username talknet
password talknet
defaultroute
plugin /etc/ppp/plugins/capiplugin.so
#controller 1
#numberprefix 0
number 0101901929
protocol hdlc
/dev/null
as /etc/ppp/peers/isdn/freenet and then
# Secrets for authentication using CHAP
# client  server  secret      IP addresses
freenet * freenet
in /etc/ppp/chap-secrets. With this, you can do
pppd call isdn/freenet
I have no affiliation with freenet, and they don't even give me money for this shameless plug.

That was quite a mouthful, I admit. Don't try it if you've never compiled a kernel before, don't even think about trying it if you've never compiled some userland program. And while I welcome improvement suggestions, I have nowhere enough time to guide through this mess by e-mail. I hope you'll understand this.

By the way: As of late July 2001, there were still quite a few bugs in the driver. I haven't actually checked out why, but fcusb2 gets rather confused about its dependencies, claiming is was used by basically every module loaded after it. It's a pain to remove, as you may imagine.

And here's a final message to AVM: You know what I'd really like to see? Some harmless .tar.gz containing the source to all the programs and libraries that are required besides the kernel and an autoconf script setting the compilation up, plus a readme explaining /etc/capi.conf, the kernel modules absolutely required to run ppp on isdn, and a tiny list of the most popular call-by-call providers including the necessary secrets (as a matter of fact, since most of the stuff is GPL, I might even try such a thing myself once everything has stabilized). Wouldn't that be nice? I mean, how many people are actually running SuSE 7.2? Oh, and the final touch on it would be if the modules were distributed as a kernel patch, because it's sooo much nicer to compile modules in the kernel.


July 2001

Markus Demleitner


Diese Seite darf unter der GNU FDL (auch verändert) weiterverbreitet werden. Näheres in unserem Impressum.

Druckfassung

Erzeugt am 11.03.2003

unimut@stura.uni-heidelberg.de