Project

General

Profile

Sangoma Wanpipe DAHDI » History » Version 4

laforge, 12/29/2021 11:18 PM

1 1 laforge
h1. Sangoma Wanpipe DAHDI
2
3
some random notes on bulding DAHDI drivers for Sangoma AFT104 cards on a modern Debian 11 / buster
4
5
h2. Sources
6
7
* wanpipe 7.0.34 (e.g. via https://git.osmocom.org/wanpipe)
8
* dahdi-linux (e.g. https://github.com/osmocom/dahdi-linux)
9
10
h2. Building
11
12
# build + install dahdi-linux
13
#* usual make + sudo make install
14
15
h3. building sangoma wanpipe drivers
16
17
<pre>
18
$ cp ~/dahdi-linux/drivers/dahdi/Module.symvers ~/wanpipe/patches/kdrivers/src/net
19 2 laforge
$ make -j4 dahdi DAHDI_DIR=/home/laforge/dahdi-linux KBUILD_EXTRA_SYMBOLS=/home/laforge/dahdi-linux/drivers/dahdi/Module.symvers
20 1 laforge
</pre>
21
22 2 laforge
the importance is to pass the correct Module.symvers from the DAHDI build as KBUILD_EXTRA_SYMBOLS, as otherwise the wanpipe drivers will fail to load with errors like this:
23
24 1 laforge
This somehow fails, the Module.symvers gets overwritten and the module fails with various related errors:
25
<pre>
26
[ 4874.442680] wanpipe: no symbol version for dahdi_hdlc_putbuf
27
[ 4874.442702] wanpipe: Unknown symbol dahdi_hdlc_putbuf (err -22)
28
[ 4874.442754] wanpipe: no symbol version for _dahdi_ec_span
29
[ 4874.442760] wanpipe: Unknown symbol _dahdi_ec_span (err -22)
30 2 laforge
..
31 1 laforge
</pre>
32 3 laforge
33
h2. Loading
34
35
If you want to manually load the modules
36
* @modprobe dahdi@ (assumption is that dahdi is already installed to @/lib/modules/@)
37
* from within@wanpipe/patches/kdrivers/src/net@
38
** @insmod sdladrv.ko@
39
** @insmod wanrouter.ko@
40
** @insmod wanpipe.ko@
41
42
you should then see something like this below (my system has two AFT-104-SH cards installed):
43
44
<pre>
45
[ 5890.715722] WANPIPE(tm) Multi-Protocol WAN Driver Module 7.0.34.0 (c) 1994-2016 Sangoma Technologies Inc
46
[ 5890.715732] wanpipe: Probing for WANPIPE hardware.
47
[ 5890.716232] wanpipe: AFT-A104-SH PCI T1/E1 card found (HDLC rev.26), cpu(s) 1, line(s) 4, bus #2, slot #0, irq #25
48
[ 5890.716524] wanpipe: AFT-A104-SH PCI T1/E1 card found (HDLC rev.26), cpu(s) 1, line(s) 4, bus #2, slot #1, irq #27
49
[ 5890.716665] wanpipe: Allocating maximum 8 devices: wanpipe1 - wanpipe8.
50
[ 5890.719054] WANPIPE: TDM Codecs Initialized
51
</pre>
52 4 laforge
53
equally there should now be a lot of /proc/net/wanrouter/ files
54
55
<pre>
56
$ cat /proc/net/wanrouter/hwprobe
57
-------------------------------
58
| Wanpipe Hardware Probe Info |
59
-------------------------------
60
1 . AFT-A104-SH : SLOT=0 : BUS=2 : IRQ=25 : CPU=A : PORT=1 : HWEC=128 : V=26
61
2 . AFT-A104-SH : SLOT=0 : BUS=2 : IRQ=25 : CPU=A : PORT=2 : HWEC=128 : V=26
62
3 . AFT-A104-SH : SLOT=0 : BUS=2 : IRQ=25 : CPU=A : PORT=3 : HWEC=128 : V=26
63
4 . AFT-A104-SH : SLOT=0 : BUS=2 : IRQ=25 : CPU=A : PORT=4 : HWEC=128 : V=26
64
5 . AFT-A104-SH : SLOT=1 : BUS=2 : IRQ=27 : CPU=A : PORT=1 : HWEC=128 : V=26
65
6 . AFT-A104-SH : SLOT=1 : BUS=2 : IRQ=27 : CPU=A : PORT=2 : HWEC=128 : V=26
66
7 . AFT-A104-SH : SLOT=1 : BUS=2 : IRQ=27 : CPU=A : PORT=3 : HWEC=128 : V=26
67
8 . AFT-A104-SH : SLOT=1 : BUS=2 : IRQ=27 : CPU=A : PORT=4 : HWEC=128 : V=26
68
69
Sangoma Card Count: A104=2 
70
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)