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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [Documentation/] [isdn/] [README] - Blame information for rev 1625

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

Line No. Rev Author Line
1 1625 jcastillo
README for the ISDN-subsystem
2
 
3
1. Preface
4
 
5
  1.1 Introduction
6
 
7
  This README describes how to set up and how to use the different parts
8
  of the ISDN-subsystem.
9
 
10
  For using the ISDN-subsystem, some additional userlevel programs are
11
  necessary. Those programs and some contributed utilities are available
12
  at
13
 
14
   ftp.franken.de
15
 
16
   /pub/isdn4linux/isdn4k-utils-.tar.gz
17
 
18
 
19
  We also have set up a mailing-list:
20
 
21
   The isdn4linux-project originates in Germany, and therefore by historical
22
   reasons, the mailing-list's primary language is german. However mails
23
   written in english have been welcome all the time.
24
 
25
   to subscribe: write a email to majordomo@hub-wue.franken.de,
26
   Subject irrelevant, in the message body:
27
   subscribe isdn4linux 
28
 
29
   To write to the mailing-list, write to isdn4linux@hub-wue.franken.de
30
 
31
   This mailinglist is bidirectionally gated to the newsgroup
32
 
33
     de.alt.comm.isdn4linux
34
 
35
  There is also a well maintained FAQ (both english and german) available
36
  at ftp.franken.de in /pub/isdn4linux/FAQ/
37
  This FAQ is also available at http://www.lrz-muenchen.de/~ui161ab/www/isdn/
38
 
39
  1.1 Technical details
40
 
41
  In the following Text, the terms MSN and EAZ are used.
42
 
43
  MSN is the abbreviation for (M)ultiple(S)ubscriber(N)umber, and applies
44
  to Euro(EDSS1)-type lines. Usually it is simply the phone number.
45
 
46
  EAZ is the abbreviation of (E)ndgeraete(A)uswahl(Z)iffer and
47
  applies to German 1TR6-type lines. This is a one-digit string,
48
  simply appended to the base phone number
49
 
50
  The internal handling is nearly identical, so replace the appropriate
51
  term to that one, which applies to your local ISDN-environment.
52
 
53
  When the link-level-module isdn.o is loaded, it supports up to 16
54
  low-level-modules with up to 64 channels. (The number 64 is arbitrarily
55
  chosen and can be configured at compile-time --ISDN_MAX in isdn.h).
56
  A low-level-driver can register itself through an interface (which is
57
  defined in isdnif.h) and gets assigned a slot.
58
  The following char-devices are made available for each channel:
59
 
60
  A raw-control-device with the following functions:
61
     write: raw D-channel-messages (format: depends on driver).
62
     read:  raw D-channel-messages (format: depends on driver).
63
     ioctl: depends on driver, i.e. for the ICN-driver, the base-address of
64
            the ports and the shared memory on the card can be set and read
65
            also the boot-code and the protocol software can be loaded into
66
            the card.
67
 
68
   O N L Y !!!  for debugging (no locking against other devices):
69
   One raw-data-device with the following functions:
70
     write: data to B-channel.
71
     read:  data from B-channel.
72
 
73
   In addition the following devices are made available:
74
 
75
   128 tty-devices (64 cuix and 64 ttyIx) with integrated modem-emulator:
76
   The functionality is almost the same as that of a serial device
77
   (the line-discs are handled by the kernel), which lets you run
78
   SLIP, CSLIP and asynchronous PPP through the devices. We have tested
79
   Seyon, minicom, CSLIP (uri-dip) PPP and mgetty (compiled with NO_FAX),
80
   XCept.
81
 
82
   The modem-emulation supports the following:
83
           1.3.1 Commands:
84
 
85
               ATA      Answer incoming call.
86
               ATD Dial, the number may contain:
