README.gigaset 18 KB

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