Merge branch 'floppy'
[sfrench/cifs-2.6.git] / Documentation / isdn / README.gigaset
1 GigaSet 307x Device Driver
2 ==========================
3
4 1.   Requirements
5      ------------
6 1.1. Hardware
7      --------
8      This driver supports the connection of the Gigaset 307x/417x family of
9      ISDN DECT bases via Gigaset M101 Data, Gigaset M105 Data or direct USB
10      connection. The following devices are reported to be compatible:
11
12      Bases:
13         Siemens Gigaset 3070/3075 isdn
14         Siemens Gigaset 4170/4175 isdn
15         Siemens Gigaset SX205/255
16         Siemens Gigaset SX353
17         T-Com Sinus 45 [AB] isdn
18         T-Com Sinus 721X[A] [SE]
19         Vox Chicago 390 ISDN (KPN Telecom)
20
21      RS232 data boxes:
22         Siemens Gigaset M101 Data
23         T-Com Sinus 45 Data 1
24
25      USB data boxes:
26         Siemens Gigaset M105 Data
27         Siemens Gigaset USB Adapter DECT
28         T-Com Sinus 45 Data 2
29         T-Com Sinus 721 data
30         Chicago 390 USB (KPN)
31
32      See also http://www.erbze.info/sinus_gigaset.htm
33        (archived at https://web.archive.org/web/20100717020421/http://www.erbze.info:80/sinus_gigaset.htm ) and
34         http://gigaset307x.sourceforge.net/
35
36      We had also reports from users of Gigaset M105 who could use the drivers
37      with SX 100 and CX 100 ISDN bases (only in unimodem mode, see section 2.5.)
38      If you have another device that works with our driver, please let us know.
39
40      Chances of getting an USB device to work are good if the output of
41         lsusb
42      at the command line contains one of the following:
43         ID 0681:0001
44         ID 0681:0002
45         ID 0681:0009
46         ID 0681:0021
47         ID 0681:0022
48
49 1.2. Software
50      --------
51      The driver works with the Kernel CAPI subsystem and can be used with any
52      software which is able to use CAPI 2.0 for ISDN connections (voice or data).
53
54      There are some user space tools available at
55      https://sourceforge.net/projects/gigaset307x/
56      which provide access to additional device specific functions like SMS,
57      phonebook or call journal.
58
59
60 2.   How to use the driver
61      ---------------------
62 2.1. Modules
63      -------
64      For the devices to work, the proper kernel modules have to be loaded.
65      This normally happens automatically when the system detects the USB
66      device (base, M105) or when the line discipline is attached (M101). It
67      can also be triggered manually using the modprobe(8) command, for example
68      for troubleshooting or to pass module parameters.
69
70      The module ser_gigaset provides a serial line discipline N_GIGASET_M101
71      which uses the regular serial port driver to access the device, and must
72      therefore be attached to the serial device to which the M101 is connected.
73      The ldattach(8) command (included in util-linux-ng release 2.14 or later)
74      can be used for that purpose, for example:
75         ldattach GIGASET_M101 /dev/ttyS1
76      This will open the device file, attach the line discipline to it, and
77      then sleep in the background, keeping the device open so that the line
78      discipline remains active. To deactivate it, kill the daemon, for example
79      with
80         killall ldattach
81      before disconnecting the device. To have this happen automatically at
82      system startup/shutdown on an LSB compatible system, create and activate
83      an appropriate LSB startup script /etc/init.d/gigaset. (The init name
84      'gigaset' is officially assigned to this project by LANANA.)
85      Alternatively, just add the 'ldattach' command line to /etc/rc.local.
86
87      The modules accept the following parameters:
88
89         Module          Parameter  Meaning
90
91         gigaset         debug      debug level (see section 3.2.)
92
93                         startmode  initial operation mode (see section 2.5.):
94         bas_gigaset )              1=CAPI (default), 0=Unimodem
95         ser_gigaset )
96         usb_gigaset )   cidmode    initial Call-ID mode setting (see section
97                                    2.5.): 1=on (default), 0=off
98
99      Depending on your distribution you may want to create a separate module
100      configuration file like /etc/modprobe.d/gigaset.conf for these.
101
102 2.2. Device nodes for user space programs
103      ------------------------------------
104      The device can be accessed from user space (eg. by the user space tools
105      mentioned in 1.2.) through the device nodes:
106
107      - /dev/ttyGS0 for M101 (RS232 data boxes)
108      - /dev/ttyGU0 for M105 (USB data boxes)
109      - /dev/ttyGB0 for the base driver (direct USB connection)
110
111      If you connect more than one device of a type, they will get consecutive
112      device nodes, eg. /dev/ttyGU1 for a second M105.
113
114      You can also set a "default device" for the user space tools to use when
115      no device node is given as parameter, by creating a symlink /dev/ttyG to
116      one of them, eg.:
117
118         ln -s /dev/ttyGB0 /dev/ttyG
119
120      The devices accept the following device specific ioctl calls
121      (defined in gigaset_dev.h):
122
123      ioctl(int fd, GIGASET_REDIR, int *cmd);
124      If cmd==1, the device is set to be controlled exclusively through the
125      character device node; access from the ISDN subsystem is blocked.
126      If cmd==0, the device is set to be used from the ISDN subsystem and does
127      not communicate through the character device node.
128
129      ioctl(int fd, GIGASET_CONFIG, int *cmd);
130      (ser_gigaset and usb_gigaset only)
131      If cmd==1, the device is set to adapter configuration mode where commands
132      are interpreted by the M10x DECT adapter itself instead of being
133      forwarded to the base station. In this mode, the device accepts the
134      commands described in Siemens document "AT-Kommando Alignment M10x Data"
135      for setting the operation mode, associating with a base station and
136      querying parameters like field strengh and signal quality.
137      Note that there is no ioctl command for leaving adapter configuration
138      mode and returning to regular operation. In order to leave adapter
139      configuration mode, write the command ATO to the device.
140
141      ioctl(int fd, GIGASET_BRKCHARS, unsigned char brkchars[6]);
142      (usb_gigaset only)
143      Set the break characters on an M105's internal serial adapter to the six
144      bytes stored in brkchars[]. Unused bytes should be set to zero.
145
146      ioctl(int fd, GIGASET_VERSION, unsigned version[4]);
147      Retrieve version information from the driver. version[0] must be set to
148      one of:
149      - GIGVER_DRIVER: retrieve driver version
150      - GIGVER_COMPAT: retrieve interface compatibility version
151      - GIGVER_FWBASE: retrieve the firmware version of the base
152      Upon return, version[] is filled with the requested version information.
153
154 2.3. CAPI
155      ----
156      The devices will show up as CAPI controllers as soon as the
157      corresponding driver module is loaded, and can then be used with
158      CAPI 2.0 kernel and user space applications. For user space access,
159      the module capi.ko must be loaded.
160
161      Most distributions handle loading and unloading of the various CAPI
162      modules automatically via the command capiinit(1) from the capi4k-utils
163      package or a similar mechanism. Note that capiinit(1) cannot unload the
164      Gigaset drivers because it doesn't support more than one module per
165      driver.
166
167 2.5. Unimodem mode
168      -------------
169      In this mode the device works like a modem connected to a serial port
170      (the /dev/ttyGU0, ... mentioned above) which understands the commands
171
172          ATZ                 init, reset
173              => OK or ERROR
174          ATD
175          ATDT                dial
176              => OK, CONNECT,
177                 BUSY,
178                 NO DIAL TONE,
179                 NO CARRIER,
180                 NO ANSWER
181          <pause>+++<pause>   change to command mode when connected
182          ATH                 hangup
183
184      You can use some configuration tool of your distribution to configure this
185      "modem" or configure pppd/wvdial manually. There are some example ppp
186      configuration files and chat scripts in the gigaset-VERSION/ppp directory
187      in the driver packages from https://sourceforge.net/projects/gigaset307x/.
188      Please note that the USB drivers are not able to change the state of the
189      control lines. This means you must use "Stupid Mode" if you are using
190      wvdial or you should use the nocrtscts option of pppd.
191      You must also assure that the ppp_async module is loaded with the parameter
192      flag_time=0. You can do this e.g. by adding a line like
193
194         options ppp_async flag_time=0
195
196      to an appropriate module configuration file, like
197      /etc/modprobe.d/gigaset.conf.
198
199      Unimodem mode is needed for making some devices [e.g. SX100] work which
200      do not support the regular Gigaset command set. If debug output (see
201      section 3.2.) shows something like this when dialing:
202          CMD Received: ERROR
203          Available Params: 0
204          Connection State: 0, Response: -1
205          gigaset_process_response: resp_code -1 in ConState 0 !
206          Timeout occurred
207      then switching to unimodem mode may help.
208
209      If you have installed the command line tool gigacontr, you can enter
210      unimodem mode using
211          gigacontr --mode unimodem
212      You can switch back using
213          gigacontr --mode isdn
214
215      You can also put the driver directly into Unimodem mode when it's loaded,
216      by passing the module parameter startmode=0 to the hardware specific
217      module, e.g.
218         modprobe usb_gigaset startmode=0
219      or by adding a line like
220         options usb_gigaset startmode=0
221      to an appropriate module configuration file, like
222      /etc/modprobe.d/gigaset.conf
223
224 2.6. Call-ID (CID) mode
225      ------------------
226      Call-IDs are numbers used to tag commands to, and responses from, the
227      Gigaset base in order to support the simultaneous handling of multiple
228      ISDN calls. Their use can be enabled ("CID mode") or disabled ("Unimodem
229      mode"). Without Call-IDs (in Unimodem mode), only a very limited set of
230      functions is available. It allows outgoing data connections only, but
231      does not signal incoming calls or other base events.
232
233      DECT cordless data devices (M10x) permanently occupy the cordless
234      connection to the base while Call-IDs are activated. As the Gigaset
235      bases only support one DECT data connection at a time, this prevents
236      other DECT cordless data devices from accessing the base.
237
238      During active operation, the driver switches to the necessary mode
239      automatically. However, for the reasons above, the mode chosen when
240      the device is not in use (idle) can be selected by the user.
241      - If you want to receive incoming calls, you can use the default
242        settings (CID mode).
243      - If you have several DECT data devices (M10x) which you want to use
244        in turn, select Unimodem mode by passing the parameter "cidmode=0" to
245        the appropriate driver module (ser_gigaset or usb_gigaset).
246
247      If you want both of these at once, you are out of luck.
248
249      You can also use the tty class parameter "cidmode" of the device to
250      change its CID mode while the driver is loaded, eg.
251         echo 0 > /sys/class/tty/ttyGU0/cidmode
252
253 2.7. Dialing Numbers
254      ---------------
255      The called party number provided by an application for dialing out must
256      be a public network number according to the local dialing plan, without
257      any dial prefix for getting an outside line.
258
259      Internal calls can be made by providing an internal extension number
260      prefixed with "**" (two asterisks) as the called party number. So to dial
261      eg. the first registered DECT handset, give "**11" as the called party
262      number. Dialing "***" (three asterisks) calls all extensions
263      simultaneously (global call).
264
265      Unimodem mode does not support internal calls.
266
267 2.8. Unregistered Wireless Devices (M101/M105)
268      -----------------------------------------
269      The main purpose of the ser_gigaset and usb_gigaset drivers is to allow
270      the M101 and M105 wireless devices to be used as ISDN devices for ISDN
271      connections through a Gigaset base. Therefore they assume that the device
272      is registered to a DECT base.
273
274      If the M101/M105 device is not registered to a base, initialization of
275      the device fails, and a corresponding error message is logged by the
276      driver. In that situation, a restricted set of functions is available
277      which includes, in particular, those necessary for registering the device
278      to a base or for switching it between Fixed Part and Portable Part
279      modes. See the gigacontr(8) manpage for details.
280
281 3.   Troubleshooting
282      ---------------
283 3.1. Solutions to frequently reported problems
284      -----------------------------------------
285      Problem:
286         You have a slow provider and isdn4linux gives up dialing too early.
287      Solution:
288         Load the isdn module using the dialtimeout option. You can do this e.g.
289         by adding a line like
290
291            options isdn dialtimeout=15
292
293         to /etc/modprobe.d/gigaset.conf or a similar file.
294
295      Problem:
296         The isdnlog program emits error messages or just doesn't work.
297      Solution:
298         Isdnlog supports only the HiSax driver. Do not attempt to use it with
299         other drivers such as Gigaset.
300
301      Problem:
302         You have two or more DECT data adapters (M101/M105) and only the
303         first one you turn on works.
304      Solution:
305         Select Unimodem mode for all DECT data adapters. (see section 2.5.)
306
307      Problem:
308         Messages like this:
309             usb_gigaset 3-2:1.0: Could not initialize the device.
310         appear in your syslog.
311      Solution:
312         Check whether your M10x wireless device is correctly registered to the
313         Gigaset base. (see section 2.7.)
314
315 3.2. Telling the driver to provide more information
316      ----------------------------------------------
317      Building the driver with the "Gigaset debugging" kernel configuration
318      option (CONFIG_GIGASET_DEBUG) gives it the ability to produce additional
319      information useful for debugging.
320
321      You can control the amount of debugging information the driver produces by
322      writing an appropriate value to /sys/module/gigaset/parameters/debug, e.g.
323         echo 0 > /sys/module/gigaset/parameters/debug
324      switches off debugging output completely,
325         echo 0x302020 > /sys/module/gigaset/parameters/debug
326      enables a reasonable set of debugging output messages. These values are
327      bit patterns where every bit controls a certain type of debugging output.
328      See the constants DEBUG_* in the source file gigaset.h for details.
329
330      The initial value can be set using the debug parameter when loading the
331      module "gigaset", e.g. by adding a line
332         options gigaset debug=0
333      to your module configuration file, eg. /etc/modprobe.d/gigaset.conf
334
335      Generated debugging information can be found
336      - as output of the command
337          dmesg
338      - in system log files written by your syslog daemon, usually
339        in /var/log/, e.g. /var/log/messages.
340
341 3.3. Reporting problems and bugs
342      ---------------------------
343      If you can't solve problems with the driver on your own, feel free to
344      use one of the forums, bug trackers, or mailing lists on
345          https://sourceforge.net/projects/gigaset307x
346      or write an electronic mail to the maintainers.
347
348      Try to provide as much information as possible, such as
349      - distribution
350      - kernel version (uname -r)
351      - gcc version (gcc --version)
352      - hardware architecture (uname -m, ...)
353      - type and firmware version of your device (base and wireless module,
354        if any)
355      - output of "lsusb -v" (if using an USB device)
356      - error messages
357      - relevant system log messages (it would help if you activate debug
358        output as described in 3.2.)
359
360      For help with general configuration problems not specific to our driver,
361      such as isdn4linux and network configuration issues, please refer to the
362      appropriate forums and newsgroups.
363
364 3.4. Reporting problem solutions
365      ---------------------------
366      If you solved a problem with our drivers, wrote startup scripts for your
367      distribution, ... feel free to contact us (using one of the places
368      mentioned in 3.3.). We'd like to add scripts, hints, documentation
369      to the driver and/or the project web page.
370
371
372 4.   Links, other software
373      ---------------------
374      - Sourceforge project developing this driver and associated tools
375          https://sourceforge.net/projects/gigaset307x
376      - Yahoo! Group on the Siemens Gigaset family of devices
377          https://de.groups.yahoo.com/group/Siemens-Gigaset
378      - Siemens Gigaset/T-Sinus compatibility table
379          http://www.erbze.info/sinus_gigaset.htm
380             (archived at https://web.archive.org/web/20100717020421/http://www.erbze.info:80/sinus_gigaset.htm )
381
382
383 5.   Credits
384      -------
385      Thanks to
386
387      Karsten Keil
388         for his help with isdn4linux
389      Deti Fliegl
390         for his base driver code
391      Dennis Dietrich
392         for his kernel 2.6 patches
393      Andreas Rummel
394         for his work and logs to get unimodem mode working
395      Andreas Degert
396         for his logs and patches to get cx 100 working
397      Dietrich Feist
398         for his generous donation of one M105 and two M101 cordless adapters
399      Christoph Schweers
400         for his generous donation of a M34 device
401
402      and all the other people who sent logs and other information.
403