87
                        [0-9] and [,#.*WPT-S]
88
                        the latter are ignored until 'S'.
89
                        The 'S' must precede the number, if
90
                        the line is a SPV (German 1TR6).
91
               ATE0     Echo off.
92
               ATE1     Echo on (default).
93
               ATH      Hang-up.
94
               ATH1     Off hook (ignored).
95
               ATH0     Hang-up.
96
               ATI      Return "ISDN for Linux...".
97
               ATI0        "
98
               ATI1        "
99
               ATI2     Report of last connection.
100
               ATO      On line (data mode).
101
               ATQ0     Enable result codes (default).
102
               ATQ1     Disable result codes (default).
103
               ATSx=y   Set register x to y.
104
               ATSx?    Show contents of register x.
105
               ATV0     Numeric responses.
106
               ATV1     English responses (default).
107
               ATZ      Load registers and EAZ/MSN from Profile.
108
               AT&Bx    Set Send-Packet-size to x (max. 4000)
109
                        The real packet-size may be limited by the
110
                        low-level-driver used. e.g. the HiSax-Module-
111
                        limit is 2000. You will get NO Error-Message,
112
                        if you set it to higher values, because at the
113
                        time of giving this command the corresponding
114
                        driver may not be selected (see "Automatic
115
                        Assignment") however the size of outgoing packets
116
                        will be limited correctly.
117
               AT&D0    Ignore DTR
118
               AT&D2    DTR-low-edge: Hang up and return to
119
                        command mode (default).
120
               AT&D3    Same as AT&D2 but also resets all registers.
121
               AT&Ex    Set the EAZ/MSN for this channel to x.
122
               AT&F     Reset all registers and profile to "factory-defaults"
123
               AT&Sx    Set window-size (x = 1..8) (not yet implemented)
124
               AT&V     Show all settings.
125
               AT&W0    Write registers and EAZ/MSN to profile. See also
126
                        iprofd (5.c in this README).
127
               AT&X0    BTX-mode off (default)
128
               AT&X1    BTX-mode on. (S13.1=1, S14=0, S16=7, S18=7, S19=0)
129
 
130
           For voice-mode commands refer to README.audio
131
 
132
           1.3.2 Escape sequence:
133
               During a connection, the emulation reacts just like
134
               a normal modem to the escape sequence +++.
135
               (The escape character - default '+' - can be set in the
136
               register 2).
137
               The DELAY must at least be 1.5 seconds long and delay
138
               between the escape characters must not exceed 0.5 seconds.
139
 
140
           1.3.3 Registers:
141
 
142
              Nr.  Default  Description
143
 
144
                            (no auto-answer if S0=0).
145
              1    0        Count of rings.
146
              2    43       Escape character.
147
                            (a value >= 128 disables the escape sequence).
148
              3    13       Carriage return character (ASCII).
149
              4    10       Line feed character (ASCII).
150
              5    8        Backspace character (ASCII).
151
              6    3        Delay in seconds before dialing.
152
              7    60       Wait for carrier (ignored).
153
              8    2        Pause time for comma (ignored)
154
              9    6        Carrier detect time (ignored)
155
             10    7        Carrier loss to disconnect time (ignored).
156
             11    70       Touch tone timing (ignored).
157
             12    69       Bit coded register:
158
                            Bit 0:    0 = Suppress response messages.
159
                                      1 = Show response messages.
160
                            Bit 1:    0 = English response messages.
161
                                      1 = Numeric response messages.
162
                            Bit 2:    0 = Echo off.
163
                                      1 = Echo on.
164
                            Bit 3     0 = DCD always on.
165
                                      1 = DCD follows carrier.
166
                            Bit 4     0 = CTS follows RTS
167
                                      1 = Ignore RTS, CTS always on.
168
                            Bit 5     0 = return to command mode on DTR low.
169
                                      1 = Same as 0 but also resets all
170
                                          registers.
171
                                      See also register 13, bit 2
172
                            Bit 6     0 = DSR always on.
173
                                      1 = DSR only on if channel is available.
174
                            Bit 7     0 = Cisco-PPP-flag-hack off (default).
175
                                      1 = Cisco-PPP-flag-hack on.
176
             13   0         Bit coded register:
177
                            Bit 0:    0 = Use delayed tty-send-algorithm
178
                                      1 = Direct tty-send.
179
                            Bit 1:    0 = T.70 protocol (Only for BTX!) off
180
                                      1 = T.70 protocol (Only for BTX!) on
181
                            Bit 2:    0 = Don't hangup on DTR low.
182
                                      1 = Hangup on DTR low.
183
                            Bit 3:    0 = Standard response messages
184
                                      1 = Extended response messages
185
                            Bit 4:    0 = CALLER NUMBER before every RING.
186
                                      1 = CALLER NUMBER after first RING.
187
             14   0         Layer-2 protocol:
188
 
189
                                      1 = X75/LAPB with UI-frames
190
                                      2 = X75/LAPB with BUI-frames
191
                                      3 = HDLC
192
                                      4 = Transparent (audio)
193
             15   0         Layer-3 protocol: (at the moment always 0)
194
 
195
             16   250       Send-Packet-size/16
196
             17   8         Window-size (not yet implemented)
197
             18   4         Bit coded register, Service-Octet-1 to accept,
198
                            or to be used on dialout:
199
                            Bit 0:    Service 1 (audio) when set.
200
                            Bit 1:    Service 5 (BTX) when set.
201
                            Bit 2:    Service 7 (data) when set.
202
                            Note: It is possible to set more than one
203
                                  bit. In this case, on incoming calls
204
                                  the selected services are accepted,
205
                                  and if the service is "audio", the
206
                                  Layer-2-protocol is automatically
207
                                  changed to 4 regardless of the setting
208
                                  of register 14. On outgoing calls,
209
                                  the most significant 1-bit is chosen to
210
                                  select the outgoing service octet.
211
             19   0         Service-Octet-2
212
             20   0         Bit coded register (readonly)
213
                            Service-Octet-1 of last call.
214
                            Bit mapping is the same as register 18
215
             21   0         Bit coded register (readonly)
216
                            Set on incoming call (during RING) to
217
                            octet 3 of calling party number IE (Numbering plan)
218
                            See section 4.5.10 of ITU Q.931
219
             22   0         Bit coded register (readonly)
220
                            Set on incoming call (during RING) to
221
                            octet 3a of calling party number IE (Screening info)
222
                            See section 4.5.10 of ITU Q.931
223
 
224
  Last but not least a (at the moment fairly primitive) device to request
225
  the line-status (/dev/isdninfo) is made available.
226
 
227
  Automatic assignment of devices to lines:
228
 
229
  All inactive physical lines are listening to all EAZs for incoming
230
  calls and are NOT assigned to a specific tty or network interface.
231
  When an incoming call is detected, the driver looks first for a network
232
  interface and then for an opened tty which:
233
 
234
  1. is configured for the same EAZ.
235
  2. has the same protocol settings for the B-channel.
236
  3. (only for network interfaces if the security flag is set)
237
     contains the caller number in its access list.
238
  4. Either the channel is not bound exclusively to another Net-interface, or
239
     it is bound AND the other checks apply to exactly this interface.
240
     (For usage of the bind-features, refer to the isdnctrl-man-page)
241
 
242
  Only when a matching interface or tty is found is the call accepted
243
  and the "connection" between the low-level-layer and the link-level-layer
244
  is established and kept until the end of the connection.
245
  In all other cases no connection is established. Isdn4linux can be
246
  configured to either do NOTHING in this case (which is useful, if
247
  other, external devices with the same EAZ/MSN are connected to the bus)
248
  or to reject the call actively. (isdnctrl busreject ...)
249
 
250
  For an outgoing call, the inactive physical lines are searched.
251
  The call is placed on the first physical line, which supports the
252
  requested protocols for the B-channel. If a net-interface, however
253
  is pre-bound to a channel, this channel is used directly.
254
 
255
  This makes it possible to configure several network interfaces and ttys
256
  for one EAZ, if the network interfaces are set to secure operation.
257
  If an incoming call matches one network interface, it gets connected to it.
258
  If another incoming call for the same EAZ arrives, which does not match
259
  a network interface, the first tty gets a "RING" and so on.
260
  As soon as voice gets supported (with the availability of the Diehl-driver),
261
  the service-identifier will be evaluated in addition.
262
 
263
2 System prerequisites:
264
 
265
  ATTENTION!
266
 
267
  Always use the latest module utilities. The current version is
268
  named in Documentation/Changes. Some old versions of insmod
269
  are not capable of setting the driver-Ids correctly.
270
 
271
3. Lowlevel-driver configuration.
272
 
273
   Configuration depends on how the drivers are built. See the
274
   README. for information on driver-specific setup.
275
 
276
4. Device-inodes
277
 
278
   The major and minor numbers and their names are described in
279
   Documentation/devices.txt. The major numbers are:
280
 
281
     43 for the ISDN-tty's.
282
     44 for the ISDN-callout-tty's.
283
     45 for control/info/debug devices.
284
 
285
5. Application
286
 
287
   a) For some card-types, firmware has to be loaded into the cards, before
288
      proceeding with device-independent setup. See README.
289
      for how to do that.
290
 
291
   b) If you only intend to use ttys, you are nearly ready now.
