Commit 5a5e045b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet
Browse files

docs: isdn: convert to ReST and add to kAPI bookset



The ISDN documentation is a mix of admin guide, uAPI and kAPI.

Ideally, it should be split. Yet, not sure if it would worth
the troble. Anyway, we have the same kind of mix on several
drivers specific documentation. So, just like the others, keep
the directory at the root Documentation/ tree, just adding a
pointer to it at the kAPI section, as the documentation was
written with the Kernel developers in mind.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 32fc3cd8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ needed).
   hid/index
   i2c/index
   iio/index
   isdn/index
   infiniband/index
   leds/index
   media/index
+144 −85
Original line number Diff line number Diff line
Driver for active AVM Controller.
================================
Driver for active AVM Controller
================================

The driver provides a kernel capi2.0 Interface (kernelcapi) and
on top of this a User-Level-CAPI2.0-interface (capi)
@@ -11,18 +13,21 @@ The command avmcapictrl is part of the isdn4k-utils.
t4-files can be found at ftp://ftp.avm.de/cardware/b1/linux/firmware

Currently supported cards:
	B1 ISA (all versions)
	B1 PCI
	T1/T1B (HEMA card)
	M1
	M2
	B1 PCMCIA

	- B1 ISA (all versions)
	- B1 PCI
	- T1/T1B (HEMA card)
	- M1
	- M2
	- B1 PCMCIA

Installing
----------

You need at least /dev/capi20 to load the firmware.

::

    mknod /dev/capi20 c 68 0
    mknod /dev/capi20.00 c 68 1
    mknod /dev/capi20.01 c 68 2
@@ -38,7 +43,7 @@ To use the card you need the t4-files to download the firmware.
AVM GmbH provides several t4-files for the different D-channel
protocols (b1.t4 for Euro-ISDN). Install these file in /lib/isdn.

if you configure as modules load the modules this way:
if you configure as modules load the modules this way::

    insmod /lib/modules/current/misc/capiutil.o
    insmod /lib/modules/current/misc/b1.o
@@ -46,21 +51,30 @@ insmod /lib/modules/current/misc/kernelcapi.o
    insmod /lib/modules/current/misc/capidrv.o
    insmod /lib/modules/current/misc/capi.o

if you have an B1-PCI card load the module b1pci.o
if you have an B1-PCI card load the module b1pci.o::

    insmod /lib/modules/current/misc/b1pci.o
and load the firmware with

and load the firmware with::

    avmcapictrl load /lib/isdn/b1.t4 1

if you have an B1-ISA card load the module b1isa.o
and add the card by calling
and add the card by calling::

    avmcapictrl add 0x150 15
and load the firmware by calling

and load the firmware by calling::

    avmcapictrl load /lib/isdn/b1.t4 1

if you have an T1-ISA card load the module t1isa.o
and add the card by calling
and add the card by calling::

    avmcapictrl add 0x450 15 T1 0
and load the firmware by calling

and load the firmware by calling::

    avmcapictrl load /lib/isdn/t1.t4 1

if you have an PCMCIA card (B1/M1/M2) load the module b1pcmcia.o
@@ -68,15 +82,19 @@ before you insert the card.

Leased Lines with B1
--------------------

Init card and load firmware.

For an D64S use "FV: 1" as phone number

For an D64S2 use "FV: 1" and "FV: 2" for multilink
or "FV: 1,2" to use CAPI channel bundling.

/proc-Interface
-----------------

/proc/capi:
/proc/capi::

  dr-xr-xr-x   2 root     root            0 Jul  1 14:03 .
  dr-xr-xr-x  82 root     root            0 Jun 30 19:08 ..
  -r--r--r--   1 root     root            0 Jul  1 14:03 applications
@@ -91,66 +109,101 @@ or "FV: 1,2" to use CAPI channel bundling.

