OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [Documentation/] [isdn/] [README.HiSax] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.