292
 
293
   c) If you want to have really permanent "Modem"-settings on disk, you
294
      can start the daemon iprofd. Give it a path to a file at the command-
295
      line. It will store the profile-settings in this file every time
296
      an AT&W0 is performed on any ISDN-tty. If the file already exists,
297
      all profiles are initialized from this file. If you want to unload
298
      any of the modules, kill iprofd first.
299
 
300
   d) For networking, continue: Create an interface:
301
       isdnctrl addif isdn0
302
 
303
   e) Set the EAZ (or MSN for Euro-ISDN):
304
       isdnctrl eaz isdn0 2
305
 
306
     (For 1TR6 a single digit is allowed, for Euro-ISDN the number is your
307
      real MSN e.g.: Phone-Number)
308
 
309
   f) Set the number for outgoing calls on the interface:
310
       isdnctrl addphone isdn0 out 1234567
311
       ... (this can be executed more than once, all assigned numbers are
312
            tried in order)
313
      and the number(s) for incoming calls:
314
       isdnctrl addphone isdn0 in 1234567
315
 
316
   g) Set the timeout for hang-up:
317
       isdnctrl huptimeout isdn0 
318
 
319
   h) additionally you may activate charge-hang-up (= Hang up before
320
      next charge-info, this only works, if your isdn-provider transmits
321
      the charge-info during and after the connection):
