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