/proc/capi/applications:
   applid level3cnt datablkcnt datablklen ncci-cnt recvqueuelen
	level3cnt: capi_register parameter
	datablkcnt: capi_register parameter
	ncci-cnt: current number of nccis (connections)
	recvqueuelen: number of messages on receive queue
   for example:
	level3cnt:
	    capi_register parameter
	datablkcnt:
	    capi_register parameter
	ncci-cnt:
	    current number of nccis (connections)
	recvqueuelen:
	    number of messages on receive queue

   for example::

	1 -2 16 2048 1 0
	2 2 7 2048 1 0

/proc/capi/applstats:
   applid recvctlmsg nrecvdatamsg nsentctlmsg nsentdatamsg
	recvctlmsg: capi messages received without DATA_B3_IND
	recvdatamsg: capi DATA_B3_IND received
	sentctlmsg: capi messages sent without DATA_B3_REQ
	sentdatamsg: capi DATA_B3_REQ sent
   for example:
	recvctlmsg:
	    capi messages received without DATA_B3_IND
	recvdatamsg:
	    capi DATA_B3_IND received
	sentctlmsg:
	    capi messages sent without DATA_B3_REQ
	sentdatamsg:
	    capi DATA_B3_REQ sent

   for example::

	1 2057 1699 1721 1699

/proc/capi/capi20: statistics of capi.o (/dev/capi20)
    minor nopen nrecvdropmsg nrecvctlmsg nrecvdatamsg sentctlmsg sentdatamsg
	minor: minor device number of capi device
	nopen: number of calls to devices open
	nrecvdropmsg: capi messages dropped (messages in recvqueue in close)
	nrecvctlmsg: capi messages received without DATA_B3_IND
	nrecvdatamsg: capi DATA_B3_IND received
	nsentctlmsg: capi messages sent without DATA_B3_REQ
	nsentdatamsg: capi DATA_B3_REQ sent
	minor:
	    minor device number of capi device
	nopen:
	    number of calls to devices open
	nrecvdropmsg:
	    capi messages dropped (messages in recvqueue in close)
	nrecvctlmsg:
	    capi messages received without DATA_B3_IND
	nrecvdatamsg:
	    capi DATA_B3_IND received
	nsentctlmsg:
	    capi messages sent without DATA_B3_REQ
	nsentdatamsg:
	    capi DATA_B3_REQ sent

   for example::

   for example:
	1 2 18 0 16 2

/proc/capi/capidrv: statistics of capidrv.o (capi messages)
    nrecvctlmsg nrecvdatamsg sentctlmsg sentdatamsg
	nrecvctlmsg: capi messages received without DATA_B3_IND
	nrecvdatamsg: capi DATA_B3_IND received
	nsentctlmsg: capi messages sent without DATA_B3_REQ
	nsentdatamsg: capi DATA_B3_REQ sent
	nrecvctlmsg:
	    capi messages received without DATA_B3_IND
	nrecvdatamsg:
	    capi DATA_B3_IND received
	nsentctlmsg:
	    capi messages sent without DATA_B3_REQ
	nsentdatamsg:
	    capi DATA_B3_REQ sent

   for example:
	2780 2226 2256 2226

/proc/capi/controller:
   controller drivername state cardname   controllerinfo
   for example:

   for example::

	1 b1pci      running  b1pci-e000       B1 3.07-01 0xe000 19
	2 t1isa      running  t1isa-450        B1 3.07-01 0x450 11 0
	3 b1pcmcia   running  m2-150           B1 3.07-01 0x150 5

/proc/capi/contrstats:
    controller nrecvctlmsg nrecvdatamsg sentctlmsg sentdatamsg
	nrecvctlmsg: capi messages received without DATA_B3_IND
	nrecvdatamsg: capi DATA_B3_IND received
	nsentctlmsg: capi messages sent without DATA_B3_REQ
	nsentdatamsg: capi DATA_B3_REQ sent
   for example:
	nrecvctlmsg:
	    capi messages received without DATA_B3_IND
	nrecvdatamsg:
	    capi DATA_B3_IND received
	nsentctlmsg:
	    capi messages sent without DATA_B3_REQ
	nsentdatamsg:
	    capi DATA_B3_REQ sent

   for example::

	1 2845 2272 2310 2274
	2 2 0 2 0
	3 2 0 2 0