322
       isdnctrl chargehup isdn0 on
323
 
324
   i) Set the dial mode of the interface:
325
       isdnctrl dialmode isdn0 auto
326
      "off" means that you (or the system) cannot make any connection
327
        (neither incoming or outgoing connections are possible). Use
328
        this if you want to be sure that no connections will be made.
329
      "auto" means that the interface is in auto-dial mode, and will
330
        attempt to make a connection whenever a network data packet needs
331
        the interface's link. Note that this can cause unexpected dialouts,
332
        and lead to a high phone bill! Some daemons or other pc's that use
333
        this interface can cause this.
334
        Incoming connections are also possible.
335
      "manual" is a dial mode created to prevent the unexpected dialouts.
336
        In this mode, the interface will never make any connections on its
337
        own. You must explicitly initiate a connection with "isdnctrl dial
338
        sdn0". However, after an idle time of no traffic as configured for
339
        the huptimeout value with isdnctrl, the connection _will_ be ended.
340
        If you don't want any automatic hangup, set the huptimeout value to 0.
341
        "manual" is the default.
342
 
343
   j) Setup the interface with ifconfig as usual, and set a route to it.
344
 
345
   k) (optional) If you run X11 and have Tcl/Tk-wish version 4.0, you can use
346
     the script tools/tcltk/isdnmon. You can add actions for line-status
347
     changes. See the comments at the beginning of the script for how to
348
     do that. There are other tty-based tools in the tools-subdirectory
349
     contributed by Michael Knigge (imon), Volker Götz (imontty) and
350
     Andreas Kool (isdnmon).
351
 
352
   l) For initial testing, you can set the verbose-level to 2 (default: 0).
353
      Then all incoming calls are logged, even if they are not addressed
354
      to one of the configured net-interfaces:
355
      isdnctrl verbose 2
356
 
357
  Now you are ready! A ping to the set address should now result in an
358
  automatic dial-out (look at syslog kernel-messages).
