GigaSet 307x Device Driver (Version 1.0.0) ========================================== 0. Warning ------- This source is still not finished and many features are not included. Therefore do not use it if you really need a stable ISDN connection or special features. But feel free to help developing these drivers... USE THIS AT YOUR OWN RISK! 1. Requirements ------------ 1.1. Hardware -------- This release 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: 307x/417x: Gigaset SX255isdn Gigaset SX353isdn Sinus 45 [AB] isdn (Deutsche Telekom) Sinus 721X/XA Vox Chicago 390 ISDN (KPN Telecom) M101: Sinus 45 Data 1 (Telekom) M105: Gigaset USB Adapter DECT Sinus 45 Data 2 (Telekom) Sinus 721 data Chicago 390 USB (KPN) See also http://www.erbze.info/sinus_gigaset.htm and http://gigaset307x.sourceforge.net/ We had also reports from users of Gigaset M105 who could use the drivers with SX 100 and CX 100 isdn bases (only in unimodem mode, see section 3.5.). If you have another device that works with our driver, please let us know. For example, Gigaset SX205isdn/Sinus 721 X SE and Gigaset SX303isdn bases are just versions without answering machine of models known to work, so they should work just as well; but so far we are lacking positive reports on these. Chances of getting an USB device to work are good if the output of lsusb at the command line contains one of the following: ID 0681:0001 ID 0681:0002 ID 0681:0009 ID 0681:0021 ID 0681:0022 1.2. Software -------- You will need a Linux kernel >= 2.6.17. From release 2.6.17 on, the base and M105 drivers are included in the standard kernel distribution, so you should install this package only if you need the M101 (serial) driver and/or the configuration scripts. You can install both modules from release 1.0.0+ and 0.5.2+ if you need old and new kernel releases. If you compile the driver from the sources, you'll need the usual development tools as gnu make and gcc. (You should use the same version your kernel was compiled with. See cat /proc/version and gcc --version The build is tested with gcc 2.95.3, 3.3.1, 3.3.5, ...) You also need _configured_ kernel sources (version and configuration of the sources and your kernel should match) or kernel headers. Your distribution might provide a package like "kernel_source"... Users of SuSE 9.1 and 9.2 need to install the package "kernel-syms", too. 2. Installation ------------ 2.1. Binary packages (rpm) --------------------- We provide rpms for some distributions (currently SuSE 9.3 & SuSE 10.0; if you want to provide packages for your distribution, please let us know). You can install them using rpm -i package1.rpm package2.rpm or with some graphical front-end. Note that you can only use binary packages built for your distribution and kernel version (see "uname -r"). Also note that there are separate packages for the kernel modules, now. Example: On a SuSE 4.2 system with kernel 3.1.4-159-default, you should install the packages gigaset-driver-1.0.0-1-suse42.i586.rpm and gigaset-modules-3.1.4-149-default-1.0.0-1-suse42.i586.rpm You might need to run some distribution specific configuration script after this. See the README files in the documentation directory (usually /usr/share/doc/packages/gigaset-driver). 2.2. Build rpm packages from source rpms ----------------------------------- If you didn't find binary rpms matching your system, or for some other reason want to build your own binaries: - download the src.rpm package - If you don't have a file .rpmmacros in your home directory: cd echo "%_topdir $HOME/rpm" >> .rpmmacros mkdir rpm cd rpm mkdir BUILD RPMS SOURCES SPECS SRPMS - Build the packages: rpmbuild --rebuild /path/to/gigaset-driver-VERSION.src.rpm --with debug - Get the rpm packages from ~/rpm/RPMS and install them as described in 2.1. 2.3. Compiling from source --------------------- STEP 1: Unpack the sources -------------------------- tar -xzvf gigaset-driver-VERSION.tar.gz or tar -xjvf gigaset-driver-VERSION.tar.bz2 will create a directory gigaset-driver-VERSION containing the sources (VERSION currently is 1.0.0). After changing to this directory with cd gigaset-driver-VERSION you can STEP 2: Configure the driver ---------------------------- using ./configure If you work with a copy of the kernel sources you must tell configure where it it can find them: ./configure --kerneldir=PATH --kernel=KERNELVERSION where KERNELVERSION is the kernel version you can find out with uname -r and PATH is the PATH to the kernel sources. For more parameters, see ./configure --help If there are no error messages, you can STEP 3: Build the driver ------------------------ using make or, if you need a special C compiler make CC=/path/to/cc (if you have run make before and changed the configuration using configure after that, you should run "make clean" before make.) If there are no error messages, you can STEP 4: Install the driver -------------------------- using make install as root which will copy the driver and helper programs to the destination directories and configure your system (depending on your distribution). 3. How to use the driver --------------------- 3.1. Configuration Scripts --------------------- We provide subdirectories for some distributions (currently SuSE 7 [gigaset-VERSION/suse7], SuSE 8 + SuSE 9 [gigaset-VERSION/suse8]) where you can find scripts or READMEs which help you setting up the network configuration. Users who installed the rpm packages can find the information in some file README.*, e.g. README.suse8 (for SuSE 8.x and 9.x). You only need to read the following subsections if you don't find such a directory for your distribution, or if you want to understand what these scripts do (e.g. if they don't work as expected). 3.2. Modules ------- To get the device working, you have to load the proper kernel module. You can do this using modprobe modulename where modulename is ser_gigaset (M101), usb_gigaset (M105), or bas_gigaset (direct USB connection to the base). If you connect the M101 to a serial port other than the default (/dev/ttyS1 alias COM2, port 0x2f8, IRQ 3) you have to pass the proper port and IRQ number as parameters to the ser_gigaset module, e.g. modprobe ser_gigaset port=0x3f8 irq=4 for the standard serial port 0 (COM1). If your attempt to load ser_gigaset fails with your system log showing the message: ser_gigaset: Device at base address 2f8 is aleady used ! Allocation failed ! you need to free the serial port's resources with the command setserial /dev/ttyS1 uart none This command must be run at every boot before loading the ser_gigaset module, so you should add it to your system's startup scripts at an appropriate place. If you use a different serial port change the device file accordingly (e.g. /dev/ttyS0 for COM1). 3.3. Device nodes for user space programs ------------------------------------ The device nodes /dev/ttyGS0, /dev/ttyGU0, and /dev/ttyGB0 (for M101, M105, base) are created by udev. You can also select a "default device" which is used by the frontends when no device node is given as parameter: ln -s /dev/ttyGB0 /dev/ttyG (as root; use /dev/ttyGU0 or /dev/ttyGS0 instead of /dev/ttyGB0 when you use an M105 or M101) 3.4. isdn4linux ---------- This is the "normal" mode of operation. After loading the module you can set up the isdn system as you'd do with a "normal" isdn card using the hisax driver. Your distribution should provide some configuration utility. If not, you can use some HOWTOs like http://www.linuxhaven.de/dlhp/HOWTO/DE-ISDN-HOWTO-5.html If this doesn't work, because you have some recent device like SX100 where debug output (see section 5.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 you might need to use unimodem mode: 3.5. Unimodem mode ------------- This is needed for some devices [e.g. SX100] as they have problems with the "normal" commands. You need the device files /dev/ttyGU0, /dev/ttyGB0, and/or /dev/ttyGS0 for this mode, see section 3.3. If you have installed the command line tool gigacontr, you can enter unimodem mode using gigacontr --dev /dev/ttyGU0 --mode unimodem for the M105. Users of M101 should use /dev/ttyGS0 and users of the base driver /dev/ttyGB0. You can switch back using gigacontr --dev /dev/ttyGU0 --mode isdn You can also load the driver using e.g. modprobe usb_gigaset startmode=0 to prevent the driver from starting in "isdn4linux mode". In this mode the device works like a modem connected to a serial port (the /dev/ttyGU0, ... mentioned above) which understands the commands ATZ init, reset => OK or ERROR ATD ATDT dial => OK, CONNECT, BUSY, NO DIAL TONE, NO CARRIER, NO ANSWER +++ change to command mode when connected ATH hangup You can use some configuration tool of your distribution to configure this "modem" or configure pppd/wvdial manually. There are some example ppp configuration files and chat scripts in the gigaset-VERSION/ppp directory. Please note that the USB drivers are not able to change the state of the control lines (the M105 driver can be configured to use some undocumented control requests, if you really need the control lines, though). 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 options ppp_async flag_time=0 to /etc/modules.conf (2.4) or /etc/modprobe.conf (2.6). If your distribution has some local module configuration file like /etc/modules.conf.local (2.4) or /etc/modprobe.conf.local (2.6), using that should be preferred. 3.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 mode"). Without Call-IDs (in Unimodem mode), only a very limited set of functions is available. It allows outgoing data connections only, but does not signal incoming calls or other base events. DECT cordless data devices (M10x) permanently occupy the cordless connection to the base while Call-IDs are activated. As the Gigaset bases only support one DECT data connection at a time, this prevents other DECT cordless data devices from accessing the base. 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 in turn, select Unimodem mode by passing the parameter "cidmode=0" to the driver ("modprobe usb_gigaset cidmode=0", modprobe.conf, modules.conf). If you want both of these at once, you are out of luck. You also can use the sysfs for changing the CID mode setting: 2.6.17: /sys/bus/platform/drivers/ser_gigaset/ser_gigaset.0/cidmode /sys/bus/usb/drivers/usb_gigaset/DEVICE/cidmode /sys/bus/usb/drivers/bas_gigaset/DEVICE/cidmode (DEVICE is one of these beautiful USB interface names like 1-1:1.0) 2.6.18+: /sys/class/tty/ttyGS0/cidmode /sys/class/tty/ttyGU0/cidmode /sys/class/tty/ttyGB0/cidmode 4. Uninstalling the driver ----------------------- 4.1. Binary packages (rpm) --------------------- You can uninstall the drivers using rpm -e packagename or with some graphical front-end. 4.2. Installed from source --------------------- You can uninstall the drivers using make uninstall in the gigaset-driver-VERSION directory. If you deleted this directory, you should unpack the sources again and run configure with the same parameters you used when installing the drivers (at least kernel version, distribution and supported devices should match). 5. Troubleshooting --------------- 5.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 options isdn dialtimeout=15 to /etc/modules.conf (2.4) or /etc/modprobe.conf (2.6). If your distribution has some local module configuration file like /etc/modules.conf.local (2.4) or /etc/modprobe.conf.local (2.6), using that should be preferred. Problem: You can't load the serial driver module ser_gigaset. Solution: You must free the resources of the serial port before loading the module. See section 3.2. Problem: Your isdn script aborts with a message about isdnlog. Solution: Try deactivating (or commenting out) isdnlog. This driver does not support it. Problem: You have two or more DECT data adapters (M101/M105) and only the first one you turn on works. Solution: Select Unimodem mode for all DECT data adapters. (see section 3.5) 5.2. Telling the driver to provide more information ---------------------------------------------- You can recompile the driver to produce additional information useful for debugging with the "--with-debug" configuration option: ./configure --with-debug make clean make You may also need to pass the --kernel=VERSION or --kerneldir=PATH parameters to configure. To install the recompiled driver, run the commands (as root): make installfiles depmod -ae After the depmod command you'll have to force a reload of the module, by one of: - switching to runlevel 1 and back using the init command - calling the appropriate boot scripts of your distribution, e.g. for SuSE 8+9: rcsmpppd stop && rcnetwork stop && rcisdn stop rcisdn start && rcnetwork start && rcsmpppd start - rebooting You can control the amount of debugging information the driver produces by writing an appropriate value to the file /sys/module/gigaset/parameters/debug, e.g. echo 0 > /sys/module/gigaset/parameters/debug switches off debugging output completely, echo 0x10a020 > /sys/module/gigaset/parameters/debug enables the standard 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 options gigaset debug=0 to /etc/modules.conf, /etc/modprobe.conf, ... Generated debugging information can be found - as output of the command dmesg - in system log files written by your syslog daemon, usually in /var/log/, e.g. /var/log/messages. 5.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 http://sourceforge.net/projects/gigaset307x or write an electronic mail to . Try to provide as much information as possible, such as - distribution - kernel version (uname -r) - gcc version (gcc --version) - hardware architecture (uname -m, ...) - type and firmware version of your device (base and wireless module, if any) - output of "lsusb -v" (if using an USB device) - error messages - relevant system log messages (it would help if you activate debug output as described in 5.2.) For help with general configuration problems not specific to our driver, such as isdn4linux and network configuration issues, please refer to the appropriate forums and newsgroups. 5.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 5.3. or personal mail to ). We'd like to add scripts, hints, documentation to the driver and/or the project web page. 6. Links, other software --------------------- - Yahoo! Group on the Siemens Gigaset family of devices http://de.groups.yahoo.com/group/Siemens-Gigaset - Siemens Gigaset/T-Sinus compatibility table http://www.erbze.info/sinus_gigaset.htm - Tool for configuration of M101 http://www.linux-magazin.de/Artikel/ausgabe/2001/02/homelan/homelan.html ftp://ftp.linux-magazin.de/pub/devel/gigaset-0.8.tgz 7. Status ------ 7.1 What is finished ---------------- Nothing ... ;-) I can just tell you what is expected to work in this release: Using the syncPPP protocol (ISDN-Net), you should get a running connection to your Internet Provider. With vbox you should be able to answer incoming voice calls. 7.2 What is planned --------------- CAPI support 7.3 What will never be released --------------------------- Fax support: it would have to do everything in software in real time, including modulation and demodulation. Even though an open source implementation of these functions exists (the spandsp library, see http://www.opencall.org) integrating it in this driver is beyond any of us. And even if someone did it, there's still a big chance that the USB communication would add too much delay for it to work. 8. Credits ------- Thanks to Karsten Keil for his help with isdn4linux Deti Fliegl for his base driver code Dennis Dietrich for his kernel 2.6 patches Andreas Rummel for his work and logs to get unimodem mode working Andreas Degert for his logs and patches to get cx 100 working Dietrich Feist for his generous donation of one M105 and two M101 cordless adapters Christoph Schweers for his generous donation of a M34 device and all the other people who sent logs and other information.