/proc/capi/driver:
   drivername ncontroller
   for example:

   for example::

	b1pci                            1
	t1isa                            1
	b1pcmcia                         1
@@ -158,17 +211,22 @@ b1isa 0

/proc/capi/ncci:
   apllid ncci winsize sendwindow
   for example:

   for example::

	1 0x10101 8 0

/proc/capi/users: kernelmodules that use the kernelcapi.
   name
   for example:

   for example::

	capidrv
	capi20

Questions
---------

Check out the FAQ (ftp.isdn4linux.de) or subscribe to the
linux-avmb1@calle.in-berlin.de mailing list by sending
a mail to majordomo@calle.in-berlin.de with
@@ -180,6 +238,7 @@ ftp://ftp.avm.de/cardware/b1/linux/

Bugs
----

If you find any please let me know.

Enjoy,
+5 −2
Original line number Diff line number Diff line
=======
Credits
=======


I want to thank all who contributed to this project and especially to:
(in alphabetical order)
@@ -67,4 +71,3 @@ Gerhard 'Fido' Schneider (fido@wuff.mayn.de)
Thomas Uhl (uhl@think.de)
  For distributing the cards.
  For pushing me to work ;-)
+177 −115
Original line number Diff line number Diff line
==========================
GigaSet 307x Device Driver
==========================

1.   Requirements
     ------------
=================

1.1. Hardware
     --------
-------------

     This driver supports the connection of the Gigaset 307x/417x family of
     ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB
     connection. The following devices are reported to be compatible:

     Bases:
        Siemens Gigaset 3070/3075 isdn
        Siemens Gigaset 4170/4175 isdn
        Siemens Gigaset SX205/255
        Siemens Gigaset SX353
        T-Com Sinus 45 [AB] isdn
        T-Com Sinus 721X[A] [SE]
        Vox Chicago 390 ISDN (KPN Telecom)
       - Siemens Gigaset 3070/3075 isdn
       - Siemens Gigaset 4170/4175 isdn
       - Siemens Gigaset SX205/255
       - Siemens Gigaset SX353
       - T-Com Sinus 45 [AB] isdn
       - T-Com Sinus 721X[A] [SE]
       - Vox Chicago 390 ISDN (KPN Telecom)

     RS232 data boxes:
        Siemens Gigaset M101 Data
        T-Com Sinus 45 Data 1
       - Siemens Gigaset M101 Data
       - T-Com Sinus 45 Data 1

     USB data boxes:
        Siemens Gigaset M105 Data
        Siemens Gigaset USB Adapter DECT
        T-Com Sinus 45 Data 2
        T-Com Sinus 721 data
        Chicago 390 USB (KPN)
       - Siemens Gigaset M105 Data
       - Siemens Gigaset USB Adapter DECT
       - T-Com Sinus 45 Data 2
       - T-Com Sinus 721 data
       - Chicago 390 USB (KPN)

     See also http://www.erbze.info/sinus_gigaset.htm
       (archived at https://web.archive.org/web/20100717020421/http://www.erbze.info:80/sinus_gigaset.htm ) and
@@ -37,9 +40,12 @@ GigaSet 307x Device Driver
     with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.5.)
     If you have another device that works with our driver, please let us know.

     Chances of getting an USB device to work are good if the output of
     Chances of getting an USB device to work are good if the output of::

	lsusb
     at the command line contains one of the following:

     at the command line contains one of the following::

	ID 0681:0001
	ID 0681:0002
	ID 0681:0009
@@ -47,7 +53,8 @@ GigaSet 307x Device Driver
	ID 0681:0022

1.2. Software
     --------
-------------

     The driver works with the Kernel CAPI subsystem and can be used with any
     software which is able to use CAPI 2.0 for ISDN connections (voice or data).

@@ -58,9 +65,11 @@ GigaSet 307x Device Driver


