Some of us are still using the really old FritzCard PCI under recent Ubuntu Linux.
As the fcpci module is not being developed anymore (it seems), the last available version is for Linux kernel 4.4.0 and can be found here:
https://belug.de/~lutz/pub/fcpci/fritz-fcpci-4.4.0.tar.bz2
(local mirror: fritz-fcpci-4.4.0)
However, this won’t compile under the standard Linux kernel that is shipped with latest Ubuntu 18.04.5 LTS, which is 4.15.0-122. It will fail with an error like this:
In file included from /usr/local/src/fcpci-4.4.0/src/main.c:24:0:
./arch/x86/include/asm/uaccess.h:30:27: error: unknown type name ‘mm_segment_t’; did you mean ‘apm_event_t’?
static inline void set_fs(mm_segment_t fs)
^~~~~~~~~~~~
apm_event_t
But relax, the task can be achieved by editing the sources a little. Here is how.
Steps:
- Download the sources from above and extract to /usr/local/src or somewhere else
- Make sure you got the build-essental package installed:
sudo apt-get install build-essential - Edit the file main.c and go to line 24.
Replace #include <asm/uaccess.h>
with #include <linux/uaccess.h> - Now build the module with „make“ and install with „sudo make install“
- Check with „modinfo fcpci“ if the module has been installed correctly. It should show something like this:filename: /lib/modules/4.15.0-122-generic/kernel/extras/fcpci.ko
description: CAPI4Linux: Driver for AVM FRITZ!Card PCI
license: Proprietary
srcversion: 9274AE9170599A8E7BC82F1
alias: pci:v00001244d00000E00sv*sd*bc*sc*i*
alias: pci:v00001244d00000A00sv*sd*bc*sc*i*
depends: kernelcapi
retpoline: Y
name: fcpci
vermagic: 4.15.0-122-generic SMP mod_unload - To use the module and capi20, add those modules to /etc/modules:
echo -e „fcpci\ncapidrv“ >> /etc/modules - Reboot and check if the modules are loaded with „lsmod|grep capi“, it should show:capidrv 36864 0
isdn 147456 1 capidrv
kernelcapi 40960 2 capidrv,fcpci - Thats it. „capiinfo“ should now also find your controller and show it. Extract:capi20.c: 164 CapiDebug():[capi20_isinstalled]: standard loop – module: standard
capi20.c: 164 CapiDebug():[capi20_isinstalled]: capi_fd: 4
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.11-07 (49.23)
Serial Number: 1000001
BChannels: 2
Global Options: 0x00000039
internal controller supported
DTMF supported
Supplementary Services supported
channel allocation supported (leased lines)
B1 protocols support: 0x4000011f capi20.c: 164 CapiDebug():[capi20_isinstalled]: standard loop – module: standard
capi20.c: 164 CapiDebug():[capi20_isinstalled]: capi_fd: 4
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.11-07 (49.23)
Serial Number: 1000001
BChannels: 2
Global Options: 0x00000039
internal controller supported
DTMF supported
Supplementary Services supported
channel allocation supported (leased lines)
B1 protocols support: 0x4000011f
This works up to 4.17.19 kernels as well, but to my knowledge not in any kernel later than 4.17.19, as to my understanding proc file operations (proc_fops) have changed.