Linux 2.4.0-test7-pre6
[davej-history.git] / Documentation / isdn / README.HiSax
blob2dddf96ece82a788cc837855c63d2294edb9ba8c
1 HiSax is a Linux hardware-level driver for passive ISDN cards with Siemens
2 chipset (ISAC_S 2085/2086/2186, HSCX SAB 82525). It is based on the Teles
3 driver from Jan den Ouden.
4 It is meant to be used with isdn4linux, an ISDN link-level module for Linux
5 written by Fritz Elfert.
7     This program is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
12     This program is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
17     You should have received a copy of the GNU General Public License
18     along with this program; if not, write to the Free Software
19     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 Supported cards
23 ---------------
25 Teles 8.0/16.0/16.3 and compatible ones
26 Teles 16.3c
27 Teles S0/PCMCIA
28 Teles PCI
29 Teles S0Box
30 Creatix S0Box
31 Creatix PnP S0
32 Compaq ISDN S0 ISA card
33 AVM A1 (Fritz, Teledat 150)
34 AVM Fritz PCMCIA
35 AVM Fritz PnP
36 AVM Fritz PCI
37 ELSA Microlink PCC-16, PCF, PCF-Pro, PCC-8
38 ELSA Quickstep 1000
39 ELSA Quickstep 1000PCI
40 ELSA Quickstep 3000 (same settings as QS1000)
41 ELSA Quickstep 3000PCI
42 ELSA PCMCIA
43 ITK ix1-micro Rev.2
44 Eicon.Diehl Diva 2.0 ISA and PCI (S0 and U interface, no PRO version)
45 Eicon.Diehl Diva 2.01 ISA and PCI
46 Eicon.Diehl Diva Piccola
47 ASUSCOM NETWORK INC. ISDNLink 128K PC adapter (order code I-IN100-ST-D)
48 Dynalink IS64PH (OEM version of ASUSCOM NETWORK INC. ISDNLink 128K adapter)
49 PCBIT-DP (OEM version of ASUSCOM NETWORK INC. ISDNLink)
50 HFC-2BS0 based cards (TeleInt SA1)
51 Sedlbauer Speed Card (Speed Win, Teledat 100, PCI, Fax+)
52 Sedlbauer Speed Star/Speed Star2 (PCMCIA)
53 Sedlbauer ISDN-Controller PC/104
54 USR Sportster internal TA (compatible Stollmann tina-pp V3)
55 ith Kommunikationstechnik GmbH MIC 16 ISA card
56 Traverse Technologie NETjet PCI S0 card and NETspider U card
57 Dr. Neuhaus Niccy PnP/PCI
58 Siemens I-Surf 1.0
59 Siemens I-Surf 2.0 (with IPAC, try type 12 asuscom) 
60 ACER P10
61 HST Saphir
62 Berkom Telekom A4T
63 Scitel Quadro
64 Gazel ISDN cards
65 HFC-PCI based cards
66 Winbond W6692 based cards
67 HFC-S+, HFC-SP/PCMCIA cards
69 Note: PCF, PCF-Pro: up to now, only the ISDN part is supported
70       PCC-8: not tested yet
71       Teles PCMCIA is EXPERIMENTAL
72       Teles 16.3c is EXPERIMENTAL
73       Teles PCI is EXPERIMENTAL
74       Teles S0Box is EXPERIMENTAL
75       Eicon.Diehl Diva U interface not tested
76       HFC-S+, HFC-SP/PCMCIA are experimental
78 If you know other passive cards with the Siemens chipset, please let me know.
79 To use the PNP cards you need the isapnptools.
80 You can combine any card, if there is no conflict between the resources
81 (io, mem, irq).
84 Configuring the driver
85 ----------------------
87 The HiSax driver can either be built directly into the kernel or as a module.
88 It can be configured using the command line feature while loading the kernel
89 with LILO or LOADLIN or, if built as a module, using insmod/modprobe with
90 parameters.
91 There is also some config needed before you compile the kernel and/or
92 modules. It is included in the normal "make [menu]config" target at the
93 kernel. Don't forget it, especially to select the right D-channel protocol.
95 Please note: All PnP cards need to be configured with isapnp and will work
96 only with the HiSax driver used as a module.
98 a) when built as a module
99 -------------------------
101 insmod/modprobe  hisax.o \
102   io=iobase irq=IRQ mem=membase type=card_type \
103   protocol=D_channel_protocol id=idstring
105 or, if several cards are installed:
107 insmod/modprobe hisax.o \
108   io=iobase1,iobase2,... irq=IRQ1,IRQ2,... mem=membase1,membase2,... \
109   type=card_type1,card_type2,... \
110   protocol=D_channel_protocol1,D_channel_protocol2,... \
111   id=idstring1%idstring2 ...
113 where "iobaseN" represents the I/O base address of the Nth card, "membaseN"
114 the memory base address of the Nth card, etc.
116 The reason for the delimiter "%" being used in the idstrings is that ","
117 won't work with the current modules package.
119 The parameters may be specified in any order. For example, the "io"
120 parameter may precede the "irq" parameter, or vice versa. If several
121 cards are installed, the ordering within the comma separated parameter
122 lists must of course be consistent.
124 Only parameters applicable to the card type need to be specified. For
125 example, the Teles 16.3 card is not memory-mapped, so the "mem"
126 parameter may be omitted for this card. Sometimes it may be necessary
127 to specify a dummy parameter, however. This is the case when there is
128 a card of a different type later in the list that needs a parameter
129 which the preceding card does not. For instance, if a Teles 16.0 card
130 is listed after a Teles 16.3 card, a dummy memory base parameter of 0
131 must be specified for the 16.3. Instead of a dummy value, the parameter
132 can also be skipped by simply omitting the value. For example:
133 mem=,0xd0000. See example 6 below.
135 The parameter for the D-Channel protocol may be omitted if you selected the
136 correct one during kernel config. Valid values are "1" for German 1TR6,
137 "2" for EDSS1 (Euro ISDN), "3" for leased lines (no D-Channel) and "4"
138 for US NI1.
139 With US NI1 you have to include your SPID into the MSN setting in the form
140 <MSN>:<SPID> for example (your phonenumber is 1234 your SPID 5678):
141 AT&E1234:5678                       on ttyI interfaces
142 isdnctrl eaz ippp0 1234:5678        on network devices
144 The Creatix/Teles PnP cards use io1= and io2= instead of io= for specifying
145 the I/O addresses of the ISAC and HSCX chips, respectively.
147 Card types:
149     Type                Required parameters (in addition to type and protocol)
151     1   Teles 16.0               irq, mem, io
152     2   Teles  8.0               irq, mem
153     3   Teles 16.3 (non PnP)     irq, io
154     4   Creatix/Teles PnP        irq, io0 (ISAC), io1 (HSCX)
155     5   AVM A1 (Fritz)           irq, io
156     6   ELSA PCC/PCF cards       io or nothing for autodetect (the iobase is
157                                  required only if you have more than one ELSA
158                                  card in your PC)
159     7   ELSA Quickstep 1000      irq, io  (from isapnp setup)
160     8   Teles 16.3 PCMCIA        irq, io
161     9   ITK ix1-micro Rev.2      irq, io
162    10   ELSA PCMCIA              irq, io  (set with card manager)
163    11   Eicon.Diehl Diva ISA PnP irq, io
164    11   Eicon.Diehl Diva PCI     no parameter
165    12   ASUS COM ISDNLink        irq, io  (from isapnp setup)
166    13   HFC-2BS0 based cards     irq, io
167    14   Teles 16.3c PnP          irq, io
168    15   Sedlbauer Speed Card     irq, io
169    15   Sedlbauer PC/104         irq, io
170    15   Sedlbauer Speed PCI      no parameter
171    16   USR Sportster internal   irq, io
172    17   MIC card                 irq, io
173    18   ELSA Quickstep 1000PCI   no parameter
174    19   Compaq ISDN S0 ISA card  irq, io0, io1, io (from isapnp setup io=IO2)
175    20   NETjet PCI card          no parameter
176    21   Teles PCI                no parameter
177    22   Sedlbauer Speed Star (PCMCIA) irq, io (set with card manager)
178    24   Dr. Neuhaus Niccy PnP    irq, io0, io1 (from isapnp setup)
179    24   Dr. Neuhaus Niccy PCI    no parameter
180    25   Teles S0Box              irq, io (of the used lpt port)
181    26   AVM A1 PCMCIA (Fritz!)   irq, io (set with card manager)
182    27   AVM PnP (Fritz!PnP)      irq, io  (from isapnp setup)
183    27   AVM PCI (Fritz!PCI)      no parameter
184    28   Sedlbauer Speed Fax+     irq, io (from isapnp setup)
185    29   Siemens I-Surf 1.0       irq, io, memory (from isapnp setup)   
186    30   ACER P10                 irq, io (from isapnp setup)   
187    31   HST Saphir               irq, io
188    32   Telekom A4T              none
189    33   Scitel Quadro            subcontroller (4*S0, subctrl 1...4)
190    34   Gazel ISDN cards (ISA)   irq,io
191    34   Gazel ISDN cards (PCI)   none
192    35   HFC 2BDS0 PCI            none
193    36   W6692 based PCI cards    none
194    37   HFC 2BDS0 S+, SP/PCMCIA  irq,io (pcmcia must be set with cardmgr)
195    38   NETspider U PCI card     none
197 At the moment IRQ sharing is only possible with PCI cards. Please make sure
198 that your IRQ is free and enabled for ISA use.
201 Examples for module loading
203 1. Teles 16.3, Euro ISDN, I/O base 280 hex, IRQ 10
204    modprobe hisax type=3 protocol=2 io=0x280 irq=10
206 2. Teles 16.0, 1TR6 ISDN, I/O base d80 hex, IRQ 5, Memory d0000 hex
207    modprobe hisax protocol=1 type=1 io=0xd80 mem=0xd0000 irq=5
209 3. Fritzcard, Euro ISDN, I/O base 340 hex, IRQ 10 and ELSA PCF, Euro ISDN
210    modprobe hisax type=5,6 protocol=2,2 io=0x340 irq=10 id=Fritz%Elsa
212 4. Any ELSA PCC/PCF card, Euro ISDN
213    modprobe hisax type=6 protocol=2
215 5. Teles 16.3 PnP, Euro ISDN, with isapnp configured
216    isapnp config:  (INT 0 (IRQ 10 (MODE +E)))
217                    (IO 0 (BASE 0x0580))
218                    (IO 1 (BASE 0x0180))
219    modprobe hisax type=4 protocol=2 irq=10 io0=0x580 io1=0x180
221 6. Teles 16.3, Euro ISDN, I/O base 280 hex, IRQ 12 and
222    Teles 16.0, 1TR6, IRQ 5, Memory d0000 hex
223    modprobe hisax type=3,1 protocol=2,1 io=0x280 mem=0,0xd0000
225    Please note the dummy 0 memory address for the Teles 16.3, used as a
226    placeholder as described above, in the last example.
228 7. Teles PCMCIA, Euro ISDN, I/O base 180 hex, IRQ 15 (default values)
229    modprobe hisax type=8 protocol=2 io=0x180 irq=15
232 b) using LILO/LOADLIN, with the driver compiled directly into the kernel
233 ------------------------------------------------------------------------
235 hisax=typ1,dp1,pa_1,pb_1,pc_1[,typ2,dp2,pa_2 ... \
236       typn,dpn,pa_n,pb_n,pc_n][,idstring1[,idstring2,...,idstringn]]
238 where
239      typ1 = type of 1st card (default depends on kernel settings)
240      dp1  = D-Channel protocol of 1st card. 1=1TR6, 2=EDSS1, 3=leased
241      pa_1 = 1st parameter (depending on the type of the card)
242      pb_1 = 2nd parameter (    "     "   "   "   "   "   "  )
243      pc_1 = 3rd parameter (    "     "   "   "   "   "   "  )
245      typ2,dp2,pa_2,pb_2,pc_2 = Parameters of the second card (defaults: none)
246      typn,dpn,pa_n,pb_n,pc_n = Parameters of the n'th card (up to 16 cards are
247                                                                      supported)
249      idstring = Driver ID for accessing the particular card with utility
250                 programs and for identification when using a line monitor
251                 (default: "HiSax")
253                 Note: the ID string must start with an alphabetical character!
255 Card types:
257 type
258     1   Teles 16.0              pa=irq  pb=membase  pc=iobase
259     2   Teles  8.0              pa=irq  pb=membase
260     3   Teles 16.3              pa=irq  pb=iobase
261     4   Creatix/Teles PNP       ONLY WORKS AS A MODULE !
262     5   AVM A1 (Fritz)          pa=irq  pb=iobase
263     6   ELSA PCC/PCF cards      pa=iobase or nothing for autodetect
264     7   ELSA Quickstep 1000     ONLY WORKS AS A MODULE !
265     8   Teles S0 PCMCIA         pa=irq  pb=iobase
266     9   ITK ix1-micro Rev.2     pa=irq  pb=iobase
267    10   ELSA PCMCIA             pa=irq, pb=io  (set with card manager)
268    11   Eicon.Diehl Diva ISAPnP ONLY WORKS AS A MODULE !
269    11   Eicon.Diehl Diva PCI    no parameter
270    12   ASUS COM ISDNLink       ONLY WORKS AS A MODULE !
271    13   HFC-2BS0 based cards    pa=irq  pb=io
272    14   Teles 16.3c PnP         ONLY WORKS AS A MODULE !
273    15   Sedlbauer Speed Card    pa=irq  pb=io (Speed Win only as module !)
274    15   Sedlbauer PC/104        pa=irq  pb=io
275    15   Sedlbauer Speed PCI     no parameter
276    16   USR Sportster internal  pa=irq  pb=io
277    17   MIC card                pa=irq  pb=io
278    18   ELSA Quickstep 1000PCI  no parameter
279    19   Compaq ISDN S0 ISA card ONLY WORKS AS A MODULE !
280    20   NETjet PCI card         no parameter
281    21   Teles PCI               no parameter
282    22   Sedlbauer Speed Star (PCMCIA)  pa=irq, pb=io  (set with card manager)
283    24   Dr. Neuhaus Niccy PnP   ONLY WORKS AS A MODULE !
284    24   Dr. Neuhaus Niccy PCI   no parameter
285    25   Teles S0Box             pa=irq, pb=io (of the used lpt port)
286    26   AVM A1 PCMCIA (Fritz!)  pa=irq, pb=io (set with card manager)
287    27   AVM PnP (Fritz!PnP)     ONLY WORKS AS A MODULE !
288    27   AVM PCI (Fritz!PCI)     no parameter
289    28   Sedlbauer Speed Fax+    ONLY WORKS AS A MODULE !
290    29   Siemens I-Surf 1.0      ONLY WORKS AS A MODULE !
291    30   ACER P10                ONLY WORKS AS A MODULE !
292    31   HST Saphir              pa=irq, pb=io
293    32   Telekom A4T             no parameter
294    33   Scitel Quadro           subcontroller (4*S0, subctrl 1...4)
295    34   Gazel ISDN cards (ISA)  pa=irq, pb=io
296    34   Gazel ISDN cards (PCI)  no parameter
297    35   HFC 2BDS0 PCI           no parameter
298    36   W6692 based PCI cards   none
299    37   HFC 2BDS0 S+,SP/PCMCIA  ONLY WORKS AS A MODULE !
300    38   NETspider U PCI card    none
303 Running the driver
304 ------------------
306 When you insmod isdn.o and hisax.o (or with the in-kernel version, during
307 boot time), a few lines should appear in your syslog. Look for something like:
309 Apr 13 21:01:59 kke01 kernel: HiSax: Driver for Siemens chip set ISDN cards
310 Apr 13 21:01:59 kke01 kernel: HiSax: Version 2.9
311 Apr 13 21:01:59 kke01 kernel: HiSax: Revisions 1.14/1.9/1.10/1.25/1.8
312 Apr 13 21:01:59 kke01 kernel: HiSax: Total 1 card defined
313 Apr 13 21:01:59 kke01 kernel: HiSax: Card 1 Protocol EDSS1 Id=HiSax1 (0)
314 Apr 13 21:01:59 kke01 kernel: HiSax: Elsa driver Rev. 1.13
316 Apr 13 21:01:59 kke01 kernel: Elsa: PCF-Pro found at 0x360 Rev.:C IRQ 10
317 Apr 13 21:01:59 kke01 kernel: Elsa: timer OK; resetting card
318 Apr 13 21:01:59 kke01 kernel: Elsa: HSCX version A: V2.1  B: V2.1
319 Apr 13 21:01:59 kke01 kernel: Elsa: ISAC 2086/2186 V1.1
321 Apr 13 21:01:59 kke01 kernel: HiSax: DSS1 Rev. 1.14
322 Apr 13 21:01:59 kke01 kernel: HiSax: 2 channels added
324 This means that the card is ready for use.
325 Cabling problems or line-downs are not detected, and only some ELSA cards can
326 detect the S0 power.
328 Remember that, according to the new strategy for accessing low-level drivers
329 from within isdn4linux, you should also define a driver ID while doing
330 insmod: Simply append hisax_id=<SomeString> to the insmod command line. This
331 string MUST NOT start with a digit or a small 'x'!
333 At this point you can run a 'cat /dev/isdnctrl0' and view debugging messages.
335 At the moment, debugging messages are enabled with the hisaxctrl tool:
337     hisaxctrl <DriverId> DebugCmd <debugging_flags>
339 <DriverId> default is HiSax, if you didn't specify one.
341 DebugCmd is  1  for generic debugging
342             11  for layer 1 development debugging
343             13  for layer 3 development debugging
345 where <debugging_flags> is the integer sum of the following debugging
346 options you wish enabled:
348 With DebugCmd set to 1:
350    0x0001  Link-level <--> hardware-level communication
351    0x0002  Top state machine
352    0x0004  D-Channel Frames for isdnlog
353    0x0008  D-Channel Q.921
354    0x0010  B-Channel X.75
355    0x0020  D-Channel l2
356    0x0040  B-Channel l2
357    0x0080  D-Channel link state debugging
358    0x0100  B-Channel link state debugging
359    0x0200  TEI debug
360    0x0400  LOCK debug in callc.c
361    0x0800  More paranoid debug in callc.c (not for normal use)
362    0x1000  D-Channel l1 state debugging
363    0x2000  B-Channel l1 state debugging
365 With DebugCmd set to 11:
367    0x0001  Warnings (default: on)
368    0x0002  IRQ status
369    0x0004  ISAC
370    0x0008  ISAC FIFO
371    0x0010  HSCX
372    0x0020  HSCX FIFO (attention: full B-Channel output!)
373    0x0040  D-Channel LAPD frame types
374    0x0080  IPAC debug
375    0x0100  HFC receive debug
376    0x0200  ISAC monitor debug
377    0x0400  D-Channel frames for isdnlog (set with 1 0x4 too)
378    0x0800  D-Channel message verbose
380 With DebugCmd set to 13:
382          1  Warnings (default: on)
383          2  l3 protocol descriptor errors
384          4  l3 state machine
385          8  charge info debugging (1TR6)
387 For example, 'hisaxctrl HiSax 1 0x3ff' enables full generic debugging.
389 Because of some obscure problems with some switch equipment, the delay
390 between the CONNECT message and sending the first data on the B-channel is now
391 configurable with
393 hisaxctrl <DriverId> 2 <delay>
394 <delay> in ms Value between 50 and 800 ms is recommended.
396 Downloading Firmware
397 --------------------
398 At the moment, the Sedlbauer speed fax+ is the only card, which
399 needs to download firmware.
400 The firmware is downloaded with the hisaxctrl tool:
402     hisaxctrl <DriverId> 9 <firmware_filename>
404 <DriverId> default is HiSax, if you didn't specify one,
406 where <firmware_filename> is the filename of the firmware file.
408 For example, 'hisaxctrl HiSax 9 ISAR.BIN' downloads the firmware for
409 ISAR based cards (like the Sedlbauer speed fax+).
411 Warning
412 -------
413 HiSax is a work in progress and may crash your machine.
414 For certification look at HiSax.cert file.
416 Limitations
417 -----------
418 At this time, HiSax only works on Euro ISDN lines and German 1TR6 lines.
419 For leased lines see appendix.
421 Bugs
422 ----
423 If you find any, please let me know.
426 Thanks
427 ------
428 Special thanks to:
430         Emil Stephan for the name HiSax which is a mix of HSCX and ISAC.
432         Fritz Elfert, Jan den Ouden, Michael Hipp, Michael Wein,
433         Andreas Kool, Pekka Sarnila, Sim Yskes, Johan Myrre'en,
434         Klaus-Peter Nischke (ITK AG), Christof Petig, Werner Fehn (ELSA GmbH),
435         Volker Schmidt
436         Edgar Toernig and Marcus Niemann for the Sedlbauer driver
437         Stephan von Krawczynski
438         Juergen Quade for the Leased Line part
439         Klaus Lichtenwalder (Klaus.Lichtenwalder@WebForum.DE), for ELSA PCMCIA support
440         Enrik Berkhan (enrik@starfleet.inka.de) for S0BOX specific stuff
441         Ton van Rosmalen for Teles PCI
442         Petr Novak <petr.novak@i.cz> for Winbond W6692 support
443         and more people who are hunting bugs. (If I forgot somebody, please
444         send me a mail).
446         Firma ELSA GmbH
447         Firma Eicon.Diehl GmbH
448         Firma Dynalink NL
449         Firma ASUSCOM NETWORK INC. Taiwan
450         Firma S.u.S.E
451         Firma ith Kommunikationstechnik GmbH
452         Firma Traverse Technologie Australia
453         Firma Medusa GmbH  (www.medusa.de).
454         Firma Quant-X Austria for sponsoring a DEC Alpha board+CPU
455         Firma Cologne Chip Designs GmbH
457         My girl friend and partner in life Ute for her patience with me.
460 Enjoy,
462 Karsten Keil
463 keil@isdn4linux.de
466 Appendix: Teles PCMCIA driver
467 -----------------------------
470    http://www.stud.uni-wuppertal.de/~ea0141/pcmcia.html
471 for instructions.
473 Appendix: Linux and ISDN-leased lines
474 -------------------------------------
476 Original from Juergen Quade, new version KKe.
478 Attention NEW VERSION, the old leased line syntax won't work !!!
480 You can use HiSax to connect your Linux-Box via an ISDN leased line
481 to e.g. the Internet:
483 1. Build a kernel which includes the HiSax driver either as a module
484    or as part of the kernel.
485      cd /usr/src/linux
486      make menuconfig
487      <ISDN subsystem - ISDN support -- HiSax>
488      make clean; make dep; make zImage; make modules; make modules_install
489 2. Install the new kernel
490      cp /usr/src/linux/arch/i386/boot/zImage /etc/kernel/linux.isdn
491      vi /etc/lilo.conf
492      <add new kernel in the bootable image section>
493      lilo
494 3. in case the hisax driver is a "fixed" part of the kernel, configure
495    the driver with lilo:
496      vi /etc/lilo.conf
497      <add HiSax driver parameter in the global section (see below)>
498      lilo
499    Your lilo.conf _might_ look like the following:
501         # LILO configuration-file
502         # global section
503     # teles 16.0 on IRQ=5, MEM=0xd8000, PORT=0xd80
504         append="hisax=1,3,5,0xd8000,0xd80,HiSax"
505     # teles 16.3 (non pnp) on IRQ=15, PORT=0xd80
506         # append="hisax=3,3,5,0xd8000,0xd80,HiSax"
507         boot=/dev/sda
508         compact        # faster, but won't work on all systems.
509         linear
510         read-only
511         prompt
512         timeout=100
513         vga = normal    # force sane state
514         # Linux bootable partition config begins
515         image = /etc/kernel/linux.isdn
516         root = /dev/sda1
517         label = linux.isdn
518         #
519         image = /etc/kernel/linux-2.0.30
520         root = /dev/sda1
521         label = linux.secure
523    In the line starting with "append" you have to adapt the parameters
524    according to your card (see above in this file)
526 3. boot the new linux.isdn kernel
527 4. start the ISDN subsystem:
528    a) load - if necessary - the modules (depends, whether you compiled
529       the ISDN driver as module or not)
530       According to the type of card you have to specify the necessary
531       driver parameter (irq, io, mem, type, protocol).
532       For the leased line the protocol is "3". See the table above for
533       the parameters, which you have to specify depending on your card.
534    b) configure i4l
535       /sbin/isdnctrl addif isdn0
536       # EAZ  1 -- B1 channel   2 --B2 channel
537       /sbin/isdnctrl eaz isdn0 1
538       /sbin/isdnctrl secure isdn0 on
539       /sbin/isdnctrl huptimeout isdn0 0
540       /sbin/isdnctrl l2_prot isdn0 hdlc
541       # Attention you must not set an outgoing number !!! This won't work !!!
542       # The incoming number is LEASED0 for the first card, LEASED1 for the
543       # second and so on.
544       /sbin/isdnctrl addphone isdn0 in LEASED0
545       # Here is no need to bind the channel.
546    c) in case the remote partner is a CISCO:
547       /sbin/isdnctrl encap isdn0 cisco-h
548    d) configure the interface
549       /sbin/ifconfig isdn0 ${LOCAL_IP} pointopoint ${REMOTE_IP}
550    e) set the routes
551       /sbin/route add -host ${REMOTE_IP} isdn0
552       /sbin/route add default gw ${REMOTE_IP}
553    f) switch the card into leased mode for each used B-channel
554       /sbin/hisaxctrl HiSax 5 1
556 Remarks:
557 a) Use state of the art isdn4k-utils
559 Here an example script:
560 #!/bin/sh
561 # Start/Stop ISDN leased line connection
563 I4L_AS_MODULE=yes
564 I4L_REMOTE_IS_CISCO=no
565 I4L_MODULE_PARAMS="type=16 io=0x268 irq=7 "
566 I4L_DEBUG=no
567 I4L_LEASED_128K=yes
568 LOCAL_IP=192.168.1.1
569 REMOTE_IP=192.168.2.1
571 case "$1" in
572     start)
573         echo "Starting ISDN ..."
574         if [ ${I4L_AS_MODULE} = "yes" ]; then
575                 echo "loading modules..."
576                 /sbin/modprobe hisax ${I4L_MODULE_PARAMS}
577         fi
578         # configure interface
579         /sbin/isdnctrl addif isdn0
580         /sbin/isdnctrl secure isdn0 on
581         if [ ${I4L_DEBUG} = "yes" ]; then
582                 /sbin/isdnctrl verbose 7
583                 /sbin/hisaxctrl HiSax 1 0xffff
584                 /sbin/hisaxctrl HiSax 11 0xff
585                 cat  /dev/isdnctrl >/tmp/lea.log &
586         fi
587         if [ ${I4L_REMOTE_IS_CISCO} = "yes" ]; then
588                 /sbin/isdnctrl encap isdn0 cisco-h
589         fi
590         /sbin/isdnctrl huptimeout isdn0 0
591         # B-CHANNEL 1
592         /sbin/isdnctrl eaz isdn0 1
593         /sbin/isdnctrl l2_prot isdn0 hdlc
594         # 1. card
595         /sbin/isdnctrl addphone isdn0 in LEASED0
596         if [ ${I4L_LEASED_128K} = "yes" ]; then
597                 /sbin/isdnctrl addslave isdn0 isdn0s
598                 /sbin/isdnctrl secure isdn0s on
599                 /sbin/isdnctrl huptimeout isdn0s 0
600                 # B-CHANNEL 2
601                 /sbin/isdnctrl eaz isdn0s 2
602                 /sbin/isdnctrl l2_prot isdn0s hdlc
603                 # 1. card
604                 /sbin/isdnctrl addphone isdn0s in LEASED0
605                 if [ ${I4L_REMOTE_IS_CISCO} = "yes" ]; then
606                         /sbin/isdnctrl encap isdn0s cisco-h
607                 fi
608         fi
609         /sbin/isdnctrl dialmode isdn0 manual
610         # configure tcp/ip
611         /sbin/ifconfig isdn0 ${LOCAL_IP} pointopoint ${REMOTE_IP}
612         /sbin/route add -host ${REMOTE_IP} isdn0
613         /sbin/route add default gw ${REMOTE_IP}
614         # switch to leased mode
615         # B-CHANNEL 1
616         /sbin/hisaxctrl HiSax 5 1
617         if [ ${I4L_LEASED_128K} = "yes" ]; then
618                 # B-CHANNEL 2
619                 sleep 10; /* Wait for master */
620                 /sbin/hisaxctrl HiSax 5 2
621         fi
622         ;;
623     stop)
624         /sbin/ifconfig isdn0 down
625         /sbin/isdnctrl delif isdn0
626         if [ ${I4L_DEBUG} = "yes" ]; then
627                 killall cat
628         fi
629         if [ ${I4L_AS_MODULE} = "yes" ]; then
630                 /sbin/rmmod hisax
631                 /sbin/rmmod isdn
632                 /sbin/rmmod ppp
633                 /sbin/rmmod slhc
634         fi
635         ;;
636     *)
637         echo "Usage: $0 {start|stop}"
638         exit 1
639 esac
640 exit 0