2.   How to use the driver
     ---------------------
==========================

2.1. Modules
     -------
------------

     For the devices to work, the proper kernel modules have to be loaded.
     This normally happens automatically when the system detects the USB
     device (base, M105) or when the line discipline is attached (M101). It
@@ -71,13 +80,17 @@ GigaSet 307x Device Driver
     which uses the regular serial port driver to access the device, and must
     therefore be attached to the serial device to which the M101 is connected.
     The ldattach(8) command (included in util-linux-ng release 2.14 or later)
     can be used for that purpose, for example:
     can be used for that purpose, for example::

	ldattach GIGASET_M101 /dev/ttyS1

     This will open the device file, attach the line discipline to it, and
     then sleep in the background, keeping the device open so that the line
     discipline remains active. To deactivate it, kill the daemon, for example
     with
     with::

	killall ldattach

     before disconnecting the device. To have this happen automatically at
     system startup/shutdown on an LSB compatible system, create and activate
     an appropriate LSB startup script /etc/init.d/gigaset. (The init name
@@ -86,6 +99,7 @@ GigaSet 307x Device Driver

     The modules accept the following parameters:

	=============== ========== ==========================================
	Module		Parameter  Meaning

	gigaset		debug	   debug level (see section 3.2.)
@@ -96,11 +110,14 @@ GigaSet 307x Device Driver
	usb_gigaset )	cidmode    initial Call-ID mode setting (see section
				   2.5.): 1=on (default), 0=off

	=============== ========== ==========================================

     Depending on your distribution you may want to create a separate module
     configuration file like /etc/modprobe.d/gigaset.conf for these.

2.2. Device nodes for user space programs
     ------------------------------------
-----------------------------------------

     The device can be accessed from user space (eg. by the user space tools
     mentioned in 1.2.) through the device nodes:

@@ -113,46 +130,56 @@ GigaSet 307x Device Driver

     You can also set a "default device" for the user space tools to use when
     no device node is given as parameter, by creating a symlink /dev/ttyG to
     one of them, eg.:
     one of them, eg.::

	ln -s /dev/ttyGB0 /dev/ttyG

     The devices accept the following device specific ioctl calls
     (defined in gigaset_dev.h):

     ioctl(int fd, GIGASET_REDIR, int *cmd);
     ``ioctl(int fd, GIGASET_REDIR, int *cmd);``

     If cmd==1, the device is set to be controlled exclusively through the
     character device node; access from the ISDN subsystem is blocked.

     If cmd==0, the device is set to be used from the ISDN subsystem and does
     not communicate through the character device node.

     ioctl(int fd, GIGASET_CONFIG, int *cmd);
     ``ioctl(int fd, GIGASET_CONFIG, int *cmd);``

     (ser_gigaset and usb_gigaset only)

     If cmd==1, the device is set to adapter configuration mode where commands
     are interpreted by the M10x DECT adapter itself instead of being
     forwarded to the base station. In this mode, the device accepts the
     commands described in Siemens document "AT-Kommando Alignment M10x Data"
     for setting the operation mode, associating with a base station and
     querying parameters like field strengh and signal quality.

     Note that there is no ioctl command for leaving adapter configuration
     mode and returning to regular operation. In order to leave adapter
     configuration mode, write the command ATO to the device.

     ioctl(int fd, GIGASET_BRKCHARS, unsigned char brkchars[6]);
     ``ioctl(int fd, GIGASET_BRKCHARS, unsigned char brkchars[6]);``

     (usb_gigaset only)

     Set the break characters on an M105's internal serial adapter to the six
     bytes stored in brkchars[]. Unused bytes should be set to zero.

     ioctl(int fd, GIGASET_VERSION, unsigned version[4]);
     Retrieve version information from the driver. version[0] must be set to
     one of:

     - GIGVER_DRIVER: retrieve driver version
     - GIGVER_COMPAT: retrieve interface compatibility version
     - GIGVER_FWBASE: retrieve the firmware version of the base

     Upon return, version[] is filled with the requested version information.