359
  The phone numbers and EAZs can be assigned at any time with isdnctrl.
360
  You can add as many interfaces as you like with addif following the
361
  directions above. Of course, there may be some limitations. But we have
362
  tested as many as 20 interfaces without any problem. However, if you
363
  don't give an interface name to addif, the  kernel will assign a name
364
  which starts with "eth". The number of "eth"-interfaces is limited by
365
  the kernel.
366
 
367
5. Additional options for isdnctrl:
368
 
369
   "isdnctrl secure  on"
370
   Only incoming calls, for which the caller-id is listed in the access
371
   list of the interface are accepted. You can add caller-id's With the
372
   command "isdnctrl addphone  in "
373
   Euro-ISDN does not transmit the leading '0' of the caller-id for an
374
   incoming call, therefore you should configure it accordingly.
375
   If the real number for the dialout e.g. is "09311234567" the number
376
   to configure here is "9311234567". The pattern-match function
377
   works similar to the shell mechanism.
378
 
379
     ?     one arbitrary digit
380
     *     zero or arbitrary many digits
381
     [123] one of the digits in the list
382
     [1-5] one digit between '1' and '5'
383
           a '^' as the first character in a list inverts the list
384
 
385
 
386
   "isdnctrl secure  off"
387
   Switch off secure operation (default).
388
 
389
   "isdnctrl ihup  [on|off]"
390
   Switch the hang-up-timer for incoming calls on or off.
391
 
392
   "isdnctrl eaz "
393
   Returns the EAZ of an interface.
394
 
395
   "isdnctrl delphone  in|out "
396
   Deletes a number from one of the access-lists of the interface.
397
 
398
   "isdnctrl delif "
399
   Removes the interface (and possible slaves) from the kernel.
400
   (You have to unregister it with "ifconfig  down" before).
401
 
402
   "isdnctrl callback  [on|off]"
403
   Switches an interface to callback-mode. In this mode, an incoming call
404
   will be rejected and after this the remote-station will be called. If
405
   you test this feature by using ping, some routers will re-dial very
406
   quickly, so that the callback from isdn4linux may not be recognized.
407
   In this case use ping with the option -i  to increase the interval
408
   between echo-packets.
409
 
410
   "isdnctrl cbdelay  [seconds]"
411
   Sets the delay (default 5 sec) between an incoming call and start of
412
   dialing when callback is enabled.
413
 
414
   "isdnctrl cbhup  [on|off]"
415
   This enables (default) or disables an active hangup (reject) when getting an
416
   incoming call for an interface which is configured for callback.
417
 
418
   "isdnctrl encap  "
419
   Selects the type of packet-encapsulation. The encapsulation can be changed
420
   only while an interface is down.
421
 
422
   At the moment the following values are supported:
423
 
424
   rawip    (Default) Selects raw-IP-encapsulation. This means, MAC-headers
425
            are stripped off.
426
   ip       IP with type-field. Same as IP but the type-field of the MAC-header
427
            is preserved.
428
   cisco-h  A special-mode for communicating with a Cisco, which is configured
429
            to do "hdlc"
430
   ethernet No stripping. Packets are sent with full MAC-header.
431
            The Ethernet-address of the interface is faked, from its
432
            IP-address: fc:fc:i1:i2:i3:i4, where i1-4 are the IP-addr.-values.
433
   syncppp  Synchronous PPP
434
 
435
   uihdlc   HDLC with UI-frame-header (for use with DOS ISPA, option -h1)
436
 
437
   Watching packets, using standard-tcpdump will fail for all encapsulations
438
   except ethernet because tcpdump does not know how to handle packets
439
   without MAC-header. A patch for tcpdump is included in the utility-package
440
   mentioned above.
441
 
442
   "isdnctrl l2_prot  "
443
   Selects a layer-2-protocol.
444
   (With the ICN-driver and the HiSax-driver, "x75i" and "hdlc" is available.
445
   With other drivers, "x75ui", "x75bui" may be possible too.)
446
 
447
   isdnctrl l3_prot  
448
   The same for layer-3. (At the moment only "trans" is allowed)
449
 