2.3. CAPI
     ----
---------

     The devices will show up as CAPI controllers as soon as the
     corresponding driver module is loaded, and can then be used with
     CAPI 2.0 kernel and user space applications. For user space access,
@@ -165,9 +192,10 @@ GigaSet 307x Device Driver
     driver.

2.5. Unimodem mode
     -------------
------------------

     In this mode the device works like a modem connected to a serial port
     (the /dev/ttyGU0, ... mentioned above) which understands the commands
     (the /dev/ttyGU0, ... mentioned above) which understands the commands::

	 ATZ                 init, reset
	     => OK or ERROR
@@ -189,40 +217,52 @@ GigaSet 307x Device Driver
     control lines. This means you must use "Stupid Mode" if you are using
     wvdial or you should use the nocrtscts option of pppd.
     You must also assure that the ppp_async module is loaded with the parameter
     flag_time=0. You can do this e.g. by adding a line like
     flag_time=0. You can do this e.g. by adding a line like::

	options ppp_async flag_time=0

     to an appropriate module configuration file, like
     to an appropriate module configuration file, like::

	/etc/modprobe.d/gigaset.conf.

     Unimodem mode is needed for making some devices [e.g. SX100] work which
     do not support the regular Gigaset command set. If debug output (see
     section 3.2.) shows something like this when dialing:
     section 3.2.) shows something like this when dialing::

	 CMD Received: ERROR
	 Available Params: 0
	 Connection State: 0, Response: -1
	 gigaset_process_response: resp_code -1 in ConState 0 !
	 Timeout occurred

     then switching to unimodem mode may help.

     If you have installed the command line tool gigacontr, you can enter
     unimodem mode using
     unimodem mode using::

	 gigacontr --mode unimodem
     You can switch back using

     You can switch back using::

	 gigacontr --mode isdn

     You can also put the driver directly into Unimodem mode when it's loaded,
     by passing the module parameter startmode=0 to the hardware specific
     module, e.g.
     module, e.g.::

	modprobe usb_gigaset startmode=0
     or by adding a line like

     or by adding a line like::

	options usb_gigaset startmode=0
     to an appropriate module configuration file, like

     to an appropriate module configuration file, like::

	/etc/modprobe.d/gigaset.conf

2.6. Call-ID (CID) mode
     ------------------
-----------------------

     Call-IDs are numbers used to tag commands to, and responses from, the
     Gigaset base in order to support the simultaneous handling of multiple
     ISDN calls. Their use can be enabled ("CID mode") or disabled ("Unimodem
@@ -238,6 +278,7 @@ GigaSet 307x Device Driver
     During active operation, the driver switches to the necessary mode
     automatically. However, for the reasons above, the mode chosen when
     the device is not in use (idle) can be selected by the user.

     - If you want to receive incoming calls, you can use the default
       settings (CID mode).
     - If you have several DECT data devices (M10x) which you want to use
@@ -247,25 +288,27 @@ GigaSet 307x Device Driver
     If you want both of these at once, you are out of luck.

     You can also use the tty class parameter "cidmode" of the device to
     change its CID mode while the driver is loaded, eg.
     change its CID mode while the driver is loaded, eg.::

	echo 0 > /sys/class/tty/ttyGU0/cidmode

2.7. Dialing Numbers
     ---------------
     The called party number provided by an application for dialing out must
--------------------
provided by an application for dialing out must
     be a public network number according to the local dialing plan, without
     any dial prefix for getting an outside line.

     Internal calls can be made by providing an internal extension number
     prefixed with "**" (two asterisks) as the called party number. So to dial
     eg. the first registered DECT handset, give "**11" as the called party
     number. Dialing "***" (three asterisks) calls all extensions
     prefixed with ``**`` (two asterisks) as the called party number. So to dial
     eg. the first registered DECT handset, give ``**11`` as the called party
     number. Dialing ``***`` (three asterisks) calls all extensions
     simultaneously (global call).

     Unimodem mode does not support internal calls.

2.8. Unregistered Wireless Devices (M101/M105)
     -----------------------------------------
----------------------------------------------

     The main purpose of the ser_gigaset and usb_gigaset drivers is to allow
     the M101 and M105 wireless devices to be used as ISDN devices for ISDN
     connections through a Gigaset base. Therefore they assume that the device
@@ -279,14 +322,16 @@ GigaSet 307x Device Driver
     modes. See the gigacontr(8) manpage for details.

3.   Troubleshooting
     ---------------
====================

3.1. Solutions to frequently reported problems
     -----------------------------------------
----------------------------------------------

     Problem:
	You have a slow provider and isdn4linux gives up dialing too early.
     Solution:
	Load the isdn module using the dialtimeout option. You can do this e.g.
        by adding a line like
	by adding a line like::

	   options isdn dialtimeout=15

@@ -305,47 +350,63 @@ GigaSet 307x Device Driver
	Select Unimodem mode for all DECT data adapters. (see section 2.5.)

     Problem:
	Messages like this:
	Messages like this::

	    usb_gigaset 3-2:1.0: Could not initialize the device.

	appear in your syslog.
     Solution:
	Check whether your M10x wireless device is correctly registered to the
	Gigaset base. (see section 2.7.)

3.2. Telling the driver to provide more information
     ----------------------------------------------
---------------------------------------------------
     Building the driver with the "Gigaset debugging" kernel configuration
     option (CONFIG_GIGASET_DEBUG) gives it the ability to produce additional
     information useful for debugging.

     You can control the amount of debugging information the driver produces by
     writing an appropriate value to /sys/module/gigaset/parameters/debug, e.g.
     writing an appropriate value to /sys/module/gigaset/parameters/debug,
     e.g.::

	echo 0 > /sys/module/gigaset/parameters/debug

     switches off debugging output completely,

     ::

	echo 0x302020 > /sys/module/gigaset/parameters/debug

     enables a reasonable set of debugging output messages. These values are
     bit patterns where every bit controls a certain type of debugging output.
     See the constants DEBUG_* in the source file gigaset.h for details.

     The initial value can be set using the debug parameter when loading the
     module "gigaset", e.g. by adding a line
     module "gigaset", e.g. by adding a line::

	options gigaset debug=0

     to your module configuration file, eg. /etc/modprobe.d/gigaset.conf

     Generated debugging information can be found
     - as output of the command
     - as output of the command::

	 dmesg

     - in system log files written by your syslog daemon, usually
       in /var/log/, e.g. /var/log/messages.

3.3. Reporting problems and bugs
     ---------------------------
--------------------------------
     If you can't solve problems with the driver on your own, feel free to
     use one of the forums, bug trackers, or mailing lists on

	 https://sourceforge.net/projects/gigaset307x

     or write an electronic mail to the maintainers.

     Try to provide as much information as possible, such as

     - distribution
     - kernel version (uname -r)
     - gcc version (gcc --version)
@@ -362,7 +423,7 @@ GigaSet 307x Device Driver
     appropriate forums and newsgroups.

3.4. Reporting problem solutions
     ---------------------------
--------------------------------
     If you solved a problem with our drivers, wrote startup scripts for your
     distribution, ... feel free to contact us (using one of the places
     mentioned in 3.3.). We'd like to add scripts, hints, documentation
@@ -370,7 +431,8 @@ GigaSet 307x Device Driver


4.   Links, other software
     ---------------------
==========================

     - Sourceforge project developing this driver and associated tools
	 https://sourceforge.net/projects/gigaset307x
     - Yahoo! Group on the Siemens Gigaset family of devices
@@ -381,7 +443,8 @@ GigaSet 307x Device Driver


5.   Credits
     -------
============

     Thanks to

     Karsten Keil
@@ -400,4 +463,3 @@ GigaSet 307x Device Driver
	for his generous donation of a M34 device

     and all the other people who sent logs and other information.
+63 −62

File changed and moved.

Preview size limit exceeded, changes collapsed.

Loading