450
   "isdnctrl list "
451
   Shows all parameters of an interface and the charge-info.
452
   Try "all" as the interface name.
453
 
454
   "isdnctrl hangup "
455
   Forces hangup of an interface.
456
 
457
   "isdnctrl bind  , [exclusive]"
458
   If you are using more than one ISDN card, it is sometimes necessary to
459
   dial out using a specific card or even preserve a specific channel for
460
   dialout of a specific net-interface. This can be done with the above
461
   command. Replace  by whatever you assigned while loading the
462
   module. The  is counted from zero. The upper limit
463
   depends on the card used. At the moment no card supports more than
464
   2 channels, so the upper limit is one.
465
 
466
   "isdnctrl unbind "
467
   unbinds a previously bound interface.
468
 
469
   "isdnctrl busreject  on|off"
470
   If switched on, isdn4linux replies a REJECT to incoming calls, it
471
   cannot match to any configured interface.
472
   If switched off, nothing happens in this case.
473
   You normally should NOT enable this feature, if the ISDN adapter is not
474
   the only device connected to the S0-bus. Otherwise it could happen that
475
   isdn4linux rejects an incoming call, which belongs to another device on
476
   the bus.
477
 
478
   "isdnctrl addslave  
479
   Creates a slave interface for channel-bundling. Slave interfaces are
480
   not seen by the kernel, but their ISDN-part can be configured with
481
   isdnctrl as usual. (Phone numbers, EAZ/MSN, timeouts etc.) If more
482
   than two channels are to be bundled, feel free to create as many as you
483
   want. InterfaceName must be a real interface, NOT a slave. Slave interfaces
484
   start dialing, if the master interface resp. the previous slave interface
485
   has a load of more than 7000 cps. They hangup if the load goes under 7000
486
   cps, according to their "huptimeout"-parameter.
487
 
488
   "isdnctrl sdelay  secs."
489
   This sets the minimum time an Interface has to be fully loaded, until
490
   it sends a dial-request to its slave.
491
 
492
   "isdnctrl dial "
493
   Forces an interface to start dialing even if no packets are to be
494
   transferred.
495
 
496
   "isdnctrl mapping  MSN0,MSN1,MSN2,...MSN9"
497
   This installs a mapping table for EAZ<->MSN-mapping for a single line.
498
   Missing MSN's have to be given as "-" or can be omitted, if at the end
499
   of the commandline.
500
   With this command, it's now possible to have an interface listening to
501
   mixed 1TR6- and Euro-Type lines. In this case, the interface has to be
502
   configured to a 1TR6-type EAZ (one digit). The mapping is also valid
503
   for tty-emulation. Seen from the interface/tty-level the mapping
504
   CAN be used, however it's possible to use single tty's/interfaces with
505
   real MSN's (more digits) also, in which case the mapping will be ignored.
506
   Here is an example:
507
 
508
   You have a 1TR6-type line with base-nr. 1234567 and a Euro-line with
509
   MSN's 987654, 987655 and 987656. The DriverId for the Euro-line is "EURO".
510
 
511
   isdnctrl mapping EURO -,987654,987655,987656,-,987655
512
   ...
513
   isdnctrl eaz isdn0 1      # listen on 12345671(1tr6) and 987654(euro)
514
   ...
515
   isdnctrl eaz isdn1 4      # listen on 12345674(1tr6) only.
516
   ...
517
   isdnctrl eaz isdn2 987654 # listen on 987654(euro) only.
518
 
519
   Same scheme is used with AT&E...  at the tty's.
520
 
521
6. If you want to write a new low-level-driver, you are welcome.
522
   The interface to the link-level-module is described in the file INTERFACE.
523
   If the interface should be expanded for any reason, don't do it
524
   on your own, send me a mail containing the proposed changes and
525
   some reasoning about them.
526
   If other drivers will not be affected, I will include the changes
527
   in the next release.
528
   For developers only, there is a second mailing-list. Write to me
529
   (fritz@isdn4linux.de), if you want to join that list.
530
 
531
Have fun!
532
 
533
 -Fritz
534
 

powered by: WebSVN 2.1.0

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