1\input texinfo @c -*-texinfo-*- 2@c %**start of header 3@c $Id: mgetty.texi-in,v 4.69 2008/01/31 16:30:12 gert Exp $ (c) 1993-2000 Gert Doering and Klaus Weidner 4@setfilename mgetty.info 5@settitle mgetty + sendfax 6@c %**end of header 7@finalout 8 9@ifinfo 10@dircategory Miscellaneous 11@direntry 12* mgetty: (mgetty). Smart getty replacement. 13* sendfax: (mgetty). Standalone backend program to send fax files. 14@end direntry 15 16This is the online documentation for the mgetty + sendfax 17package. 18 19Copyright @copyright{} 1993-2005 Gert Doering 20@end ifinfo 21 22@titlepage 23@sp 6 24@center @titlefont{mgetty+sendfax} 25@sp 4 26@center Version 1.1.32 27@sp 1 28@center January 2002 29@sp 5 30@center Gert Doering 31@center gert@@greenie.muc.de 32 33@vskip 0pt plus 1filll 34@c Copyright @copyright{} 1993-2002 Gert Doering 35@end titlepage 36 37@ifinfo 38@node Top, Intro, (dir), (dir) 39@top mgetty + sendfax 40 41This is the online documentation for the mgetty+sendfax package written 42by Gert Doering. 43 44@menu 45* Intro:: Introduction 46* mgetty:: Using @code{mgetty} 47* Fax:: Fax Operations 48* voice:: Voice Operations 49* Problems:: Common problems and solutions (TROUBLESHOOTING) 50* Thanks:: Credits 51@end menu 52 53@end ifinfo 54 55@c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 56 57@node Intro, mgetty, Top, Top 58@chapter Introduction 59 60@code{mgetty} allows you to make optimum use of your modem or fax modem in 61a unix environment. @code{mgetty} handles incoming calls without 62interfering with outgoing calls. If the modem can do fax class 2 or 2.0, 63@code{mgetty} can also receive faxes. 64 65@code{sendfax} is a standalone backend program to send fax files. 66 67This manual explains how to configure and install the package on various 68operating systems and modems, and how to use those programs. 69 70@menu 71* Copying:: Copying conditions and (lack of) warranty 72* Overview:: Features of @code{mgetty} and @code{sendfax} 73* Supported:: Supported systems and modems 74* Install:: Configuration and installation 75* intro-runtime:: Runtime Configuration: an Overview 76@end menu 77 78@node Copying, Overview, Intro, Intro 79@section Copying conditions and (lack of) warranty 80 81@cartouche 82@strong{WARNING:} This package is still BETA software. Use it at your own 83risk, there is @strong{no} warranty. If it erases all the data on your hard 84disk, damages your hardware, or kills your dog, that is entirely your 85problem. Anyway, the program works for me and quite a lot of other people. 86@end cartouche 87 88The @code{mgetty+sendfax} package is Copyright @copyright{} 1993-2002 89Gert Doering, Klaus Weidner, Marc Eberhard, Marc Schaefer, and others. 90 91It is distributed on terms of the GNU General Public License, which you 92can find in the main mgetty directory in the file @file{COPYING}. 93 94If you want to redistribute @code{mgetty+sendfax} under a different 95license (like in "selling it to your customers"), contact me, and we 96will work something out. 97 98@node Overview, Supported, Copying, Intro 99@section Features of @code{mgetty} and @code{sendfax} 100 101This package contains two major programs, @code{mgetty} and 102@code{sendfax}. 103 104This is what you can do with @code{sendfax} if you have a standard 105class 2 fax modem: 106 107@itemize @bullet 108@item 109send faxes directly or using shell scripts 110 111@item 112do ``fax polling'', this means you can call the weather station and 113get them to send you a fax containing the current weather map. (Not all 114modem manufacturers implement this feature in their modems!) 115 116@item 117create a ``fax queue'', outgoing faxes get sent automatically, the 118user is informed by mail about the result. 119@end itemize 120 121@code{mgetty} allows you to use your modem line for receiving fax and 122data calls, without hindering dial-out on the same line. 123 124@itemize @bullet 125 126@item 127@code{mgetty} knows about ``smart'' modems, and will make sure that the 128modem is always in a defined state (specific modem initialization possible) 129 130@item 131Incoming calls are answered manually (@code{RING} 132-> @code{ATA} -> @code{CONNECT}) instead of using auto-answer 133(@samp{ATS0=1}), this way the modem won't pick up the phone when the 134machine is down or logins are not allowed. 135 136@item 137@code{mgetty} incorporates all features of uugetty: it honours @file{LCK.*} 138files created by @code{uucico} and other comm programs, this way it will 139prevent dial-outs while a caller is online and it won't be confused if 140other programs use the modem. 141 142@item 143@code{mgetty} can receive faxes (if your modem supports fax class 2 or 2.0). 144 145@item 146@code{mgetty} knows about incoming FidoNet calls. 147 148@item 149@code{mgetty} has extensive logging / debugging features 150 151@item 152do ``fax poll sending'', that is, you can setup your machine as fax poll 153server, to send some fax pages to ``fax poll'' callers. (Send informations 154about your system, the current wheather map, ...). Be warned, even less 155modems support this feature. 156 157@item 158@code{mgetty} can selectively refuse calls based upon CallerID, if your 159local Telco supports it and your modem knows how to decode and report 160it. CallerID is also logged. 161 162@item 163@code{mgetty} has facilities to allow you to refuse incoming FAXes when 164available disk space is low. 165 166@end itemize 167 168If you have any bug reports, suggestions, please report them to 169gert@@greenie.muc.de (or, if [and only if!] that doesn't work, to 170gert@@space.net). 171 172Also, I have created a mgetty mailing list, for discussion of problems 173and suggestions. You can subscribe by sending a request to 174mgetty-request@@muc.de (forwarded to Crynwr.com for precessing) 175and you can send articles to the list by sending them to mgetty@@muc.de. 176The list manager will write you back for verification of your address, 177so make sure it is correct. 178 179The mailing list is currently gated bidirectionally into the newsgroup 180de.alt.comm.mgetty. In spite of being in the German language hierarchy, 181the language in the group is English. Posts in German should be ignored. 182 183The mailing list is archived on a WWW site, look at 184@file{http://www.elilabs.com/mgarc/index.html} (many thanks to 185Robert J. Brown, rj@@eli.elilabs.com). It's also archived by Marc 186Schaefer, on @file{http://search.alphanet.ch/} @strong{(NEW!)}. 187The latter search engine indexes somewhat more than only the mgetty list, 188so you might want to add 'mgetty' to your query to restrict it. 189 190@node Supported, Install, Overview, Intro 191@section Supported systems and modems 192 193Mgetty has been successfully installed and run on the following 194systems (though older systems might need work to get current mgetty 195versions to compile): 196 197@display 198 SCO Unix 3.2.1 (ODT 1.0) (well tested) 199 SCO Unix 3.2.4 (ODT 2.0 + 3.0) (very well tested) 200 SCO Open Server 5.0 (well tested) 201 Linux (everything from 0.99pl1 up) (very well tested) 202 ISC Unix 3.0 (tested) 203 SVR4 Unix (well tested) 204 SVR4.2 Unix (needs more testing) 205 AT&T 3B1 3.51m (tested) 206 HP-UX 8.x and 9.x (well tested) 207 AIX 3.2.5, 4.1, 4.2 and 4.3 (very well tested) 208 SunOS 4 (well tested) 209 Solaris 2.x (well tested) 210 NetBSD / FreeBSD (all versions) (very well tested) 211 Apple Darwin (Kernel 5.1) (tested) 212@end display 213 214It should be possible to run mgetty on any other Unix with @file{termio.h} 215or @file{termios.h}. For best results, use of the library functions 216@code{select(S)} or @code{poll(S)} is recommended, but there's a workaround 217if your system hasn't either. (Warning: for Unix SVR3.1 or earlier, 218@emph{do not use poll()}, it will not 219work on tty devices.) 220 221 222Up to now, it has been successfully used with the following modems (no 223exhaustive list) in fax mode: 224 225@display 226 ZyXEL U1496 (various ROM releases) 227 (very well tested, a couple of problems remain, depending on the 228 ROM release) 229 230 ZyXEL 2864/2864I (various ROM releases) 231 (very well tested, some firmware versions have problems) 232 233 USR Courier/Sportster series 234 (well tested, Couriers work great, Sportsters are ok for data) 235 236 MultiTech (various models) 237 (tested, works very well, very good fax implementation) 238 239 SupraFAX v32bis 240 (tested, works well, no fax polling available) 241 242 GVC FM144/+ 243 (tested, works well, no fax polling available) 244 245 TKR DM-24VF+ (Deltafax) 246 (tested, works quite well) 247 248 Zoom V.FAST 24K/28K 249 (tested, works, some problems with fax/data distinction) 250 251 ELSA MicroLink (various) 252 (tested, usually works well, some firmware versions have issues) 253@end display 254 255It @emph{should} work with all class 2 faxmodems. Maybe the DC2 256character sent at the beginning of a page by @file{faxrec.c} must be 257changed to XON, for very old class 2 modems (implementing very old drafts of 258the standard). @xref{Modems}. 259 260In Data mode, it will work with every Hayes-compatible modem. 261 262 263@node Install, intro-runtime, Supported, Intro 264@section Configuration and installation 265 266Compiling of the package should be quite straightforward. You have to 267copy @file{policy.h-dist} to @file{policy.h} and edit it to set some 268local policy options, see the comments in that file. (Most default 269values should be fine, though). 270 271Then, edit the @file{Makefile}, to specify installation paths, some 272system defines and some system dependent libraries (explained there). 273 274After that, a @samp{make} should build the programs and the documentation. 275 276Before you can run @samp{make install} to setup and install everything, 277make sure that the user that you specified for @samp{FAX_OUT_USER} in 278@file{Makefile} exists in your system. This user will be needed to 279run @code{faxrunq} or @code{faxrunqd}, and owns all the outgoing fax queue 280(this has been changed for 1.1.29 - earlier versions had the fax queue 281world writeable, which was a security problem). 282 283If your compiler complains about the @code{#ident} lines I use for 284@file{RCS}, please run @code{make noident}, that will take care of those 285lines (this is only needed if the compiler refuses to go on - some 286compilers complain, but go on anyways). 287 288If you get an error message about ``unresolved symbols'' when linking, you 289may have to tell the package whether you have the select(S) or poll(S) 290system calls, by defining @code{-DUSE_SELECT} or @code{-DUSE_POLL} flags in 291the @file{Makefile} (If you don't know it, try both, until the error goes 292away). If it's not related to @code{select} or @code{poll}, please check 293the systems man pages which libraries to link, and add appropriate 294@code{-l<library>} statements to @code{LIBS}. 295 296If your system has neither the select(S) call nor the poll(S) call, 297mgetty is not fully operational---these functions are the only way to 298prevent mgetty from eating up characters when some other process is 299trying to dial out. 300 301You can use mgetty anyway, by specifying @code{-DUSE_READ} in the 302Makefile, but beware: with this, mgetty will eat up at least one 303character of the modem response when another program is dialing out. 304That may lead to disastrous results if e.g. the @samp{CONNECT} string 305is thus corrupted, but most of the time, the character that @file{mgetty} 306eats away will be an @code{cr} or @code{nl} or part of the command 307that the modem echoes back. 308 309If you have any problems compiling mgetty and sendfax (on a Unix-like 310system---I do not support MS-DOS or Windows!), please contact me. 311@emph{But make sure that you have read the documentation!} 312 313Later on in this document you can find some more detailed instructions 314about specific operating systems (Linux, FreeBSD, and so on). 315 316@node intro-runtime, , Install, Intro 317@section Runtime configuration: Overview 318 319If @code{mgetty} or @code{sendfax} are run "as is", they will use their 320compiled-in defaults from @file{policy.h}. 321 322If the configuration files @file{mgetty.config} (@pxref{runtime-mgetty}) 323and @file{sendfax.config} (@pxref{runtime-sendfax}) exist (and are 324readable), both programs will get their run-time configuration from there. 325Items not specified there will still be taken from the compiled-in 326defaults. Command line switches will always override those settings. The 327configuration files are usually located in @file{@CONFDIR@/}. 328 329If you specify command line arguments (see the mgetty(1) and sendfax(8) man 330pages for details), this will override both compiled-in and config file 331defaults. 332 333@c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 334 335@node mgetty, Fax, Intro, Top 336@chapter Using @code{mgetty} 337 338You can't simply call @code{mgetty} from a shell script (like @file{/etc/rc}) 339or interactively, because login is not possible unless mgetty is called 340directly by the @code{init} process. The next sections explain how to do this. 341 342@menu 343* How:: How @code{mgetty} works 344* Inittab:: The @file{/etc/inittab} entry 345* Devices:: Choosing the right device 346* Logs:: Log files 347* Deny:: Denying logins (and scheduling) 348* Direct:: Direct serial lines 349* Interaction:: Interaction between @code{mgetty} and other programs 350* Caller-ID:: Using Caller-ID to selectively accept or reject calls 351* runtime-mgetty:: Runtime configuration: @file{mgetty.config} 352@end menu 353 354@node How, Inittab, mgetty, mgetty 355@section How @code{mgetty} works 356 357To help you understand how mgetty works, here is an example of what 358happens in various circumstances when you use it to control a modem 359connected to a serial line, e.g. @file{/dev/tty2a}. 360 361When the computer is booted, the operating system starts the @code{init} 362process, which is responsible for making sure that gettys are running on 363the appropiate i/o devices, e.g. virtual terminals, serial lines and 364modems. @code{init} reads its configuration file, @file{/etc/inittab} (on 365System V), which tells it that the line @file{/dev/tty2a} should be 366controlled by mgetty. It then creates an entry in @file{/etc/utmp} 367(@code{login} needs this, that's why you can't log in if you try to start 368mgetty by hand), and forks a new @code{mgetty} process, using the command 369line specified. 370 371When mgetty is started, it first checks if a valid lock file held by 372another process exists. If it does, this means that the port is in 373use, and mgetty will wait until the lock file goes away. Invalid lock 374files, e.g. for nonexistent processes (``stale'' locks), are ignored. 375 376Once the port is free, mgetty creates its own lockfile, initializes the 377modem and removes its lock file again. Then it waits for something to 378happen on the port. Note that it does not @emph{read} any characters, it 379just checks if there are any available for reading by using @code{poll()} 380or @code{select()}. 381 382There are two possibilities once characters arrive, either a different 383program (e.g. @code{uucico}) has started dialing out or a @samp{RING} was 384sent by the modem. In the first case, mgetty should leave the port 385alone. This is easy @emph{if} the program dialing out has created a valid 386lock file: mgetty will find it, wait for it to go away and then exit (which 387will cause @code{init} to start a fresh @code{mgetty} process, which will 388then wait for the next call). 389 390In the second case, when there is no lock file, mgetty assumes that 391the phone is ringing, creates a lock file and reads the characters 392available. If it finds a @samp{RING}, it picks up the phone by sending 393@samp{ATA} and waits for the @samp{CONNECT} message. If the caller is 394a fax machine, it saves the fax in the directory @file{FAX_SPOOL_IN} 395(usually @file{@FAX_SPOOL_IN@}) and exits. If it is a modem, 396it prints @file{/etc/issue} and displays a login prompt. Once it has 397received a login string, it calls @code{@LOGIN@} and lets it handle 398things from here. @code{login} will read the password and will then 399start the user's login shell, @code{uucico}, a dialup SLIP link or 400whatever, but mgetty doesn't care about that. The lock file remains so 401that no other programs will try to use the modem while somebody is logged in. 402 403(If the @file{login.config} configuration file is used, mgetty can also call 404other login programs than @code{@LOGIN@}. See below for more details) 405 406Once mgetty has terminated for whatever reason, @code{init} might 407reinitialize the port (this is why mgetty waits for lock files to go 408away instead of quitting immediately) and will then start a new 409@code{mgetty} process, which will remove lock files left over from the 410last login. 411 412The lock file handling is tricky, but very important. It is essential 413that @emph{all} programs that use the modem agree on one locking 414protocol, otherwise one program might not know that the modem is in 415use and will try to dial out anyway. A typical lock file is a file 416called @file{@LOCK@}, containing the process ID (PID) of 417the process currently using the modem. Other processes can read it and 418tell if the lock file belongs to an existing process or if it is 419``stale'' and can be removed. This will obviously not work if the 420processes look for lock files in different places, or if one of them 421writes its PID in ASCII and another one tries to read it as a binary 422number (while mgetty and sendfax do not care whether foreign lock files 423are written in binary or ascii format, other programs do! mgetty can 424sometimes detect this problem, and will then log a warning). 425 426@node Inittab, Devices, How, mgetty 427@section The @file{/etc/inittab} entry 428An typical @file{inittab} entry for @code{mgetty} looks like this (on 429SystemV-style OSes): 430 431@example 432<tt>:rlevel:<respawn|off>:@SBINDIR@/mgetty [options] <device> 433@end example 434 435where @samp{tt} is a short form of the @samp{device} name, used by 436@code{init} and @code{who} for internal purposes. Usually this is 437something like @samp{S0} or @samp{2A} or so. 438 439@samp{rlevel} specifies the runlevel that the command in the fourth field 440is run at, this may be @samp{23} or @samp{56} or so, look at @code{man 441init} and the existing @file{/etc/inittab} on your system. 442 443The next field tells @code{init} whether that entry is active 444(@code{respawn}) or not (@code{off}), and the fourth field specifies the 445full path of the program to run. 446 447The following options are available for @code{mgetty}: 448 449@samp{-x @var{<level>}} sets the debugging level. This is very important 450for diagnosing problems, as with higher levels, @code{mgetty} will write 451very detailed informations about its internal workings to its log file. 452 453@samp{-s @var{<speed>}} sets the port speed. If not specified, the default 454from @file{policy.h}, (definition @code{DEFAULT_PORTSPEED}) will be used. 455 456@samp{-k @var{<space>}} sets the minimum number of kbytes required 457on the incoming FAX spool directory. If there isn't this much space 458in the spool directory, the connection is terminated. The default 459is 1 megabyte. 460 461@samp{-m @var{'expect send ...'}} sets the modem initialization sequence. 462 463@samp{-r} for direct lines (no modem chats are done) 464 465@samp{-p @var{<login prompt>}} sets the login prompt (various escapes are 466allowed) 467 468@samp{-n @var{<rings>}} sets the number of @code{RING} messages to expect 469before sending @code{ATA} to answer the phone. Default is one @code{RING}. 470 471@samp{-R @var{<sec>}} tells mgetty to enable ``ring-back'' or 472``ring-twice'' mode. This means that mgetty won't pick up a call 473immediately, but the caller has to hang up after the first ring, and 474call again in the next @var{<sec>} seconds. 475 476@samp{-i @file{/etc/issue}} specifies the issue file to display before 477prompting for login. 478 479@samp{-S @file{<fax_document>}} specifies the document(s) to send to 480polling fax machines (full path required). @file{<fax_document>} has to be 481in G3 format (as for @code{sendfax}), or a text file listing G3 fax files 482(one file per line). 483 484A sample entry in @file{/etc/inittab} might look like this: 485 486@example 487F1a:23:respawn:@SBINDIR@/mgetty -x 3 tty2a 488@end example 489 490For a more detailed explanation of all the options, please look into the 491@file{mgetty(1)} man page. 492 493@node Devices, Logs, Inittab, mgetty 494@section Choosing the right device 495 496Some operating systems provide two separate devices for each serial 497line, one of which is intended especially for gettys. This is 498@emph{NOT} a good idea, because it won't work with @code{mgetty}. It is 499meant for modems used in auto-answer mode. 500 501@code{mgetty} picks up the phone by hand, this will only work properly 502if you use the @emph{same} device you would use for dialing out. (Some 503people like to create a symlink @file{/dev/modem} for this, but you 504have to be consistent and use this for @emph{all} comm programs if you 505do - otherwise you'll run into problems with the lock file names). 506 507Here are some examples for different systems: 508 509@itemize @bullet 510@item 511SV Unix systems using the FAS serial driver: 512 513Use @code{ttyF01} etc., (minor number 80+(port number). Do @emph{not} 514use @code{ttyFMxxx}---mgetty will open the device anyway, but then an 515open to the ``normal'' port (without carrier detect) will block. 516 517@item 518SCO Unix systems with the stock serial driver: 519 520Use the modem-control port (@code{tty2A}), @emph{not} @code{tty2a}, because 521hardware flow control and carrier detection do not work on ``lowercase'' 522tty devices. 523 524The same holds for ``smart'' serial boards, as specialix, digiboard, 525@dots{}, because they mimic the behaviour of SCO's sio driver. 526 527@item 528Linux: 529 530Use @file{/dev/ttyS*}, @emph{not} @file{/dev/cua*}. @xref{Linux}. 531 532@item 533SunOS, FreeBSD, NetBSD: 534 535Use @file{/dev/cua*}, not @file{/dev/ttyS*}. Don't ask me why it has to be 536this way, but the other way won't work. (On SunOS or Solaris, you can 537find some gory details in the @code{man zs} man page). 538 539@end itemize 540 541@node Logs, Deny, Devices, mgetty 542@section Log files 543 544@code{mgetty} will normally write all actions into a logfile, named 545@file{LOG_PATH.@var{<device>}} (LOG_PATH is defined @file{policy.h}), 546e.g. @file{@LOG_PATH@}, so you can easily see what's happening in your 547system. (If a fatal error 548occurs, the error message is also written to the console, and if that 549is not possible, mailed to @samp{ADMIN}). The name of the log file can be 550changed in @file{policy.h}. 551 552If @code{mgetty} is compiled with @code{-DSYSLOG}, auditing and error log 553messages will also go to @code{syslog} (if your system supports it). 554 555@node Deny, Direct, Logs, mgetty 556@section Denying logins 557 558If you want to prevent mgetty from accepting calls, you can do so by 559creating a file called @file{/etc/nologin.@var{<device>}} 560(e.g. @file{/etc/nologin.tty2a}). If mgetty detects an incoming call, and 561sees this file, it will @emph{NOT} answer the phone. This way the caller 562does not lose money for a useless call when logins are not allowed 563anyway. (You can change the filename that is checked by changing 564@code{NOLOGIN_FILE} in @file{policy.h}) 565 566This can be used for quite sophisticated scheduling purposes - imagine a 567modem attached to a line used for voice during the daytime. So, you want 568the modem only to answer the phone during 9 pm and 7 am. What you do is to 569have @code{cron} create a @file{/etc/nologin.@var{device}} file at 7 am (so 570the modem won't answer the call during the day) and remove it at 9 pm (so 571the modem can answer the phone at night). 572 573Naturally, this can be easily extended - e.g., answer the phone only on 574weekends (similar cron job), don't answer the phone if there are less 575than 5 Mbyte free on disk (have a process check for free disk space 576regularily and create @file{/etc/nologin.*} file(s) accordingly), @dots{} 577 578@node Direct, Interaction, Deny, mgetty 579@section Direct serial lines 580 581If you have a direct serial line between two unix machines, or a unix 582machine and something else, and want to run a getty program on the unix 583side that should not interfere with outgoing traffic (e.g.: two unix 584machines, both sides running gettys, both sides able to initiate an uucp 585connection), you can also use mgetty. Start it with the @samp{-r} flag (as 586with uugetty), and it will not try to initialize the modem or wait for 587RINGs. It will just sit silently on the port and wait@dots{} You won't see 588@file{/etc/issue} on the other side until mgetty gets at least one 589character, this prevents two mgettys from talking to each other. 590 591This may be valid for leased lines with modems in leased line mode as well, 592but that may depend on your modem setup. 593 594@node Interaction, Caller-ID, Direct, mgetty 595@section Interaction between @code{mgetty} and other programs 596 597Normally, after a caller enters his login name, @code{mgetty} calls 598@code{@LOGIN@} to do the password checking and system login. 599 600In some special cases, you may want to call other programs instead of 601@code{@LOGIN@}. For example, you could want to call 602@code{/usr/lib/uucp/uucico -L <username>} for all login names starting with 603@samp{U*} (to have @code{uucico} do the authentication, works only with 604taylor uucp 1.05 or taylor uucp 1.04 with my patch in 605@file{patches/taylor.p1}), or @code{/usr/lib/fnet/ifcico} for incoming 606FidoNet calls (using @code{ifcico} from Eugene Crosser's @file{ifmail} 607package). 608 609@code{mgetty} can do all this. It's controlled by a configuration file 610@file{login.config}, normally located in 611@file{@CONFDIR@/} (definition @code{LOGIN_CFG_FILE} in 612@file{policy.h}). I have provided a sample file with lots of comments, 613please look into that file for the syntax to use. To make @code{mgetty} 614understand incoming fido calls, you have to compile it with @code{-DFIDO}. 615 616If you are worrying about security, you can also use this mechanism: just 617call @code{@LOGIN@} only for trusted, known users, and @code{/bin/false} 618for every other login name - so, only those listed in @file{login.config} 619will be able to log in. 620 621This mechanism can also be used to automatically start up a @code{PPP} 622server if an incoming client sends PPP packets. This feature is called 623@emph{AutoPPP}. For it to work, you have to compile @code{mgetty} with 624@code{-DAUTO_PPP} (added to CFLAGS in Makefile). After this, 625@code{mgetty} will detect incoming PPP packets, and run the program that 626is specified in @file{login.config} by the special user name 627"/AutoPPP/". See the sample @file{login.config} file for an example. 628 629Which options should be specified depends on your PPP server program and 630your local setup. Don't ask me about that -- I wouldn't know. Instead, 631please check the relevant man pages. 632 633@node Caller-ID, runtime-mgetty, Interaction, mgetty 634@section Using Caller-ID to selectively accept or reject calls 635 636Some telephone companies provide a service to the subscriber, called 637``Caller ID'', where the phone number of the caller is transmitted while 638your phone is ringing. Not all providers support it, and you'll have to 639ask for it. 640 641If your modem is able to retrieve callerid information, and @code{mgetty} 642is compiled with @code{CNDFILE} defined in @file{policy.h}, @code{mgetty} 643can check the caller's number before answering the phone. (Right now, it 644works for most variants out there, ZyXEL, Rockwell, ELSA and isdn4linux 645among them). If @code{CNDFILE} is undefined, or if the 646file specified does not exist, all calls will be allowed. 647 648One important thing: for most analog modems, you @strong{must} set the 649number of RINGs to wait for to two (2) or higher (set @samp{rings 2} in 650@file{mgetty.config}), because the ID code is sent between the first and 651the second RING. If mgetty picks up the phone too soon, the modem can't 652get this information. 653 654Whether a call is accepted or denied is controlled by the configuration file 655set with @code{CNDFILE} in @file{policy.h}. The usual default is 656@file{@CONFDIR@/dialin.config} (a sample file is installed per default). 657 658That file contains a series of tokens separated by newlines, commas, tabs 659and spaces. The callerid number is compared with each token in turn, until 660a match occurs. A match occurs when the token compares equally to the 661callerid information up to the length of the token. If the token is 662prefixed with a ``!'', a match means ``do not answer the phone''. The token 663``all'' matches any telephone number, and will terminate scanning of the 664cndfile. If no callerid number is present, it is assumed to have the value 665``none''. A line starting with ``#'' is a comment. There is an implicit 666``all'' at the end of the file. 667 668For example: 669 670@example 671 # list of my friends' data lines 672 3433535, 7445343, 5551212 673 # dad's fax 674 4164646777 675 # disallow [other] calls from numbers matching the following prefix: 676 !416 677 # disallow that speed dialer that keeps hitting my machine 678 !3444444 679 # allow all calls with the following prefixes 680 832, 555 681 # don't allow calls when there's no callerid: 682 !none 683 # It's okay to accept calls from out of area 684 # ("OUT_OF_AREA" token seems ZyXEL specific) 685 OUT_OF_AREA 686 # disallow all other calls 687 !all 688@end example 689 690For the future, Chris Lewis is planning on adding special modem initialization 691strings (e.g., 2400 bps only, fax-only, ...) dependant on the caller 692number. 693 694 695For most applications, this kind of static configuration is enough. If 696you have special needs, you can choose to run an external program to 697decide this. The program name is configured with the @code{cnd-program} 698statement in @file{mgetty.config}. Its command line arguments are: 699 700@example 701 <program> <tty> <CallerID> <Name> <dist-ring-nr.> <Called Nr.> 702@end example 703 704@code{CallerID} is the number of the caller, if known, or @samp{none}, if 705not. @code{Name} is the name of the caller, or empty ('') if unknown. 706@code{dist-ring-nr.} is the RING type, if you have ``distinctive 707RING'' on your telephone line and your modem supports this, or ``0'' 708for an unidentified call. @code{Called Nr.} is the number that was called 709(this is only meaningful if you have ISDN, and your modem signals the 710complete number called to the host - e.g. ELSA or ZyXEL 2864I do that). 711 712For example, a call from 12345 to 56789, using ISDN, coming in on ttyS3, 713could lead to a program called like this: 714 715@example 716 check.cnd ttyS3 12345 '' 0 56789 717@end example 718 719The program return value decides whether the call should be accepted. 720Currently, the following values are defined: 721 722@display 723 0 - accept call, no specific preferences 724 1 - reject call 725@end display 726 727Future versions will allow external selection of the way mgetty/vgetty is 728supposed to answer the call (data/voice/fax/...), but that's not 729implemented yet. 730 731Note: this can not only be used to decide whether to accept a call or not. 732You could as well use it to display the caller ID on an external LCD 733screen, in an X11 window, print it, initiate a D-Channel Callback, or do 734whatever you want that needs the Caller ID data. 735 736@strong{Note2: be careful what kind of programs you call! They run with 737user id 0 (root), so that could easily be a security risk if you're not 738careful.} 739 740@node runtime-mgetty, , Caller-ID, mgetty 741@section Runtime configuration for mgetty: @file{mgetty.config} 742 743@code{Mgetty} works quite well with the compiled-in defaults (it has been 744the only way to configure it for a long time), but that's quite unflexible, 745and especially if you use different modem types, it's extremely unhandy. 746The built-in defaults can be modified by command line options, but that's 747not perfect either, because it makes @file{/etc/inittab} entries very long 748and difficult to read. 749 750If compiled with @emph{config file} support (define @code{MGETTY_CONFIG} in 751@file{policy.h}), @code{mgetty} can use a configuration file, quite similar 752to those which "Taylor UUCP" uses, which make dynamic setup far easier. 753 754The config file is usually located in @file{@CONFDIR@/} and named 755@file{mgetty.config}. Its format is very simple. Each line contains one 756keyword, and possibly arguments for it, separated by whitespace. Empty 757lines, and comment lines (lines starting with @samp{#}) are allowed. 758 759The config file is grouped into port-specific sections, separated by 760@code{port @var{<tty-name>}} lines. Everything before the first @code{port} 761line specifies global defaults, everything between two @code{port} 762statements specifies configuration items valid only for exactly this 763device. Let me show you an example: 764 765@example 766# global defaults: 767# fax station id is always the same 768fax-id ++49-89-1234 769# per port stuff 770port tty1a 771# This modem can't fax 772modem-type data 773 774port tty2a 775# more verbose logging for this modem 776debug 9 777@end example 778 779 780The data part of each line, following the keyword, can be a string (in most 781cases), a chat sequence (a series of strings, separated by whitespace, that 782specify the "modem talk" to do. It starts with "expect" string, then "send", 783then "expect" again, and so on), an integer (interpreted as decimal, octal 784or hexadecimal, depending on the leading character [1-9/0/0x]), or boolean 785(@samp{y(es)} or @samp{t(rue)} vs. @samp{n(o)} or @samp{f(alse)}). If 786no argument is specified, this will be considered ``value not set'' (if 787allowed) or ``error'' (if value is mandatory), except for boolean values. 788In that case, it's interpreted as @samp{true}. 789 790 791Many of those configuration items can be overriden from the command line. 792In that case, command line options take precedence over configuration file 793settings (and those take precedence over built-in defaults). In many cases, 794the built-in defaults can be set in @file{policy.h}. 795 796The available configuration items are (command line options, if available, 797given in brackets): 798 799@itemize @minus 800@item @code{speed} [-s] @var{port speed} 801 802Specify, as integer value, the port speed to use. Default is 803@code{DEFAULT_PORTSPEED}. If the given speed is not valid, @code{mgetty} 804complains loudly and exits. 805 806@item @code{switchbd} @var{fax recv. speed} 807 808Some modems, mainly Rockwell chipsets, switch to 19200 bps when entering 809fax mode. Others may need other speed switches (but I know none). If your 810modem is Rockwell based, try @code{switchbd 19200} if fax reception doesn't 811work. (@strong{Warning:} if this is set wrongly, fax reception will 812definitely fail. For most sane modems, you do @strong{not need} this.). 813Default is @code{FAX_RECV_SWITCHBD}. 814 815@item @code{direct} @var{yes/no} [-r] 816 817Tells mgetty that it is running on a direct line. Mgetty won't try to 818initialize any modem, nor will it wait for @samp{RING}. It will just wait 819for any character, and then output the issue file and login prompt. This 820option is used if you want to connect to machines via nullmodem cable. 821Default is @var{no}, since @code{mgetty} is designed for modems@dots{} 822 823@item @code{blocking} @var{yes/no} [-b] 824 825Tells mgetty to open the device in @samp{blocking} mode, that is, the 826@code{open()} system call won't succeed until carrier detect is set. This 827is set if @code{mgetty} is called as @code{getty}. I'm not sure whether 828it's very useful, but I include it for completeness. Default is @var{no}. 829 830@strong{Do not activate this unless you understand all implications!} 831 832@item @code{port-owner} @var{username/userid} 833 834If set, mgetty will @code{chown} the tty line to the given username (you 835can specify a string or an integer uid, but the integer must be valid). 836This is highly recommended for security purposes: only give port access to 837those users you trust not to misuse your modem lines! Default is 838@code{PORT_OWNER}. 839 840@item @code{port-group} @var{groupname/gid} 841 842If set, mgetty will @code{chgrp} the tty line to this group id (which can 843be given as group name, or as integer gid). If it's not given, or not 844valid, the primary group id of @samp{port-owner} will be used. Default is 845@code{PORT_GROUP}. 846 847@item @code{port-mode} @var{permissons} 848 849Specifies the permissions to @code{chmod} the device to. @strong{Never} 850make a modem device world-accessible, better use @samp{0660} or even 851@samp{0600}. Default is @code{PORT_MODE}. 852 853@item @code{toggle-dtr} @var{yes/no} 854 855Tells mgetty whether it should lower the DTR line upon startup to reset 856modem. Default is @samp{yes}, but some (few) modems react allergic to that 857and crash. 858 859@item @code{toggle-dtr-waittime} @var{msecs} 860 861Specifies the time to hold the DTR line low. Default is 500 milliseconds. 862 863@item @code{data-only} @var{yes/no} [-D] 864 865Tells @code{mgetty} to forget about faxing and only use the data part of 866the modem. Default is @samp{false}. You need this if your modem can't 867distinguish incoming fax and data calls. 868 869@item @code{fax-only} @var{yes/no} [-F] 870 871Tells @code{mgetty} to put the modem in fax-only mode. You need this if 872your modem can't distinguish incoming fax and data calls, but you need fax 873more important than data; and you need it if you want to disable data calls 874for security reasons (this could be achieved via @file{login.config} as well) 875 876Watch out: if you have setup some unusual @code{answer-chat}, incoming 877calls might still come through. So check your setup! 878 879@item @code{modem-type} [-C] @var{mtype} 880 881Specifies the kind of modem connected to the port. Default is 882@code{DEFAULT_MODEMTYPE}. Valid options are: 883 884@itemize @bullet 885@item auto 886 887Mgetty will detect the modem type itself (which may occasionally be not 888desirable, or it may fail on old modem equipment). Mgetty will use 889the @code{ATI} command to find out the modem type, and select the proper 890fax class accordingly. If that fails (unknown modem type), mgetty will 891try class 2.0 and then class 2. 892 893@item c2.0 894 895Modem is a @var{class 2.0} fax mode. Works better than class 2, if both are 896available, because its better standardized. Known to work with USR, ZyXEL 8971496 and 2864 series, and ELSA modems. 898 899@item cls2 900 901Modem is a @var{class 2} fax modem, mgetty will not try class 2.0. 902 903@item c2.1 904 905Modem conforms to the new ITU T.32 standard (class 2.1). To my knowledge, 906there are no such modems available yet, but supporting them will be easy 907as class 2.1 is very similar to class 2.0. 908 909@item cls1 910 911Modem can only do class 1 fax. NOT IMPLEMENTED YET. (And not recommended 912anyway). 913 914@item c1.0 915 916Modem can do class 1 fax conforming to ITU T.31 standard. This isn't 917much better than class 1 (use class 2 / 2.0 if available!), but is better 918standardized. NOT IMPLEMENTED YET. 919 920@item cls2ok 921 922(obsolete, use @code{modem-quirks 02}) 923 924@item data 925 926Do not try fax initialization, same as if @samp{-D} given. 927@end itemize 928 929There is no way (yet) to tell mgetty to use @strong{only} fax mode and 930refuse data calls with this option, use the @code{fax-only true} statement 931for that. 932 933@item @code{modem-quirks} @var{bitmask} 934 935Some modems have a very peculiar interpretation of the fax standards. 936Some of the internal operations of @code{mgetty+sendfax} can be adapted 937to that. The argument is a number, constructed from valies in 938@file{fax_lib.h}, one bit per "quirk". Usually you won't need this 939option, because those modems really needing it are auto-detected and 940handled properly anyway. 941 942Right now, the following quirks are defined: 943@display 9440x01 leave the modem in class 2 mode instead of switching 945 to class 0 before sending ATA (you might try this if 946 adaptive fax/data answer doesn't work). 9470x02 class 2 bit order is correct (MultiTech) - unimplemented 9480x04 do not trust +FPTS:x,lc,blc values 9490x08 do not wait for XON character when sending pages 9500x20 AT+FCC/+FMINSP bug workaround for (very) old USR Courier V.32 9510x40 display incoming informations about 'non standard frames' - this 952 might be necessary on some USR modems to work around logic bugs 953@end display 954 955@item @code{init-chat} [-m] @var{expect send expect send ...} 956 957Tells mgetty the chat sequence to use for initializing the modem. 958@strong{Warning}: the sequence starts with @strong{expect}, which will in 959most cases be @samp{""} (nothing). This ordering was chosen because UUCP 960does it this way, and I wanted to avoid confusion here. 961 962Example: 963 964@example 965init-chat "" ATQ0E1V1H0 OK ATL0M0S0=0 OK AT&K3 OK 966@end example 967 968@item @code{force-init-chat} @var{expect send expect send ...} 969 970In some cases, the modem can get stuck in a mode where it won't react to a 971simple @code{AT} command. Usually this happens because the modem is set to 972ignore a DTR drop and still has a data connection to the other side. If 973you use a voice modem, it could be stuck in voice mode. 974 975In these situations, the normal @code{init-chat} will time out, because 976the modem won't send the proper responses back. 977 978To get the modem back into a sane state, you can use the 979@code{force-init-chat} chat sequence. The default setup will send 980the DLE ETX characters, to get voice modems back to life, and then the 981@code{(pause)+++(pause)ATH0} sequence to get the modem back from data 982mode to command mode. 983 984You could prepend this sequence to @code{init-chat} (it wouldn't harm), 985but especially the pauses around the +++ sequence makes this undesirable 986slow. 987 988@item @code{post-init-chat} @var{expect send expect send ...} 989 990Some modems forget parts of their settings when going from data to fax 991mode and back during modem initialization. For example, some USR models 992forget the settings of ``Caller ID delivery'' (AT#CID=1), and some ELSA 993modems forget their current DTE port speed when going from voice to data 994mode, thus leading to RING messages being delivered with the wrong baud 995rate. 996 997For those modems, you can use this command to set up some AT commands that 998are executed after all other fax and voice initialization has been done. 999Be careful with what you do! If you send an ATZ (modem reset) or 1000something similar here, all your fax/voice settings will be lost! 1001 1002@item @code{modem-check-time} @var{seconds} 1003 1004Some modems have the nasty tendency to crash silently. With this option, 1005you tell @code{mgetty} to check every @var{seconds} seconds with a simple 1006@samp{AT...OK} sequence whether the modem still reacts. If not, 1007@code{mgetty} will restart itself and do a full modem reset. Default is @code{MODEM_CHECK_TIME} 1008 1009@item @code{rings} [-n] @var{nnn} 1010 1011Sets the number of @code{RING} messages to wait for, before mgetty picks up 1012the phone. Default is 1. @strong{Warning:} if your modem auto-answers, for 1013whatever reason, set this to something @strong{different} than the value 1014set with @code{ATS0=mmm}, otherwise the modems autoanswer and mgettys 1015manual answer will collide (most modems hang up if a command is received 1016during auto-answer) 1017 1018@item @code{msn-list} @var{msn1 msn2 msn3...} 1019 1020If you have an ISDN modem that signals the called party number (MSN) to 1021the host, you can use this statement to map the MSN numbers to distictive 1022RINGs. The MSN called will be compared the list, and the first match is 1023used for the distinctive RING number. The list is searched from left to 1024right. 1025 1026This is known to work with ELSA and ZyXEL ISDN terminal adaptors. 1027 1028@item @code{get-cnd-chat} @var{chat sequence} 1029 1030This is needed if you have a modem that supports ``caller ID'' detection, 1031but needs a special command to get the CID information. Right now, this is 1032only needed for some ELINK ISDN adaptors (@pxref{Elink-ISDN}), most other 1033CID-capable modems send the CID on their own and don't need this. 1034 1035Don't forget to set @code{rings} to at least 2, otherwise the CID grabbing 1036code won't work. 1037 1038@item @code{cnd-program} @var{pathname} 1039 1040Specify a program to be run before answering an incoming call. Use this 1041if the static Caller ID selection in CNDFILE (policy.h) is not sufficient, 1042or if you want to use the Caller ID data for other purposes (displaying, 1043for example). @xref{Caller-ID}. 1044 1045@item @code{answer-chat} @var{chat sequence} 1046 1047This is the command sequence that is used to answer a phone call. Usually 1048you can leave it at the default @samp{ "" ATA CONNECT \c \r }, but for 1049some modems you need @samp{ATS0=1} in place of @samp{ATA} (ATA not 1050allowed). The extra @samp{\r} expect string is needed that the code can 1051grab the full @var{CONNECT xyz\r} string. It will work without the \r, 1052but then the logging information will be less detailed. @strong{Right now, 1053\r won't work at all, it's not implemented yet. Don't use it.} 1054 1055@item @code{answer-chat-timeout} @var{secs} 1056 1057During the @var{answer-chat}, each "expect" string must be seen in the time 1058specified here. Default is 80 seconds. This time should be at least some 5 1059seconds longer than the time set with the @code{ATS7=...} modem setup 1060command. 1061 1062@item @code{autobauding} @var{yes/no} [-a] 1063 1064Some modems switch their DTE line speed to the communication line speed 1065after connecting, e.g., after sending @samp{CONNECT 2400}, the modem 1066switches to 2400 bps. Newer modems usually have a switch to "lock" a DTE 1067baud rate, which is strongly recommended. If your modem insists on doing 1068this speed switch, setting @code{autobauding} to @var{true} will make 1069mgetty behave accordingly. 1070 1071@item @code{ringback} @var{yes/no} [-R] 1072 1073If you have to put your modem and your telephone on the same phone line, 1074you can switch on "ringback" or "ring-twice". This means, mgetty won't 1075answer the phone on the first call, but remember the call, and pick up on 1076the second call (if it comes in the time specified by @code{ringback-time}). 1077 1078@item @code{ringback-time} @var{secs} 1079 1080This setting specifies how much time may pass between the first and the 1081second call if "ringback" is active. Default is 30 seconds. 1082 1083@item @code{ignore-carrier} 1084 1085If your Modem does not assert the DCD (carrier detect) line, or the 1086serial port or cable or serial driver is broken, it is possible that 1087@code{mgetty} or @code{login} will block after a successful CONNECT 1088(that means: everything seems to work, but suddenly nothing is sent 1089to the port anymore. Depending on the operating system used, this can 1090be before printing the @file{/etc/issue} file or not before printing 1091the @samp{password:} prompt. 1092 1093To work around this, you can switch off the carrier detection in the 1094kernel: set @code{ignore-carrier true}. Default is @code{false}. 1095 1096@strong{WARNING:} If you use this, your system won't be able to detect 1097when a caller just hangs up instead of cleanly logging out. This may 1098result in hanging modems, etc. 1099 1100@item @code{issue-file} [-i] @var{file} 1101 1102This is the file printed before the login prompt. Default is 1103@samp{/etc/issue}. Some special characters are substituted by connect 1104speed, date, etc. - see below (login-prompt) for a list. 1105 1106Note: maximum line length after substitution is 300 characters, so be 1107careful with ASCII art banners with lots of color settings and such. 1108 1109@item @code{prompt-waittime} @var{msecs} 1110 1111This specifies how long @code{mgetty} will wait for modem and line to 1112settle down before printing issue file and login prompt. Default is 500 1113milliseconds. 1114 1115@item @code{login-prompt} [-p] @var{prompt} 1116 1117This specifies the login prompt that mgetty will output. Some special 1118characters in this string (and in the issue file, btw) are recognized and 1119replaced by something else: 1120 1121@itemize @bullet 1122 1123@item @@ system name 1124@item \n newline 1125@item \r carriage return 1126@item \g bell 1127@item \b backspace (ascii 010) 1128@item \f form feed (ascii 013) 1129@item \t TAB 1130@item \s operating system (OS) 1131@item \m hardware name 1132@item \V OS version 1133@item \R OS release 1134@item \P (and \L) port name (e.g. ttyS0) 1135@item \C date and time, in "ctime()" format 1136@item \I Connection string (e.g. 2400/REL) 1137@item \N (and \U) number of users currently logged in 1138@item \S Port speed (e.g. 38400) 1139@item \D current date in dd/mm/yy format 1140@item \T current time in hh:mm:ss format 1141@item \Y CallerID of the current caller 1142@item \@var{digit} character with the specified octal code 1143@end itemize 1144 1145The maximum lenght of the login prompt is limited to 300 characters (after 1146expansion). 1147 1148@item @code{login-time} @var{secs} 1149 1150This specifies the maximum time the user can take to log in. If no login 1151has occured after that time, @code{mgetty} will hang up. Default is 1152@code{MAX_LOGIN_TIME} from @file{policy.h}. 1153 1154@item @code{login-env-ttyprompt-hack} @var{yes/no} 1155 1156On SVR4, maybe on other systems too, you can cause the 'login' program 1157to prompt with the same string as mgetty did, instead of the standard 1158"login:" prompt. The string will be passed to the 'login' program 1159in the environment variable TTYPROMPT. 1160This is done by putting "login" into a special (brain-dead) "ttymon"- 1161compatibility mode. In that mode, mgetty doesn't ask for a login name 1162at all, so mgetty won't work if you enable that feature and your 1163login program doesn't support it. You can see if it doesn't work 1164if the user gets a double login prompt or none at all. 1165 1166As a side effect, this feature can also be used to directly start "other" 1167applications, like a BBS software or similar things, after the modem 1168has connected (login.config would then be used to specify what program to 1169run.) 1170 1171This feature is incompatible with FIDO and AutoPPP support - those work 1172only if mgetty can see the user response to the login prompt. 1173 1174In previous releases, this used to be @code{ENV_TTYPROMPT} in @file{policy.h}. 1175 1176@item @code{fido-send-emsi} @var{yes/no} 1177 1178Only relevant when mgetty was compiled with @code{-DFIDO}. Controls 1179whether mgetty should send a FidoNET style ``EMSI_REQA77E'' packet before 1180prompting for login. Default is on. Switch this off if you have FIDO 1181support compiled in but experience weird problems with some PPP clients 1182(or users!) being confused by that string. 1183 1184@item @code{login-conf-file} @var{pathname} 1185 1186Specifies the path and filename of the 'login.config' file that tells 1187mgetty which program to call for login. See the example login.config 1188file to get some ideas what to do with it. 1189 1190The file name given will be ignored for security reasons if the file is 1191not owned by 'root', or is readable or writeable by anybody else than 1192'root' (that is, it must be mode 0600 or 0200). 1193 1194@item @code{fax-id} [-I] @var{local fax number} 1195 1196This sets the fax station ID used in fax mode to identify your site to the 1197caller (usually this is simply your fax phone number). Default is 1198@code{FAX_STATION_ID}. 1199 1200@item @code{fax-server-file} [-S] @var{poll control file} 1201 1202Specifies the fax file(s) that is to be sent if someone else calls your 1203modem in @emph{fax polling mode}, that is, the caller @emph{receives} a 1204document. 1205 1206Normally, the file given is a text file, containing the list of G3 files to 1207send to the calling machine, one file per line. Comment lines (starting 1208with ``#'') are ignored. For backward compatibility, @code{mgetty} does 1209check whether the named file is a G3 file itself, in which case this file 1210is sent directly (but then, you can only send one page). 1211 1212Not all modems support fax poll @emph{server} mode, I know that the ZyXEL 1213and MultiTech do, and USR does not. 1214 1215@item @code{diskspace} [-k] @var{kbytes} 1216 1217This setting tells mgetty the minimum amount of disk space that has to be 1218available in the fax spool directory for fax reception to be allowed. 1219Default is 1 Mbyte. 1220 1221@item @code{notify} @var{mail address} 1222 1223This is the address that will get mails if a fax is received. If you do 1224not want e-mail notification, specify @code{notify} without an e-mail 1225address. 1226 1227@item @code{fax-owner} @var{username/uid} 1228@item @code{fax-group} @var{groupname/gid} 1229@item @code{fax-mode} @var{perms} 1230 1231Similar to @code{port-owner/group/mode}, these settings specify the owner, 1232group and file mode mgetty will use for incoming faxes. Defaults are taken 1233from @code{FAX_IN_OWNER}, @code{FAX_IN_GROUP}, and 1234@code{FAX_FILE_MODE}. 1235 1236@item @code{fax-spool-in} @var{dir1:dir2:dirn} 1237 1238Specifies a directory, or list of directories, where incoming faxes are 1239saved. Multiple directories are tried in order until, the first one 1240that has enough disk space and is writeable is used. 1241 1242The default setting is taken from @code{FAX_SPOOL_IN} in the Makefile 1243usually @code{@FAX_SPOOL_IN@:/tmp} (/tmp is used as fallback). 1244 1245@item @code{debug} [-x] @var{debug level} 1246 1247This sets the amount of logging @code{mgetty} will do. A good value is 1248@var{4}, more details are seen with @code{5}, and @code{9} is really noisy. 1249Try it! The log data is written to the file specified by @code{LOG_PATH} in 1250@file{policy.h}, usually this is something like @file{@LOG_PATH@}. 1251 1252@item @code{gettydefs} @var{gd tag} 1253 1254If you use the gettdefs feature of @code{mgetty} -- which is @emph{not} 1255recommended! -- this specifies the gettydefs tag to use for the given line. 1256See @var{man gettydefs}, @var{man mgettydefs}. 1257 1258@item @code{term} @var{terminal type} 1259 1260If you are on Linux or similar OSes that have @code{getty} set the 1261@code{TERM=xxx} terminal type variable, and have no other method to set it 1262(e.g. from @file{/etc/profile} or @file{$HOME/.profile}), @code{mgetty} can 1263do it for you. Just specify @samp{@code{term} vt100} or so. I don't think 1264it's a good idea to specify the terminal type on a per line base (what if 1265all your callers use different terminal types?), so the default is 1266@var{unset}. 1267 1268@end itemize 1269 1270@c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 1271 1272@node Fax, voice, mgetty, Top 1273@chapter Fax Operations 1274 1275Both mgetty and sendfax deal exclusively with raw ``g3'' fax files (``g3'' 1276stands for ``group 3'', which is the CCITT standard for encoding images for 1277fax transmission). You will have to use external programs to create, view 1278or print these. 1279 1280There are two kinds of g3 files, the high resolution type with 204x196 1281dpi and the low (``normal'') resolution ones with 204x98 dpi. If you 1282mix up the two, the recipient will get a fax page that is either twice 1283or half the proper length. You have been warned. 1284 1285The width of a fax page is always 1728 pixels, the length is arbitrary 1286(though there are some plain paper fax machines out there that limit the 1287page length to A4 paper). A typical full page has a length around 2100 1288pixels in high-resolution mode. 1289 1290@menu 1291* Convert:: Converting fax files 1292* Receiving:: Receiving faxes 1293* Sending:: Basic @code{sendfax} usage 1294* Polling:: Fax polling using @code{sendfax} 1295* Queuing:: Automated fax queuing 1296* Fax-Tools:: Additional tools provided for handling g3 files 1297* Scanner:: Using an external fax as a scanner 1298* runtime-sendfax:: Runtime configuration: @file{sendfax.config} 1299@end menu 1300 1301@node Convert, Receiving, Fax, Fax 1302@section Converting fax files 1303 1304I recommend getting the @samp{pbmplus} package written by Jeff Poskanzer, 1305which includes lots of small programs to convert various bitmap formats 1306into a portable intermediate format (@code{pbm}) that can easily be 1307converted to fax format with the @code{pbm2g3} program. Further, it comes 1308with lots of tools to scale, flip, and otherwise manipulate the @code{pbm} 1309bitmaps. Be warned: it includes its own version of G3 conversion programs 1310(@code{pbmtog3} and @code{g3topbm}), so be careful which one you use. 1311The programs in the @code{mgetty} package (@code{pbm2g3} and 1312@code{g32pbm}) behave slightly different (that is, they work!), and are 1313significantly faster. Note that the @code{pbmplus} package does not 1314include a graphical front end. 1315 1316The @file{pbmplus} package can be found on most major FTP sites, e.g. on 1317ftp.x.org in the @file{/contrib} directory. @xref{ftp}. 1318 1319If you want to view the images using X11, you should get one of the many 1320image viewers, like @samp{xview}, @samp{xloadimage} or @samp{xv}. 1321@xref{Fax-Tools}. A simple, but very fast fax viewer can be found in 1322@file{mgetty/frontends/X11/}. 1323 1324Here are some examples for viewing fax files using @code{g32pbm}: 1325 1326@itemize @bullet 1327@item 1328You can print a fax on a PostScript printer (try @samp{lpr -Pps} if you 1329don't have @samp{lp}): 1330 1331@example 1332cat $faxfile | g32pbm | pnmtops -noturn | lp -dest postscript 1333@end example 1334 1335@item 1336or on an Epson-LQ, scaled for fine resolution (use -yscale 1.84 for 1337normal resolution): 1338 1339@example 1340cat $file | g32pbm | pnmscale -xscale 1.76 -yscale 0.92 |\ 1341 pgmtopbm | pbmtodot -360x180| lp -o epson - 1342@end example 1343 1344@item 1345or you could view it using X11 via one of the following commands: 1346 1347@example 1348$ viewfax -v $file 1349 1350$ cat $file | g32pbm >/tmp/fax.pbm ; xloadimage /tmp/fax.pbm 1351 1352$ g32pbm $file | xv - 1353@end example 1354 1355@end itemize 1356 1357There are three easy ways to create g3 fax files, either use @code{pbm2g3} 1358(included in this package. Do not use @code{pbmtog3} from the pbmplus 1359toolkit. @xref{pbmtog3}.), use GhostScript (GNU Software, can be found on 1360prep.ai.mit.edu) which contains a ``digifax'' driver that will produce the 1361required format, or try Chris Lewis' @samp{hp2pbm} package which will 1362convert HP Laserjet print files into g3 fax files (@code{hp2hig3} 1363program). 1364 1365Once you have the right tools, there are lots of ways to create fax files 1366for a wide variety of applications. Here are some examples: 1367 1368@itemize @bullet 1369@item 1370Ascii files can be converted using @samp{pbmtext | pbm2g3} (use a 1371@emph{large} font, and don't convert texts longer than about 50 lines). 1372Alternatively, you can convert ascii files to PostScript using 1373@samp{psify}, the @samp{pslp.ps} program from the ghostscript 1374distribution, or similar tools, and feed their output into GhostScript. 1375 1376@item 1377PostScript input can be converted by GhostScript (version 2.4 or 1378higher), using the digifax (@samp{dfaxhigh} and @samp{dfaxlow}) drivers. 1379It will generate a plain g3 file with a 64 byte additional header, which 1380will be skipped automatically. (You have to generate separate g3 files, 1381one per page). 1382 1383A typical call to ghostscript would look like this: 1384 1385@example 1386gs -sDEVICE=dfaxhigh -sOutputFile=/tmp/fax.g3.%d yourdocument.ps 1387@end example 1388 1389Do @emph{not} use the ``tiffg3'' or similar drivers, they will create output 1390files with headers that sendfax does not understand, thus causing the 1391receiving fax machine to reject the data (it will assume that the 1392transmitted headers are garbled data). 1393 1394If you use Ghostscript version 3.01 and up, you can use the @samp{faxg3} 1395driver as well, its output is identical to the output of the 1396@samp{dfaxhigh} driver except for the 64 byte header. Besides this, 1397there should not be any difference. 1398 1399I have observed that with Ghostscript 5.01, the output of the @samp{faxg3} 1400driver is rendered better than that of the @samp{dfaxhigh} driver. In 1401addition, the former is compiled-in by default, while the latter is not. 1402Thus, the default driver used by @code{faxspool} is now (starting with 1.1.7) 1403the @samp{faxg3} driver. 1404 1405@item 1406Bitmaps can be converted using the @samp{pbmplus} tools, but you'll have 1407to do the proper scaling by hand. Use a pipeline with @code{pbm2g3} at the 1408end. 1409 1410@item 1411@TeX{} dvi files can be converted to PostScript using @samp{dvialw} or 1412@samp{dvips}. If you want to get the best possible output quality, you can 1413use Metafont to create a set of 204x196 dpi fonts, which will look a lot 1414better than scaled 300 dpi fonts (look into @file{contrib/dvi-fax} for 1415instructions how to do this). You can use the @code{epsf} macros to include 1416encapsulated PostScript files, e.g. a scanned signature. 1417 1418@item 1419Another way for @TeX{} file conversion is Ralf Schleicher's @code{faxdvi} 1420package, found at 1421@file{ftp://ftp.leo.org/pub/comp/os/unix/networking/mgetty/faxdvi-1.1.tar.gz}. Don't 1422ask me about, ask him! 1423 1424@item 1425HP-Laserjet files can be translated with Chris Lewis' @file{hp2pbm} 1426package. It contains a program @code{hp2hig3} that will read 1427HP-Laserjet @file{PCL4} files and produce G3 output. 1428 1429@strong{Warning:} the G3 files that hp2hig3 emits lack the leading EOL 1430code, thus causing @code{sendfax} to complain and possibly fail. As a quick 1431fix, you can pipe those files through @code{g3cat}, it will fix the data. 1432 1433@end itemize 1434 1435A rather crude sample conversion program (@code{faxcvt}) is provided in 1436the fax directory. 1437 1438Better conversion, including guessing of the format of the input files, 1439is done by the @code{faxspool} program, also provided in the fax 1440directory. @xref{Queuing}. 1441 1442 1443@node Receiving, Sending, Convert, Fax 1444@section Receiving faxes 1445 1446If everything has been set up properly, faxes will be received 1447automatically. Obviously, mgetty has to be listening to the proper modem 1448line. Then, if a fax arrives, mgetty will store it in the directory 1449@code{FAX_SPOOL_IN} (or the directory configured in @file{mgetty.config}, 1450@pxref{runtime-mgetty}) and send a mail to @code{MAIL_TO} (defined 1451in @file{policy.h}). 1452 1453The file name format is somewhat tricky (the reason behind it is that I 1454have to create something unique without using @code{mktemp()}, because that 1455would make it impossible to find out which pages belong to which fax). It 1456is: 1457@example 1458f<res><seq><line>[-<remote id>].<pagenr> 1459@end example 1460@code{<res>} is @code{n} or @code{f}, depending on the resolution of the 1461fax. @code{<seq>} is a sequence number, 7 digits wide, somewhat related to 1462the reception time. @code{<line>} are the last two letters of the tty 1463device, e.g. @file{S1}. If the sending side specified a fax station id, 1464it comes next, after a leading dash (all blanks are replaced by dashes). 1465Finally, after a dot, you'll see the page number. 1466 1467 1468If you want to process incoming faxes automatically, for example, print 1469them, re-send them to another fax, send them by mail to you when you're on 1470vacation, you could use what I call ``notify programs'': 1471 1472If you define @code{FAX_NOTIFY_PROGRAM} in @file{policy.h}, mgetty 1473will call this program (or shell script) when a fax has been completely 1474received. It will be called with the following command line arguments: 1475 1476@example 1477FAX_NOTIFY_PROGRAM @var{<hangup code>} '@var{<sender id}>' @var{<nr of pages>} \ 1478 @var{<file name page 1>} @var{<file name page 2>} @dots{} 1479@end example 1480 1481@var{<hangup code>} is 0 if the receive was successful, non-zero 1482otherwise. @var{<sender id>} is the fax identification string received 1483from the other side. @var{<file name page (i)>} is the full path name for 1484each received page. 1485 1486A sample command line might look like this: 1487 1488@example 1489@BINDIR@/new_fax 0 "+49 89 3243328" 1 @FAX_SPOOL@/ff-01.a123 1490@end example 1491 1492In addition, some environment variables are provide: @code{CALLER_ID}, 1493@code{CALLER_NAME}, @code{CALLED_ID} (Caller ID and destination ISDN MSN, 1494if available and supported by your modem), and @code{DEVICE} (the full 1495name of the tty device, if you want to process faxes differently 1496depending on the line they came in). 1497 1498Such a ``notify program'' could print out the fax, convert it into a MIME 1499metamail and send it away, display it in an X window (this a little bit 1500tricky), or whatever. (A friend of mine uses it on his Linux box to call a 1501program that will make the keyboard LEDs blink when a fax has arrived -- as 1502you can see, maximum flexibility is possible). 1503 1504I provide a few examples (printing on HP laserjet, mailing as gzip'ed, 1505uuencoded pbm file, @dots{}) in @file{samples/new_fax.*} 1506 1507 1508If you have the @code{dialog} shell tool, you can use the @code{faxv} 1509program (``faxview'') that I provide in @file{frontends/dialog/faxv} to 1510browse through all faxes in the incoming spool directory, view them, print 1511them, rename and move them, @dots{}. @file{faxv} is really more a sample 1512program to show you how to do it, and you have to configure the X11 viewer 1513and the printing program in the source code, but I use it for my faxes, and 1514it works. Because of limitations on some operating systems, the list of 1515faxes displayed is limited to the last 50 faxes received. 1516 1517 1518@node Sending, Polling, Receiving, Fax 1519@section Basic @code{sendfax} usage 1520 1521Sendfax is very primitive---no spool management, no format conversion, 1522etc. It is designed to be able to send exactly one fax (consisting of 1523multiple pages) to exactly one fax machine, but it is usable from 1524within shell scripts. Its input are pages in ``g3'' format, either 1525created with ghostscript or with pbm2g3. 1526 1527It is called like this: 1528 1529@example 1530sendfax [-v] [-n] @var{<phone-number>} @var{<fax page(s)>} 1531@end example 1532 1533e.g. 1534 1535@example 1536sendfax 0893243328 /tmp/to_gert_1.g3 @FAX_SPOOL_OUT@/picture.g3 1537@end example 1538 1539It will then attempt to open the fax device and send all the pages to 1540the remote fax machine, in the given order. 1541 1542It will print little or nothing to stdout or stderr, except if it cannot 1543find or open one of the named files, or if some transmission errors occur. 1544 1545(There are a few stubs in the code to put headers on the pages at run-time, 1546but since most class 2 faxmodems do not implement the command set properly, 1547putting a header on a page does not work with them - because of that, I had 1548to disable the corresponding code. @code{faxspool} works around this 1549problem by using @code{g3cat} (@pxref{Fax-Tools}) to ``paste'' a header 1550line on top of each page) 1551 1552If you specify @samp{-v}, sendfax will output more verbose progress 1553messages. 1554 1555If you specify @samp{-n}, it will try to send the fax data in normal 1556resolution, default is fine resolution. (No conversion is done, so make 1557sure that your input data is already in the proper format.) 1558 1559Detailed reports can be found in the log file (usually 1560@file{@FAX_LOG@}) --- but they may be of little more than 1561technical interest since virtually all conversation with the fax modem is 1562logged. (Nevertheless, if you send me any bug report, @emph{please include 1563all log files}) 1564 1565@strong{Warning:} Watch sendfax closely when sending the first few 1566faxes. I had it abort a transfer a couple of times, not being able to 1567recover and @emph{not} hanging up the modem (the modem was completely 1568locked up, with the phone line off-hook)! In my case, it was a problem 1569of the modem that went away when I upgraded the firmware. Very old 1570ZyXEL releases sometimes stopped the DTE and forgot to re-start it again. 1571 1572The return codes of the sendfax program were chosen to make it easy for 1573external programs (i.e. faxrunq) to decide whether to try again or not: 1574 1575@example 1576 0: all pages transmitted successful 1577 1: error on command line 1578 2: cannot open fax device (typically happens if fax device is 1579 locked, but could also be a permission problem) 1580 3: error initializing the modem 1581 4: dial failed, "BUSY" 1582 5: dial failed, "NO DIALTONE" 158310: dial failed, "ERROR" or "NO CARRIER" 158411: waiting for XON failed (should never be seen) 158512: transmitting page(s) failed (or polling failed) 158615: some catastrophe hit (termination signal or blocked modem) 1587@end example 1588 1589If the error code is less than 10, the attempt didn't cost anything, so an 1590external program should try again to send the files. If it is 10 or higher, 1591the failed attempt probably cost something, and the program should decide 1592whether to try again (thus expending more money) or mail the operator and 1593tell him something went wrong. My @code{faxrunq} program will suspend the 1594job after five unsuccessful tries with error codes >= 10. 1595 1596@node Polling, Queuing, Sending, Fax 1597@section Fax polling using @code{sendfax} 1598 1599Sendfax can also be used for fax polling (that is, you call someone and 1600initiate a fax connection, and then @emph{receive} a document. Don't 1601confuse it with fax-on-demand, this is something different), the syntax is: 1602 1603@example 1604sendfax -p @var{<fax-number>} 1605@end example 1606 1607 1608or for sending a fax and then switch to polling: 1609 1610@example 1611sendfax -p @var{<fax-number>} @var{<send-documents>} 1612@end example 1613 1614(in this case @var{<send-documents>} are sent, and then the documents 1615from the other modem are polled, if there are any) 1616 1617the received pages are written to the current directory, so make sure 1618you have write access... 1619 1620 1621@strong{Warning:} Fax polling does @emph{not} work with ZyXEL Modems 1622with ROM releases before 6.00 - with the 6.01 and 6.10 Eproms it works, 1623but 6.11a is broken again. 6.12 and 6.13 work fine. 1624 1625It definitely doesn't work with some Rockwell-based Faxmodems (Supra), 1626since many versions of this chipset does not support polling. Some work, 1627though, so you simply have to try it. 1628 1629Could anybody try this with an Everex Faxmodem? 1630 1631 1632@node Queuing, Fax-Tools, Polling, Fax 1633@section Automated fax queuing 1634 1635For fax spooling and processing the queue, four additional utility 1636programs are provided: 1637 1638@itemize @bullet 1639 1640@item 1641@code{faxspool} will spool a number of files (accepting various formats) 1642and put them into the fax spool directory. Its syntax is: 1643 1644@example 1645faxspool [options] phone-number input-file(s) 1646@end example 1647 1648@samp{phone-number} can be an alias, in this case the private and global 1649alias files @file{$HOME/.faxnrs} and @file{@CONFDIR@/faxaliases} will be 1650searched for a line starting with this alias. The remainder of this line 1651will then be used as fax number. 1652 1653@code{faxspool} interacts with the @code{file} program and 1654@file{/etc/magic} to determine the file type of the input files. If your 1655@file{/etc/magic} lacks entries for the various bitmap files, take a look 1656at @file{fax/etc-magic}, it contains the most important magic numbers. 1657 1658@code{faxspool} reads the text to put on top of each fax page from a text 1659file. The text file is (in order of precedence) the argument of the option 1660-h, the @file{$HOME/.faxheader} and as system-wide default 1661@file{@CONFDIR@/faxheader}. This file must 1662contain pure ASCII text. Some tokens are replaced by the actual values: 1663@@T@@ becomes the destination phone number, @@P@@ becomes the actual and 1664@@M@@ the total page number, and @@U@@ is replaced by the user name. If 1665your fax modem cuts of a few lines on top of each page, it may be a good 1666idea to put a blank line before the header line itself, and it is also a 1667good idea to indent the line about 5 spaces. 1668 1669For the available options, please read the @file{faxspool.1} man page. 1670 1671@item 1672@code{faxrunq} will read this directory and try to send all the faxes 1673queued there (time scheduling is available, but primitive). If faxrunq 1674succeeds, the fax is deleted and the sender is mailed. If it does not 1675succeed after five tries (@samp{BUSY} or a locked fax modem do 1676@emph{not} count for this) it will send a mail and not try any further 1677to send this fax. (This should prevent your faxmodem from making you 1678bancrupt@dots{}). 1679 1680@code{faxrunq} should be called at regular intervals from @code{cron} to 1681process the queued jobs. It should only be executed by @emph{root}, to 1682make sure that all the files in the fax spool directory are read- and 1683writeable. 1684 1685 1686@item 1687@code{faxq} will display all entries in the fax queue. If called with 1688the @samp{-o} parameter, it will also display completed, but not yet 1689deleted jobs (JOB.done files). If called with the @samp{-v} parameter, the 1690output will be more verbose. 1691 1692Jobs that are just being sent are not shown (@code{faxq} doesn't see locked 1693jobs) 1694 1695@item 1696@code{faxrm} can be used to remove fax jobs from the queue. It is called 1697with the job ids of the to-be-removed faxes as command line argument. The 1698job ids are those that @code{faxq} returns. 1699 1700@end itemize 1701 1702These utilities do still have some rough edges, but I think they are fairly 1703usable by now. 1704 1705Earlier variants of those utilities had to be configured in the source 1706code, from release 0.20 on, this is done by @code{make}. Please check the 1707scripts nevertheless, whether all directories and files are set up 1708properly. 1709 1710@node Fax-Tools, Scanner, Queuing, Fax 1711@section Additional tools for working with g3 files 1712 1713Some additional tools are provided for manipulating G3 fax files: 1714 1715@itemize @bullet 1716@item 1717@code{g3cat} (in the @file{g3/} directory) concatenates multiple G3 1718fax files. It accepts ``raw'' g3 files and digifax files and outputs a 1719``raw'' g3 file without headers. Its syntax is analogous to 1720@code{cat}, except that you @emph{have} to specify @file{-} to read 1721from @file{stdin}. 1722 1723@code{g3cat} recognizes two flags: @code{-l}, to separate the fax files 1724with a thin black line, and @code{-a} to byte-align the end-of-line 1725codes in the file (Warning: some modems do not like this). 1726 1727@item 1728To convert an incoming fax to Jef Poskanzers @file{portable bitmap} 1729(@code{pbm}) format, you can use the @code{g32pbm} program that is 1730also provided in @file{g3/}. It's advantages over Jef's 1731@code{g3topbm} program are that it's approximately five times faster 1732and takes only one eigth as much virtual memory (on machines with low 1733virtual memory, it can thus be up to 100 times faster!). Its disadvantage 1734is that it produces only ``raw'' (i.e., binary) @file{pbm} files; and 1735it's not as stable when handling erroneous @file{g3} data (means that 1736if one line is severly corrupted, it can happen that the next line 1737will not be decoded properly. The rest of the file will then be OK 1738again). 1739 1740Syntax: 1741@example 1742g32pbm [-r] [-s] [-l] [-d <dpi>] [g3-file] 1743@end example 1744 1745If no g3 file is specified, standard input is used. 1746 1747The @code{-s(tretch)} option causes @code{g32pbm} to double each row of 1748the g3 file. You can use this to adjust the aspect ratio of a "normal" 1749resolution fax file to match that of a "fine" resolution fax. Of course 1750you can use other @code{pbmplus} tools for this instead, but 1751@code{-s} is sure to be faster. 1752 1753If you have a HP Laserjet printer, you can make @code{g32pbm} output HP 1754LJ data with the @code{-l} switch. The desired resolution is chosen with 1755the @code{-d 75|150|300} switch. 1756 1757@item 1758For the other direction, I have provided a @code{pbm2g3} program that will 1759convert Jef Poskanzer's Portable BitMap format into G3 fax data suitable 1760for faxing with @code{sendfax}. The @file{pbm} files can be produced by 1761various sources, e.g. drawing programs (@code{xpaint}), bitmap manipulation 1762programs (@code{xv}), or simply be converted from other file formats by 1763means of the @file{pbmplus} tools. 1764 1765As above, my variant is a lot faster than Jef's, and unlike his, it 1766produces g3 data that adheres to the T.4 standard (if you don't fiddle too 1767much with the options...), so you don't have to apply any patches to make 1768it work together with @code{sendfax}. 1769 1770Syntax: 1771@example 1772pbm2g3 [-r] [-a] [-w page with] [-h blank lines] [pbm-file] 1773@end example 1774 1775if no pbm file is specified, standard input is used. 1776 1777For a detailed description, see the @file{pbm2g3(1)} man page. 1778 1779@item 1780@code{viewfax}. To view G3 data files under X11, Frank D. Cringle has 1781written a very nice and fast tool that will display the files on screen, 1782turn them, zoom them in and out, @dots{} 1783 1784The source code can be found in the @file{mgetty/frontends/X11} directory. 1785It's not (yet) built and installed by default, but it's straightforward. 1786 1787For a detailed description, see the @file{README} and @file{viewfax.man} 1788files in that directory. 1789 1790@item 1791To convert an incoming fax into X-Windows @file{xwd} bitmaps, you can 1792use Chel van Gennip's @code{g3toxwd} program, found in the 1793@file{contrib/} directory. 1794 1795@item 1796If you want to print out faxes on a HP laserjet printer, you have two 1797opions: you can use Chel's @code{g3tolj} program (also in the 1798@file{contrib/} directory), or you use my @code{g32pbm} program with the 1799@code{-l} option, which will make it output LJ data. 1800 1801@end itemize 1802 1803@node Scanner, runtime-sendfax, Fax-Tools, Fax 1804@section Using an external fax as a scanner 1805 1806It is possible to tell mgetty to answer the phone even if it is not 1807ringing (I call this ``virtual rings''). Just send mgetty a signal 1808@code{SIGUSR1}, this is usually done with @samp{kill -USR1 1809@var{<mgetty-pid>}}. Mgetty will then pick up the phone and try to make a 1810connection. 1811 1812If you have a normal fax machine connected to the fax modem, it should 1813be possible to have that fax machine dial any digit (to turn off the 1814dial tone), and then have mgetty answer the phone to receive the 1815``incoming'' fax, thus using the fax machine as scanner without paying for a 1816call. For a description of an sample setup (thanks, caz!), please see 1817@file{doc/scanner.txt}. 1818 1819Whether it works may depend on your phone company's setup, but it should. 1820 1821If you have a modem that has a @samp{data/voice} button, it should also be 1822possible to hit that button to make the modem pick up the phone. Mgetty 1823will automatically notice that and handle it properly. (I've tested this 1824only with ZyXELs - could somebody else please test this with other modem 1825types and send me a logfile? Thanks) 1826 1827@node runtime-sendfax, , Scanner, Fax 1828@section Runtime configuration for sendfax: @file{sendfax.config} 1829 1830Basically, @code{sendfax} can work very well with the compiled-in defaults 1831(from @file{policy.h}), sometimes slightly modified by command line 1832options. 1833 1834If you use more than one fax modem, possibly of different type, this is 1835very awkward, because the command line will get very long. For that reason, 1836there is a configuration file which will control nearly every detail of 1837sendfax' behaviour. 1838 1839It is usually named @file{@CONFDIR@/sendfax.config}. 1840 1841The config file consists of multiple sections, separated from each other by 1842the keyword @samp{port}. All configuration options given before the 1843first @samp{port} statement specify global options, and everything between 1844two @samp{port} statements applies only for the device with the given name 1845(@samp{port} takes an argument). Let me show you an example: 1846 1847@example 1848# global defaults: 1849# fax station id is always the same 1850fax-id ++49-89-1234 1851# always have the speaker on 1852modem-init ATM1L3 1853 1854# port specific: for /dev/tty1a, switch the speaker off 1855port tty1a 1856modem-init ATM0L0 1857 1858# port specific: for ttyS1, use another fax station id 1859port ttyS1 1860fax-id ++1234567 1861@end example 1862 1863As you can see, empty lines and comment lines (starting with "#") are 1864allowed. 1865 1866Every line in the config file that is not a comment - or empty - starts 1867with a keyword (listed in detail below), followed by a "data" field. In the 1868example above, @samp{fax-id} is the keyword, @samp{++49-89-1234} is the 1869corresponding data, the fax ID for the sending machine. Most data fields 1870are strings, but there are a few boolean and integer items. 1871 1872The available keywords are (if it's possible to set this item from the 1873command line, the flag is given in brackets). 1874 1875@itemize @minus 1876@item @code{fax-devices} [-l] @var{ttys} 1877 1878Sets the fax modems to use, e.g. @samp{tty1a:tty2a}. Default is 1879@code{FAX_MODEM_TTYS} from @file{policy.h}. The device names given here are 1880used to look up the corresponding @code{port} section later. Watch out for 1881upper-/lowercase. 1882 1883It is not very useful to specify this in the per-port section, so it is 1884ignored if met there. 1885 1886@item @code{modem-init} [-m] @var{command} 1887 1888Specifies an @samp{AT...} command that is to be sent to the modem right at 1889the @strong{beginning} of all modem talk (even before setting the modem 1890into fax mode, so this could be an @samp{ATZ} if you want to reset the 1891modem). 1892 1893@item @code{modem-handshake} @var{command} 1894 1895Specifies an @samp{AT...} command that will be sent to the modem at the 1896@strong{end} of the modem initialization, right before dialing. @strong{Do 1897not use ATZ or such here}, since resetting the modem will switch off fax 1898mode. Default is @code{FAX_MODEM_HANDSHAKE}. 1899 1900@item @code{modem-type} [-C] @var{type} 1901 1902Force the modem command set to use. Default is @samp{auto} (auto-detect, 1903which may not work on very cheap modems), possible other values are 1904@samp{cls2}, for ``class 2 only'' modems, and @samp{c2.0} for ``class 2.0'' 1905faxmodems. Default is @code{DEFAULT_MODEMTYPE}. @xref{runtime-mgetty}. 1906 1907@item @code{modem-quirks} @var{bitmask} 1908 1909Same as in @code{mgetty}, this can be used to adapt @code{sendfax} to 1910some peculiarities in certain modems. @xref{runtime-mgetty}. 1911 1912@item @code{reset-after-fail} @var{command} 1913 1914Specifies an @samp{AT...} command that is to be sent to the modem in the 1915case of a dialup failure (NO CARRIER, NO DIALTONE). This could be 1916something to reset the modem's ISDN logic (@samp{ATZ!}) in case you run 1917into communication problems between modem and ISDN PABX. Should only 1918ever be necessary in very special cases. 1919 1920@item @code{max-tries} @var{nnn} 1921 1922Specify the maximum number of tries per page if the receiving end reports 1923reception errors. If @var{nnn} tries do not suffice to successfully 1924transmit a page, @code{sendfax} will give up or simply go on, depending on 1925the setting of @code{max-tries-continue} (see below). If this is set to 1926@samp{0}, @code{sendfax} will ignore retransmission requests and simply go 1927on. Default is @code{FAX_SEND_MAX_TRIES}. 1928 1929@item @code{max-tries-continue} @var{y|n} 1930 1931After the maximum number of tries for one page are reached, @code{sendfax} 1932can report an error and abort (@code{max-tries-continue @var{no}}), or go 1933on with the next page (@var{yes}). 1934 1935For ``mission critical'' faxes, I'd set it to @var{no}, but since the page 1936quality is most often quite good even if reported as ``page bad'', the 1937default is @var{yes}. 1938 1939@item @code{speed} @var{baudrate} 1940 1941Set the port speed to use for fax send operations. Usually, @samp{38400} is 1942a good choice, but a few dumb modems (for example, some based on rockwell 1943chipsets) need @samp{19200} or even @samp{9600}. A few modems can go 1944higher, but @code{sendfax} may not support it, and it may not always work. 1945Default is @code{FAX_SEND_BAUD}. 1946 1947@item @code{switchbd} @var{baudrate} 1948 1949On some (very few) modems it is necessary to start with baudrate "A" and 1950switch to baudrate "B" after sending the @samp{AT+FCLASS=2} command. If you 1951specify this, @code{sendfax} will switch from @code{speed} to 1952@code{switchbd} right after setting the modem to class 2/2.0. Default is 1953@code{FAX_SEND_SWITCHBD}, I'd recommend @strong{not} using it unless you're 1954sure that you need it. 1955 1956@item @code{open-delay} @var{msec} 1957 1958A few modems respond to raising the DTR line (when opening the device) 1959with @samp{OK}. This can confuse @code{sendfax}, because it will see 1960this OK as response to the next command. In the log file, you can see if 1961your modem exhibits this problem if the echo of each @code{AT} command 1962can be seen when waiting for the response to the @emph{next} @code{AT} 1963command. With @code{open-delay} you can give a number of milliseconds to 1964wait after the device is active until sendfax flushes all incoming 1965responses and goes ahead. 1966 1967The only modems that need this so far are an ELSA 33.6 and an ELSA 1968MicroLink 56k, and delaying for about 1500 ms cured the problem. 1969 1970@item @code{ignore-carrier} @var{y|n} 1971 1972Some misbehaving modems lower the DCD (carrier detect) line briefly 1973between sending multiple pages. Depending on the operating system used, 1974this may cause all subsequent port accesses on this serial port to fail. 1975You'll recognize it if you get a ``weird-looking'' sendfax log file that works 1976fine up to the end of the first page, and then aborts with @samp{I/O 1977error} or so. 1978 1979In earlier versions, you could achieve this by setting 1980@code{FAX_SEND_IGNORE_CARRIER} in @file{policy.h}, but this has been 1981removed. Use the config file instead. 1982 1983Modems where this is known to be necessary include all USR modems 1984(Courier and Sportsters), some ZyXEL 1496 EG(+), and some GVC models. 1985 1986The default is @code{ignore-carrier yes}, as there are just too many users 1987out there to read documentation, and it does less harm that way. 1988 1989@item @code{dial-prefix} @var{command} 1990 1991This is the command used for dialing out. Usually this will be something 1992simple, as @samp{ATD} or @samp{ATDP}, but if you have an unusual setup, it 1993could also be something like @samp{ATX0DP0;X4DT} (meaning: switch off 1994dial-tone detection, pulse-dial @samp{0}, back to command mode, switch on 1995dial-tone detection, and go ahead dialing with touch tones). The phone 1996number will be sent right after the @code{dial-prefix}. Default is 1997@code{FAX_DIAL_PREFIX}. 1998 1999@item @code{fax-id} [-I] @var{your fax phone} 2000 2001specifies the "fax station id" used to identify your fax machine to the 2002receiving end. Usually this is the telephone number of your own fax 2003machine, but if you want to (and if your modem support it), you can put up 2004to 20 alphanumeric characters here, e.g. @code{+1-11-222 Fred}. Default is 2005@code{FAX_STATION_ID}. 2006 2007Watch out: the @code{faxspool} program @emph{only} uses the @emph{global} 2008definition from sendfax' config file, so the fax id it puts on the header 2009might not be the same as the one transmitted by sendfax, if you use port 2010specific settings for @code{fax-id} in @file{sendfax.config} (Paul Sands). 2011 2012@item @code{poll-dir} [-d] @var{full path} 2013 2014This is used to specify a directory where polled faxes (wheather maps and 2015such) are to be saved into. Default is the current directory. 2016 2017@item @code{normal-res} @var{y|n} [-n] 2018 2019If set to @samp{yes} or @samp{true} (boolean), @code{sendfax} won't attempt 2020to make a fax connection in "fine resolution" mode. Normally you won't need 2021to use that option, since @code{faxrunq} will set the @code{-n} switch if 2022needed. Default is @samp{no} 2023 2024@item @code{fax-min-speed} @var{speed} 2025 2026Sets the lowest transmission speed that the modem will negotiate with 2027the receiving modem. (Not implemented yet). 2028 2029@item @code{fax-max-speed} @var{speed} [-M] 2030 2031Sets the maximum transmission speed that the modem will negotiate with the 2032fax receiver. Usually, you don't need this, as decent modems will pick 2033the best speed automtically, but sometimes (e.g. for the USR Courier 2034series) this doesn't always works, and transmission fails with +FHS:25. 2035If you see that error, you might want to try @code{fax-max-speed 7200}. 2036 2037@item @code{verbose} @var{y|n} [-v] 2038 2039If set to @samp{yes} or @samp{true}, @code{sendfax} will output progress 2040reports on stdout, if set to @samp{no}, @code{sendfax} will only print 2041error and warning messages. Default is @samp{no}. 2042 2043@item @code{debug} [-x] @var{nn} 2044 2045controls the amount of information written into the fax log file 2046(@code{FAX_LOG} in @file{policy.h}). @samp{0} means "totally silent" (not 2047even errors are written), @samp{9} is really noisy. I usually use @samp{3} 2048or @samp{4} in normal use, and @samp{6} for debugging. Default is 2049@code{LOG_LEVEL}. 2050 2051@item @code{page-header} [-h] @var{file} 2052 2053Yet unused (because of implementation shortcomings in all tested modems) 2054 2055@end itemize 2056 2057To show you how it will look like, I have included a sample 2058@file{sendfax.config} file below. Three modem lines exist on my system, all 2059modems have different initialization and flow control commands, and on one 2060line I have to tell the modem to use pulse dial because the PBX is too old. 2061 2062@example 2063# 2064# sample configuration file for sendfax 2065# 2066 2067# global settings 2068verbose y 2069# the modems are attached to the following ports: 2070fax-devices tty1a:tty2a:tty4c 2071 2072# this is my fax number 2073fax-id +49-89-xxxxxx 2074 2075# generic defaults 2076modem-init ATL3M1 2077dial-prefix ATD 2078debug 4 2079 2080# port specific overrides 2081 2082# Zoom 28K8 2083port tty1a 2084 modem-handshake AT&K4 2085 2086# MultiTech 2087port tty2a 2088 dial-prefix ATDP 2089 modem-handshake 2090# ^^^ this means "no extra command to set modem handshake" 2091 debug 9 2092 2093# ZyXEL 2094port tty4c 2095 modem-init ATM1L2 2096 modem-handshake AT&H3 2097 2098@end example 2099 2100@c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 2101 2102@node voice, Problems, Fax, Top 2103@chapter Voice Operations 2104 2105This chapter explains how you can use mgetty to implement an answering 2106machine if you have a modem that understands the voice command set 2107(i.e. the ZyXEL). 2108 2109The first version of these extentions was written by Klaus Weidner. 2110 2111Since February 1995 these extentions are now developed and maintained 2112by Marc Eberhard (Marc.Eberhard@@Poseidon.ThPhy.Uni-Duesseldorf.DE). 2113Since late 1998, Marc Schaefer (schaefer@@alphanet.ch) took over 2114vgetty development. Please see 2115http://www-internal.alphanet.ch/~schaefer/vgetty.html for vgetty 2116specific information, patches and releases, and please 2117send email about the voice features to him, not to me. 2118 2119@strong{I have removed the whole chapter from the documentation for 2120now, as the voice stuff has changed too much, but the docs were not 2121updated accordingly. Please see the programs and examples in the 2122@file{voice} subdirectory for ideas how to get it going. Configuration is 2123explained in @file{voice.conf}}. 2124 2125The @file{voice} subtree is @strong{NOT} included in the official release 21261.0, because of the lack of documentation, and because Marc thinks it's 2127not stable enough yet. It @emph{is} included in the 0.99 and 1.1 beta 2128development trees, so if you want to play with it, get one of those 2129version. @strong{BUT} keep in mind what ``beta'' means: lacking 2130documentation, problems, crashes, whatever. 2131 2132@c ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 2133 2134@node Problems, Thanks, voice, Top 2135@chapter Common problems and solutions (TROUBLESHOOTING) 2136 2137This chapter tries to describe some known problems that can occur when 2138installing or using this package. Don't worry, most of these have been 2139solved. 2140 2141@menu 2142* Modems:: Modems 2143* Systems:: Operating Systems 2144* General:: General problems 2145* logfiles:: Sample Log files 2146* ftp:: Where to find the programs mentioned (FTP) 2147* get-uucp:: How to get the software via UUCP 2148@end menu 2149 2150 2151@node Modems, Systems, Problems, Problems 2152@section Modems 2153 2154This section describes problems that can occur when using various types 2155of modems. Unfortunately, the class 2 fax implementations vary quite a 2156bit between different manufacturers. 2157 2158Many of the instructions for certain modem types below still refer to 2159changing @code{#define}s in @file{policy.h} instead of listing the 2160appropriate @file{mgetty.config}/@file{sendfax.config} lines, mainly 2161because I haven't had the time to figure it out myself and didn't get 2162enough feedback from config file users yet. 2163 2164@menu 2165* Common:: Problems common to many modem types 2166* Zyxel:: ZyXEL U1496 modem series 2167* TelelinkIMS08:: Telelink IMS 08 Faxline + Modems 2168* Rockwell:: Rockwell-based modems, e.g. Supra 2169* Zoom-vfast:: Zoom VFP/VFX 24K FaxModem (V.FAST 24,000 Modem) 2170* Best14496EC:: Best 14496 EC Faxmodem 2171* GVC:: GVC FM-144Vbis+/1 (Rockwell-Based) 2172* creatix:: CREATIX modems (Rockwell-Based) 2173* Telekom:: German Telekom approved GVC modems 2174* Dallas:: Dallas Fax 14.4 2175* Everex:: Everex 2176* Exar:: Exar 9624 fax modem 2177* Tornado:: Tornado / Lightspeed modems 2178* Zoltrix:: Zoltrix Platinum Series 14.4 (Rockwell-Based) 2179* MultiTech:: MultiTech modems 2180* ELSA:: ELSA analog/ISDN faxmodems 2181* USR:: US Robotics Courier/Sportster Data/Faxmodems 2182* Elink-ISDN:: Elink ISDN Terminal Adaptors (``ISDN Modems'') 2183* i4l:: ISDN 4 Linux support 2184* i4l-capi:: ISDN 4 Linux with CAPI (capi4linux) 2185* Class 1:: Class 1 Faxmodems 2186@end menu 2187 2188@node Common, Zyxel, Modems, Modems 2189@subsection Problems common to many modem types 2190 2191@itemize @bullet 2192@item 2193Disable auto-answer in the modem (@code{ATS0=0}), because it will interfere 2194with the manual answer done by @code{mgetty}. If you @emph{have} to use 2195auto-answer, set the @code{mgetty} ring-counter (@code{-n <i>}) high enough 2196that @code{mgetty} will never try to answer the phone manually. 2197 2198@item 2199Make sure that your modem is set to return @emph{verbose result codes}, 2200that is, set @code{ATV1}. Otherwise, the modem won't return @samp{CONNECT} 2201or @samp{RING} but @samp{1} or @samp{2} as result code, and mgetty 2202definitely doesn't understand that. By default, @code{mgetty} sets 2203@code{ATV1} automatically, but if you change the init sequence, watch out 2204for this. 2205 2206@item 2207Make sure that your modem is set to the proper dialing type (@code{ATT&W} 2208for touch-tone, @code{ATP&W} for pulse dialing) --- @code{sendfax} uses 2209@code{ATD...} to dial out, assuming that the modem knows which dialing 2210method to use. Alternatively, set @code{FAX_DIAL_PREFIX} in @file{policy.h} 2211or @code{dial-prefix} in @file{sendfax.config} accordingly. 2212 2213@item 2214If the default modem initialization string in @file{policy.h}, which is 2215quite generic, doesn't work for your modem, you can either change it 2216according to your needs, or store all settings in the non-volatile RAM 2217(NVRAM) inside the modem and change the initialization strings to plain 2218@code{ATZ} (modem reset). 2219 2220These settings ought to work with most modems: 2221 2222@code{ATS0=0}: do not auto-answer, @code{E1}: echo on, @code{Q0}: send 2223modem responses, @code{&D3}: reset on DTR->low. 2224 2225The following, for example, are ZyXEL specific things: 2226 2227@code{&H3}: set handshake to RTS+CTS, 2228@code{&N0}: ``multi-auto'' connect, accept all known protocols, 2229@code{&K4}: enable v42bis/mnp5 compression. 2230 2231Naturally, you can use any init string you want (but the modem has to 2232return OK) --- check with your modem manual. 2233 2234@item 2235On USR and some ELSA Modems, it has occasionally been reported that the 2236initialization phase runs through fine, but incoming @code{RING} messages 2237are not recognized, and mgetty complains about @samp{junk on the line}. 2238In all those cases, it were baud rate problems. The modem was initialized 2239with an init-sequence of @code{"" ATZ OK} only. Problem with this is, 2240after ATZ, the modem changes to the DTE baud rate that the last AT&W 2241command was sent with. If that baud rate differs from the @code{mgetty} 2242port speed, a RING won't be detected. Fix is easy: send another 2243@code{AT} command after the @code{ATZ}. For example, make the init 2244sequence @code{"" ATZ OK AT OK}. The second @code{AT} command will 2245set the modem back to the mgetty port speed. 2246 2247@item 2248Some modems do not like the @samp{+FDCC=1,5,...} command. 2249 2250In the latest version, mgetty and sendfax will automatically detect if the 2251modem isn't able to do 14400 bps for faxing and will use 9600 bps --- 2252@samp{+FDCC=1,3,...} --- instead. So don't worry about the error message. 2253 2254@item 2255Sometimes mgetty cannot initialize the modem, it times out waiting for 2256the first @samp{OK}. (USR Sportsters are known to hit this). 2257 2258I assume that the problem is the DTR-induced modem reset before 2259sending the first @samp{+++ATH} to the modem. 2260I know that some modems need quite a lot time after a reset, so this 2261should go away if you add more delays before sending the first string 2262to the modem: 2263 2264In @file{conf_mg.c} (line 38 or so) change 2265 2266@example 2267char *def_init_chat_seq[] = 2268 @{ "", "\\d\\d\\d+++\\d\\d\\d\r\\dATQ0V1H0", "OK", 2269@end example 2270 2271to 2272 2273@example 2274char *def_init_chat_seq[] = 2275 @{ "", "\\d\\d\\d\\d\\d\\d+++\\d\\d\\d\r\\dATQ0V1H0", "OK", 2276 ^^^^^^^^^ additional delays here 2277@end example 2278 2279Or, if you don't want to modify the code, just set the @code{init-chat} 2280sequence in @file{mgetty.config} accordingly. 2281 2282Alternatively, you can just switch off the toggling of DTR 2283(since the HUPCL flag is set, it should work as well) by setting 2284@code{toggle-dtr no} in @file{mgetty.config}. 2285 2286@item 2287Some operating systems send their commands too fast for some modems (Linux 2288is known to do this). In that case it may be necessary to increase the 2289delay times for @code{DO_CHAT_SEND_DELAY} and @code{FAX_COMMAND_DELAY} in 2290@file{policy.h}. 2291 2292@item 2293Some Modems toggle DCD between pages, possibly correlated to the presence of 2294the ``high speed'' page transmission carrier. @code{sendfax} normally runs 2295carrier-sensitive, and will then get a lot error messages in the 2296@code{read} and @code{write} calls, logging them as @code{I/O Error} or 2297something similar when sending the first or second page. To work around 2298this, set @code{ignore-carrier true} in @file{sendfax.config}. 2299 2300If you run into this problem, @code{sendfax} will complain about 2301@samp{Error +FHNG:-5 (Unexpected hangup / read() error / write() error)} 2302and abort. 2303 2304@item 2305Some modems do not understand @code{ATH0}, responding with @samp{ERROR} to 2306that. Just modify the @code{init-chat} setting in @file{mgetty.config} to 2307send @code{ATH} instead of @code{ATH0}. This will fix it. 2308 2309@item 2310Faxing to some modems works very well, faxing to ``normal'' fax machines 2311fails all the time. 2312 2313In most cases, this error is caused by badly created G3 files. If you use 2314the old @code{pbm2g3} program, or an old copy of @code{hp2hig3}, it will 2315cause bad G3 files. 2316 2317Recently, a new problem appeared for postscript files created by certain 2318programs that insist on setting their ideas of the page size (some 2319versions of WinWord, FrameMaker, and dvipsk). If used together with 2320ghostscript 3.*, the resulting G3 file's width isn't correct. For a 2321fix, try creating the postscript file with a different program, use a 2322newer version of ghostscript, or an older one (2.62 is fine). Quite often 2323it helps to add @code{-sPAPERSIZE=a4} to Ghostscript's command line (in 2324@code{faxspool}). 2325 2326With a @code{mgetty} version later than June 1996, the @code{g3cat} 2327program should take care of this problem, fixing the line width 2328on-the-fly. It will print a warning, to tell you about the problem, 2329though. So if you get this warning, faxing should work, but you'd better 2330check all your programs anyway. 2331 2332@item 2333Some other Modems cannot (or not properly) distinguish between calling 2334faxes and calling modems. 2335 2336Some of them just refuse to answer both, only recognizing one and failing 2337on the other (NO CARRIER) --- in that case, there's nothing you can do to 2338make it receive both (except making the manufacturer fix it). What you can 2339do is to force it to receive always fax or always data (what is more 2340important for you). Data-Only can be set by the @code{data-only} keyword in 2341the configuration file, and Fax-Only with the @code{fax-only} keyword. 2342 2343In some cases, those problems may be caused by the modem forgetting the 2344@code{AT+FAA=1} command if it receives any other command after it. To fix 2345it, it may help to change the ``answer chat command'' in the config file to 2346 2347@example 2348answer-chat "" AT+FAA=1;A CONNECT \c \r 2349@end example 2350 2351if this helps for your modem, please tell me so, and I'll include it into 2352the documentation. 2353 2354Some other modems can distinguish the different call types @emph{most of 2355the time}, but some 2400 bps modems mysteriously fail. That may be caused 2356by some -- strange -- modems sending a certain tone when @emph{calling} the 2357other side, and the receiving end mistaking that for the fax calling tone. 2358Arne Marschall said about that: ``...Or try calling your modem with your 2359phone and whistle. If it says ``+fcon'' it is one one those which can't 2360deal with modems using a calling tone'' - try it. 2361 2362Another, quite simplistic approach of some modem manufacturers is that 2363they distinguish Fax by waiting until the time specified in register 2364@code{S7} (time to carrier) runs out, and then switching from data to 2365fax carrier. That normally works quite well - if the other side is patient 2366enough to wait that long @dots{}. For example, if the modem 2367switches to fax after 60 seconds have passed, and the caller has a timeout 2368of 50 seconds, it will definitely fail. If in doubt, try setting 2369@code{ATS7=30} (but only if all else fails - and don't ask @emph{me} why it 2370doesn't work...) 2371 2372@item 2373Except if you feel sure that your modem needs less, do not try to 2374send or receive faxes with a port speed of less than 19200 bps. Since fax 2375transmission is synchronous (no start and stop bit!), you need at least 237612000 bps on the Computer-Modem line to transmit 9600 bps on the line. 2377 2378@item 2379For some modems, incoming faxes are detected properly, but mgetty times out 2380about two minutes later in @code{fax_wait_for(OK)}. Most likely, the 2381@code{switchbd} (@file{mgetty.config}) speed is set wrongly. A number of 2382cheap modems (e.g. Rockwell-Chip based ones) step to 19200 bps upon fax 2383reception, and 2384setting this option to @samp{19200} will tell mgetty about it. Better 2385modems have no need for that, so if you have defined it and your modem 2386does *not* change bit rates, it won't work either. 2387 2388If you have this problem, your log file for an incoming fax call will look 2389like this: 2390 2391@example 239209/21 09:55:48 yS1 waiting for ``RING'' 239309/21 09:55:48 yS1 got: [0d][0a]RING ** found ** 239409/21 09:55:48 yS1 send: ATA[0d] 239509/21 09:55:48 yS1 waiting for ``CONNECT'' 239609/21 09:55:48 yS1 got: [0d][0a]ATA[0d][0d][0a]FAX 239709/21 09:55:50 yS1 found action string: ``FAX'' 239809/21 09:55:50 yS1 start fax receiver... 239909/21 09:55:50 yS1 fax receiver: entry 240009/21 09:55:50 yS1 fax_wait_for(OK) 240109/21 09:55:56 yS1 fax_wait_for: string '+FCON' 240209/21 09:57:50 yS1 Warning: got alarm signal! 240309/21 09:57:50 yS1 fax_read_byte: read returned -1: Interrupted system call 240409/21 09:57:50 yS1 fax_get_line: cannot read byte, return: Interrupted system call 2405@end example 2406 2407@item 2408For a couple of modems, you can find initialization and setup hints in the 2409file @file{doc/modems.db}. Just browse through it, maybe you'll find 2410something helpful. (You're welcome to provide entries for modems not yet 2411in the list). 2412 2413@item 2414Sometimes, very weird things happen upon login (that is, long after 2415@code{mgetty} has done its work), for example, /bin/login blocks 2416infinitely, the caller is thrown out immediately again, or the shell won't 2417notice a logout, etc. 2418 2419Quite often, this is caused by a modem not setting the data carrier detect 2420(DCD) line properly (properly meaning here "reflecting the actual line 2421conditions"). On most modems this is done with the @code{AT&C1} command. 2422 2423Another possibility are too long or otherwise broken modem cables that 2424corrupt the signals, and introduce noise on the modem control lines. Flat 2425cables are famous for this, use round, shielded modem cables, no longer 2426than necessary. 2427 2428@item 2429@code{mgetty} will complain loudly if you switch off your modem. 2430 2431Well, what should I say, this is a feature :-) -- I think that mgetty 2432should detect and complain if a modem is not working, and if you switch it 2433off, it is most definitely not working. 2434 2435For most modems, there is an easy way out. @code{mgetty} can query the 2436modem's DSR line at startup, and wait until that line comes active. For 2437that to work, you need to set DSR to ``always on'' with @code{AT&S0&W} 2438(entered from a terminal program), and then switch on @code{need-dsr yes} 2439in @file{mgetty.config}. Check the log file (with @code{debug 6}) to see 2440whether it's working. It won't work for old unix systems where you can't 2441query the state of the serial port control lines (DSR, DCD, etc.). 2442 2443For modems or unix systems that have problems with DSR, there's another 2444approach: You just create a file, @file{/etc/nomodem.ttyS1}, 2445or however you want to name it, when you intend to switch off your modem. 2446Instead of running @code{mgetty} from @file{/etc/inittab}, you run a 2447``wrapper'' script that will wait until the nomodem file disappears, 2448and then starts @code{mgetty}. That way, you can just prevent 2449@code{mgetty} from starting when you don't want it to. 2450 2451The wrapper is easy: 2452 2453@example 2454#!/bin/sh 2455# 2456while test -f /etc/nologin.ttyS1 2457do 2458 sleep 60 2459 done 2460exec /usr/local/sbin/mgetty ttyS1 2461@end example 2462 2463@item 2464I have been asked about ``superfine'' fax mode recently (using 392/408 dpi 2465instead the usual 198/204 dpi). It is not yet implemented. It would not 2466be not overly hard, but you need a modem that supports it - no class 2 2467modems that I know of support it, and only very few 2.0/2.1 modems 2468(MultiTech). So it hasn't been done yet. 2469 2470@item 2471Similar to the last bullet, V34 fax (using transfer speeds up to 28.800 2472bps) isn't fully implemented yet. My modems do not support it, and nobody 2473has asked for it yet. It should be really easy, though. 2474 2475@end itemize 2476 2477 2478@node Zyxel, TelelinkIMS08, Common, Modems 2479@subsection ZyXEL 2480 2481First of all, yes, ZyXELs tend to somewhat non-deterministic behaviour - 2482most modems work perfectly with @code{mgetty+sendfax}, a few don't, and I 2483do not always find out what's wrong. 2484 2485If it works first, and then suddenly stops working, it does quite often 2486help do to a @strong{full} modem reset, that is, switch it off, press the 2487DATA/VOICE key, switch it on again and hold the key for about 20 Seconds. 2488(That's for the 1496E and E+, for other models, it works differently, 2489check you manual). That cured the problems in many cases. 2490 2491The same holds true after a firmware change: always do a full modem reset 2492in case you change the ROM version! 2493 2494Do not use non-plus ZyXELs (the ``slower'' ones) for faxing with DTE 2495speeds above 38400 bps, I got a report that it won't work. 2496 2497Do not use the @code{S18} register, set it to 0. Its purpose is for dumb 2498@code{getty} programs where the modem has to change its baud rate back to a 2499certain value if some other program has modified it. Since @code{mgetty} 2500will reinitialize the modem anyway if another program has dialed out, the 2501@code{S18} register cannot improve anything, it can only harm (e.g., if it 2502is set to @code{3}, the modem will send any @code{RING} with 19200 bps --- 2503imagine what happens if @code{mgetty} sets the port to 38400 @dots{}) 2504 2505If you want to use Caller ID (and have subscribed to it), add S40.2=1 to 2506the modem initialization string [For the ZyXEL 2864, this might be S84.4=0, 2507but check with your modem manual!]. 2508 2509@strong{Warning:} If you use a very old ZyXEL and try to send some complex 2510graphics (the ``tiger.ps'' example file in the GhostScript package is 2511known to produce this), it may lock up. This is because the old ZyXEL 2512firmware had @emph{lots} of bugs concerning hardware flow 2513control---sometimes the ZyXEL just forgot to raise CTS when it can 2514accept data again. The symptoms are that the transmission hangs, no 2515modem LEDs are flashing any more, the logfile won't grow any more and 2516the receiving machines hangs up after printing a partial page. 2517 2518This bug has been fixed in ROM release 6.01, so you should consider 2519upgrading your eproms if you run into this. With ROM release 6.01 and 25206.11a, it works correctly (a hundred-odd faxes sent without problems). 2521 2522Rom releases I've never been able to make @code{sendfax} work reliably are 25236.00 and 6.10 (6.10a works), and various 5.0x releases. 2524 2525Fax polling (both server and client side) is broken in ROM 6.11a. 2526 2527The very latest ROM releases, 6.12, 6.13 and 6.15, work perfectly in every 2528possible aspect. I tried fax sending, receiving, polling, data calls, 2529@dots{} - and everything simply @emph{works}! 2530 2531The latest ZyXEL roms can normally be found on ftp.zyxel.com, in 2532@file{/pub/other/zyxel/r*}. 2533 2534Some models, seemingly only the @samp{EG+} (german telekom approved), 2535toggle the DCD line during the pre-page handshake, thus causing 2536@code{sendfax} to abort (with a ``I/O error'' during read/write 2537operations). You can work around this by defining 2538@code{ignore-carrier true} in @file{sendfax.config}. 2539 2540ZyXEL modems can do security callback (@code{AT*Gi} with @code{i} > 0). 2541With ROM releases up to 6.11a, this doesn't interact very well with 2542mgetty. If you want to use it anyway, send me a note and I'll describe 2543what to change (but be warned, mgetty operation will become somewhat 2544unreliable by those changes!). With 6.12, it works very good. 2545 2546Oh, one additional note: ZyXELs can do voice recording and playback. Klaus 2547Weidner and Marc Eberhard have written voice handling tools, to turn your 2548modem into a sophisticated answering machine. Yo can finde this tools in 2549the @file{voice} subdirectory. (NOTE: In version 1.0, I haven't included 2550the stuff, because the docs are heavily lacking and Marc thinks it's not 2551ready yet. Get 0.99 or 1.1-betas to play with voice). 2552 2553Josef Wolf (jw@@raven.inka.de) has added some comments about the ZyXEL 2554Eproms (I don't know whether it's true or not, ask him or 2555support@@zyxel.com): 2556 2557Most EPROMs require /PGM and Vpp to be Vcc while in ROM-Mode. On ZyXELs 2558these two pins are removed in the socket so the pins are _floating_. This 2559treatment is @strong{out of spec} for @emph{any} EPROM. The TI-Types 2560originally used by ZyXEL seem to tolarate this treatment. But most other 2561EPROMS won't work properly. There are two solutions to this problem: 2562 25631.) use the types which zyxel used. (could be troublesome to find some) 2564 25652.) take two sockets, solder jumpers between pins 1, 31 and 32 (these are 2566 /PGM, Vpp and Vcc) and place them into the original sockets before 2567 inserting the EPROMs. 2568 2569@strong{NEWS:} ZyXEL has a new modem line out in the market, the 2570@emph{ZyXEL COMET 336} modem. This is a fairly standard Rockwell-based 2571junk modem. It can't do class 2 or class 2.0 fax. Don't buy it. 2572 2573@node TelelinkIMS08, Rockwell, Zyxel, Modems 2574@subsection Telelink IMS 08 Faxline+ Modems 2575 2576Thanks to friendly support by MVS, Germany, I got a Telelink IMS 08 modem 2577for testing and was able to adapt @code{mgetty} accordingly. 2578 2579The modems factory defaults are very good, so it's sufficient for 2580@code{mgetty} operations to set @code{init-chat} (in @file{mgetty.config}) 2581to @var{ATQ0V1E0 OK AT&F2S0=0&D3X6&K3 OK}, and @code{switchbd} to 2582@var{19200} (yep, it switches baud rate. Stupid, but true). After that, 2583receiving fax + data calls works fine. 2584 2585Fax sending is not that trivial. Basically, it works after setting 2586@code{modem-handshake} to @code{AT&K3}. @code{FAX_SEND_FLOW} (in 2587@file{policy.h}) can be anything that the host machine supports (because 2588the modem does both Xon/Xoff and RTS/CTS handshake simultaneously). 2589 2590Unfortunately, a few problems remain: 2591 2592-- faxing multi-page faxes to ZyXELs with ROM release 6.11a doesn't work 2593(fails on the receiving end with +FHNG:100 and on the sending side with 2594+FHNG:50). 2595 2596-- faxing to some paper fax machines fails completely, for others, ``only'' 2597complex graphics (like the Ghostscript-``tiger.ps'') fail. This one can be 2598partially cured by adding lots of padding zeroes into the fax data 2599(@code{g3cat -p 24}) - but that's unelegant, not complying to class 2 2600specs, and not supported (besides, it still doesn't work all the 2601time). Maybe later versions of @code{sendfax} will do the padding 2602automatically. 2603 2604I recommend against using this modem with sendfax. In addition to the 2605technical problems, their customer support (at least, that of the german 2606distributor MVS) is basically non-existant. (I wrote them four times 2607describing my problems with the modem, and never got an answer). 2608 2609@node Rockwell, Zoom-vfast, TelelinkIMS08, Modems 2610@subsection Rockwell-based modems, e.g. Supra 2611 2612As far as I know, sending or receiving are no problem (although you have to 2613use 19200 baud when in class 2 faxmode - set @code{speed} to @code{19200} 2614in @file{sendfax.config}, and set @code{switchbd} to @code{19200} in 2615@file{mgetty.config}. Remember to change the modem initialization strings 2616to the proper values for your modem, that is, @var{ATQ0V1E0 OK AT&K3S0=0 OK}. 2617 2618Especially for the @samp{SupraFax} modem, I've been told that you have to 2619set @code{modem-handshake} to @code{AT&K3} and initialize the modem with 2620@code{AT&S0&D2&K3}. Since the modem does not like being reset with DTR->low 2621(do @strong{not} use @code{&D3}!), an @code{ATZ} in the first 2622initizalization string in @file{mgetty.c}, to reset the modem into a known 2623state, is a good idea, too. 2624 2625(Thanks to Christof Junge, chris@@cj.in-berlin.de, for trying out several 2626weeks until everything worked!) 2627 2628Some other SupraFAX Rom releases seem to forget that they are set to use 2629RTS/CTS handshake if a @code{+FCLASS=0} is sent to them. I think it should 2630help to store the @code{AT&K3} into NVRAM, but maybe you have to patch 2631@file{mgetty.c}. See @file{contrib/readme.supra} for details. 2632 2633Fax polling does not work because the Rockwell chipset does not support it. 2634 2635@strong{NEWS:} Most recent Rockwell 33.600 modems do not support any 2636decent fax operation anymore -- they added ``simultaneous Voice over Data'' 2637(SVD) to their modem firmware, and because the Eproms are not large 2638enough, they threw out their class 2 firmware. Don't buy such a modem, 2639it won't work properly with @code{mgetty+sendfax}. 2640 2641If you buy a Rockwell-based modem (they are usually quite cheap), make 2642sure that you get one that can do class 2 or (better) class 2.0. Even if 2643it's written on the box, some recent models just can't do it! 2644 2645Together with @code{vgetty}, many Rockwell modems can distinguish between 2646different types of incoming ``RING'' tones (usually called ``distinguished 2647RING'' by the local Telco). Use the command @code{AT#SDR=n} (n between 0 2648and 7) to enable this feature. If in doubt, check with your modem 2649manual whether your modem can do this at all. 2650 2651@node Zoom-vfast, Best14496EC, Rockwell, Modems 2652@subsection Zoom VFP/VFX 24K FaxModem (V.FAST modem, 24,000 bps) 2653 2654For the Zoom V.FAST 24,000 modem, you should change @code{init-chat} to 2655@code{ATE1Q0V1 OK AT&FS0=0&C1&D2W1 OK} (see the manual for the meaning of 2656the commands). After that, everything should work. (I got very euphoric 2657reports). 2658 2659My own experience with my Zoom VFX 28.800 is also quite good, but it 2660doesn't seem to like automatic fax/data distinction too much, that is, some 2661data calls are ``recognized'' as fax and fail miserably. Dunno how to fix 2662it, I run my Zoom as data-only. 2663 2664Fax polling doesn't work. 2665 2666@node Best14496EC, GVC, Zoom-vfast, Modems 2667@subsection Best 14496 EC fax modem 2668 2669Works quite well. Use @code{FLOW_HARD} for all flow control settings (in 2670@file{policy.h}, use 19200 bps for sending and receiving. Set 2671@code{modem-init} to @code{ATE1Q0V1 OK ATS7=60&D3\\Q3%C1\\N7 OK} 2672(@file{mgetty.config}), and @code{modem-handshake} to @code{AT\\Q3&S0} 2673(@file{sendfax.config}). 2674 2675After that it should work. Kudos to Sami Koskinen (tossu@@krk.fi). 2676 2677@node GVC, creatix, Best14496EC, Modems 2678@subsection GVC FM-144Vbis+/1 (Rockwell-based) 2679 2680Basically, the modem is similar to the SupraFax modem. 2681 2682Change @code{speed} in @file{mgetty.config} and @file{sendfax.config} 2683to @code{19200} and set @code{modem-handshake} to @var{AT&K4}. 2684 2685Further, if your model toggles DCD betwen fax pages (@code{sendfax} fails 2686mysteriously between pages), @code{ignore-carrier true} in 2687@file{sendfax.config}. 2688 2689After that, it should work. 2690 2691Note: If your modem doesn't properly distinguish incoming fax from data 2692calls (i.e., a 2400 bps caller is repeatedly ``identified'' as fax caller), 2693upgrade your firmware. I've been told (thanks to John Watson, 2694watson%carssdf@@rutgers.edu) that a new firmware release, @strong{v1.69} 2695exists that will fix those problems. 2696 2697@node creatix, Telekom, GVC, Modems 2698@subsection CREATIX Modem (Rockwell-Based) 2699 2700For the new CREATIX modem, use the following settings in @file{mgetty.config} 2701(thanks to Jens Hektor, jens@@physiology.rwth-aachen.de): 2702 2703@example 2704speed 38400 2705init-chat "" ATE1Q0V1 OK ATS0=0&D3&K3 2706@end example 2707 2708and @code{modem-handshake} @var{AT&K3} in @file{sendfax.config}. 2709 2710The modem has a voice mode, too, and it should work with @code{vgetty} by 2711now. As the docs for vgetty are out-of-date, I don't really know how to 2712get it to work, though. 2713 2714@node Telekom, Dallas, creatix, Modems 2715@subsection German Telekom approved GVC modems 2716 2717(GM-144VBIS+ RC9696/14 (?)) 2718 2719This modem does @emph{not(!)} use Xon/Xoff flow control. Further, the default 2720modem profile sets @samp{&S1}, which makes the modem disable DSR all the 2721time. On systems using the FAS serial driver, this will @emph{disable 2722CTS flow control}! 2723 2724So, #define @code{FAX_MODEM_HANDSHAKE "AT\\Q3&S0"} in @file{policy.h}, do not 2725define @code{FLOW_SOFT} for flow control, and fax sending should work. (It 2726does for me!) Changing @code{FAX_SEND_BAUD} to @code{B19200} is not 2727necessary, it works with @code{B38400}. 2728 2729Fax receiving... I did not fully test it. It's somewhat difficult since 2730that modem insists on using auto-answer, but it should be possible to let 2731it auto-answer if you set mgetty's ring counter high enough. Or, you can 2732trick the modem, by changing mgetty's answer command (@code{ATA}) into 2733@code{ATS0=1} -- upon the next RING, the modem will ``auto-answer''. 2734 2735@node Dallas, Everex, Telekom, Modems 2736@subsection Dallas Fax 14.4 2737 2738Change @code{FAX_SEND_BAUD} and @code{DEFAULT_PORTSPEED} to 2739@code{B19200}, change all occurances of @samp{AT&H3} to @samp{AT&K5}, remove 2740@samp{AT&N0} and @samp{&K4} in @file{policy.h}. 2741 2742@node Everex, Exar, Dallas, Modems 2743@subsection Everex 2744 2745All I programmed is strictly to everex specs, thus, it should work. 2746Most likely, some fiddling with the initialization strings is necessary. 2747(If you have an Everex modem, please report to me what you did change). 2748 2749@node Exar, Tornado, Everex, Modems 2750@subsection Exar 9624 fax modem 2751 2752This modem needs two stop bits (when sending), so you have to add 2753@code{CSTOPB} to @code{tio.c_cflag = @dots{}} in @file{tio.c} 2754/ @code{tio_mode_sane()}. 2755 2756Also, use @code{#define FAX_SEND_BAUD B19200} and, for fax reception, 2757@code{#define DEFAULT_PORTSPEED B19200}. 2758 2759Further, the modem is a little bit timing critical - please insert 2760@code{delay(500)} calls at the end of @code{fax_open_device()} 2761(@file{sendfax.c}, line 122) and before sending the page punctuation 2762(@code{fax_command("+FET=...")} in @file{sendfax.c}, @code{main()}, around 2763line 540). 2764 2765Also, for at least one Exar 9624 (built into a Compaq notebook), it's been 2766necessary to add two delays (@code{\\d\\d}) before the @code{AT+FCLASS=0} 2767initialization string in @file{mgetty.c}. 2768 2769@node Tornado, Zoltrix, Exar, Modems 2770@subsection Tornado / Lightspeed modems 2771 2772Here is a suggested setting for the default profile for these modems. 2773@xref{Common}. 2774 2775For Lightspeed store profile: 2776@example 2777at&f 2778at&c1 2779at&d3 2780ats0=0 2781at%c2 2782atw1 2783at&w 2784@end example 2785 2786and for tornado store profile: 2787 2788@example 2789at&f 2790at&d3 2791ats0=0 2792at&w 2793@end example 2794 2795Then just initialize the modem with @code{init-chat} set to 2796@code{"" ATZ OK}. 2797 2798@node Zoltrix, MultiTech, Tornado, Modems 2799@comment node-name, next, previous, up 2800@subsection Zoltrix Platinum Series 14.4 2801 2802This modem is also Rockwell-based, so don't expect anything unusual... - it 2803works quite well, both fax sending and fax/data answering. You should use 2804the following settings in @file{policy.h} (suggested by las@@io.org, Laszlo 2805Herczeg) 2806 2807@example 2808#define DATA_FLOW FLOW_HARD 2809#define FAXREC_FLOW FLOW_SOFT 2810#define FAXSEND_FLOW FLOW_SOFT 2811#define FAX_SEND_BAUD B38400 2812#define FAX_MODEM_HANDSHAKE "AT&K3" 2813#define MODEM_INIT_STRING "ATS0=0V1Q0&D3&K3%C1W1" 2814@end example 2815 2816In some circumstances, sending of @strong{large} graphics files (the 2817well-known @file{tiger.ps}) may fail. 2818 2819@node MultiTech, ELSA, Zoltrix, Modems 2820@subsection MultiTech modems (MT1432BG and MT2834BG) 2821 2822First of all, I want to thank MultiTech Munich for their support (borrowing 2823me two test modems w/o charge). 2824 2825Second, I can only strongly recommend these modems, they are @strong{great} 2826(but expensive). Got it, unpacked it, switched it on, set mgetty's init 2827string (@code{MODEM_INIT}) to @code{ATS0=0&S1} -- and everything simply 2828worked. Flawlessly. (Warning: usually I recommend @code{AT&S0} to force the 2829DSR line high -- needed, because otherwise some O/Ses won't do hardware 2830flow control -- but that doesn't seem to work on my model. AT&S1 means that 2831H/W flow control only works when a carrier is present, but then, who needs 2832flow control in command mode?) 2833 2834The modems do very reliably distinguish incoming fax and data calls, and 2835outgoing fax works also very good (unfortunately, it's limited to 9600 bps 2836fax rate, but that's no big problem). 2837 2838The only problem I've seen is that those modem do the fax bit order on 2839reception @strong{right} (everybody else does it wrong, to be compatible 2840with Rockwell, who botched it in the first place). Thus, @code{g32pbm} 2841won't be able to decode the data, unless you call it as @code{g32pbm -r}. 2842(You can see if the bit order is wrong if g32pbm complains in every single 2843line). I'll work something out for one of the next releases to work around 2844this (@var{modem-quirks 02}). 2845 2846BUT: There seems to be a way to tell the modem to behave like a Rockwell 2847one and use the "wrong" byte order. Carlos Fonseca found the following 2848text on ftp.multitech.com: 2849 2850@example 2851Function Command Description 2852 2853PROCESS +FRBOR Maintaining compatibility with 2854DATA IN Rockwell Class 2 chip set for fax data 2855DIRECT OR reception . 2856REVERSE ORDER FRBOR=0 - Process received fax data in 2857 direct order. 2858 FRBOR=1 - Process received fax data in 2859 reverse order. 2860@end example 2861 2862so, with AT+FRBOR=1 added to the modem initialization string, it should be 2863possible to get fax reception on the MultiTechs going without tricks. 2864 2865Glenn Thobe suggested the following definitions for @file{policy.h} (which 2866mostly are factory defaults anyway, but it wouldn't harm to set them) 2867 2868@example 2869#define MODEM_INIT_STRING "ATS0=0Q0&D3&E1&E4&E13&E15" 2870#define FAX_MODEM_HANDSHAKE "AT&E4" 2871@end example 2872 2873My @file{mgetty.config} for those modems looks like this (everything not 2874mentioned is set to the defaults I ship in @file{policy.h}). 2875 2876@example 2877# MultiTech MT1432BG 2878port <whatever1> 2879 init-chat "" \d\d\d+++\d\d\dATE0E1V1H0 OK ATL0M0S0=0 OK 2880 modem-type cls2 2881 2882# MultiTech MT2834BG 2883port <whatever2> 2884 init-chat "" \d\d\d+++\d\d\dATH0&F OK ATX4&D3 OK ATQ0L0M0S0=0 OK 2885 modem-type cls2 2886@end example 2887 2888Some of the newer 56k-capable MultiTech modems have voice functionality, 2889but some firmware versions are very much broken. Others seem to work more 2890or less. So make sure you can return your modem to the dealer if it 2891doesn't work - and if the dealer isn't willing to do this, get a different 2892modem. Russell King told me that the firmware version 0316D should be 2893working ok, but I got some negative reports as well. Hmmm. 2894 2895@strong{News} The most recent series of MultiTech modems (MT5634ZBA-V92 2896external, or MT5634ZPX-PCI-V92 / ISI5634PCI internal), based on the 2897Lucent/Agere Venus chipset, seem to be really good for fax, data and 2898voice support. Older firmware releases had bugs in the voice area, but 2899if you use the most recent firmware version, they should be fine. For 2900vgetty, you might need to set "forceV253 true" and "rec_compression 6" 2901in @file{voice.conf} (Contributed by Lee Howard, <faxguy@@howardsilvan.com> 2902-- thanks). 2903 2904@node ELSA, USR, MultiTech, Modems 2905@subsection ELSA voice/fax modems 2906 2907ELSA makes a nice series of Data/Fax/Voice products, both for POTS 2908lines and for ISDN. In general, all of them are supported fairly well by 2909@code{mgetty+sendfax} (fax works, fax polling works(!), voice works), but 2910here are a couple of notes for different products: 2911 2912@itemize @bullet 2913@item MicroLink 56k/56k pro -- standard analogue voice/fax/data modem. 2914Pretty good for about everything, but make sure you use the latest firmware 2915version (1.58), as earlier versions have bugs switching between voice and 2916fax mode. 2917@item MicroLink Office -- in addition to being a nice modem, this thing can 2918do fax reception and answering machine functionality in "standalone mode", 2919without a computer. Received voice calls and faxes can be downloaded via 2920X-Modem to the computer. I'm working on a nice GUI application to ease 2921using the standalone mode. The ML Office seems to be the only non-ISDN 2922ELSA modem that can do Caller ID (CLIP). 2923@item MicroLink TL/V.34 -- this is an ISDN terminal adaptor that can also 2924do V.34 modem calls and fax. Works nicely. 2925@item TanGo -- this an ISDN only terminal adaptor. Works, but it's pretty 2926boring stuff. 2927@item MicroLink 28.8/33.6 TQV -- this is the old voice/fax/modem series. 2928Works, but uses a different command to got to hardware flow control mode 2929(@code{AT\Q3} instead of @code{AT+IFC=2,2}) so you'll see some errors in 2930the voice log files. Don't worry about that. 2931@end itemize 2932 2933If you have any problems with ELSA modems and mgetty concerning fax/voice 2934support, report them to me first, and let me report them to ELSA - I'm 2935actively working together with them to iron out bugs, and it's easier if 2936all the reports come from only one contact person (me). 2937 2938@node USR, Elink-ISDN, ELSA, Modems 2939@subsection US Robotics (now 3com) Courier/Sportster Fax/Data modems 2940 2941There are a number of major lines of 3com/US Robotics modems: 2942 2943@itemize @bullet 2944@item USR Courier V.34/V.everything -- those are quite expensive, but 2945really, really good modems. I think those are the best V.34/X.2/V.90 2946modems around, and they are also very good for class 2.0 faxing. But 2947make sure that you use a recent firmware, as older versions had very 2948bad (and stooopid) bugs in the fax department. You can find out the 2949firmware version with the @code{ATI7} modem command. The 2950@samp{Supervisor rev} version listed should be at least @samp{6.5.3}, 2951better @samp{7.1.8} (this is the @samp{X.2 upgrade}). 2952 2953Fax polling still doesn't work, and if you send faxes to a modem that can 2954only accept fax with 7200 bps, it will fail with @code{+FHS:25} unless you 2955specify @code{sendfax -M 7200}. 2956 2957The Courier series does not have voice features. 2958 2959@item USR I-Modem -- this is an ISDN Terminal Adaptor with built in 2960V.34/fax mode (``ISDN Modem''). Nice product. Works. The same stuff 2961said for the Courier V.34/V.everything is true for the I-Modem. 2962 2963@item older USR Courier modems -- older series without flash ROM, and 2964possibly not upgradable to V.34/X.2 at all, might give problems. Fax was 2965added fairly late, and the first fax-capable releases are very buggy. If 2966you have such a modem, and @code{ATI7} does not list @samp{V34} in the 2967@samp{Options} line, you might try setting @code{modem-quirks 0x20} in 2968@file{mgetty.config}. Maybe it helps. But don't expect too much. 2969 2970@item USR Sportster series -- the ``Sportster'' is actually a range of 2971many different low-end modems. Most of them can do voice stuff, some of 2972them have flash ROM to be upgraded to newer firmware. For data, this 2973modem is quite good. For fax, it might work, and it might not -- I have 2974received a very high number of ``it doesn't work at all'' reports, and 2975also a number of ``it works very well for me'' reports. If you plan to 2976buy one, make sure you can return it if it doesn't work. (See below for 2977some specific issues and workarounds). 2978 2979@item Internal PC card -- I haven't been able to find out yet whether that 2980is a ``Sportster'' or a ``Courier'', but it seems to be a Sportster, with 2981all its negative habits. 2982@end itemize 2983 2984Some older USR firmware versions had severe bugs when doing RTS/CTS (that 2985is, hardware) flow control. Occasionally, a byte got lost, and sometimes 2986this confuses the modem enough to abort transmission with the error message 2987@example 2988Transmission error: +FHNG:44 (Unrecognized Transparent data command) 2989@end example 2990Sam Leffler recommends using Xon/Xoff flow control for both fax sending and 2991fax receiving (@code{#define FAX_SEND_FLOW FLOW_SOFT} and @code{#define 2992FAX_REC_FLOW FLOW_SOFT} in @file{policy.h}). 2993 2994Some day in the future, I'll make those "quirks" configurable from the 2995config file, but until then, you'll have to live with recompiling. Sorry. 2996(Upgrade your firmware!). 2997 2998Fax polling with the USRs is @emph{not} working, even though the modem 2999claims so. It will work half-way through, but fail miserably later. 3000 3001 3002When sending faxes with an USR faxmodem, set @code{ignore-carrier yes} in 3003@file{sendfax.config}. Otherwise it will fail after the first page with a 3004read error and error code -5. (But that is default anyway, if you use 3005mgetty 1.1.16 and up). 3006 3007For some fax receivers, a problem remains: the USR modems do not want 3008to negotiate 7200 bps transmission speed. If the receiving modem won't 3009accept 9600 bps, transmission will fail after sending three DCS frames, 3010with the error code +FHS:25. In that case, try setting 3011@code{fax-max-speed 7200} in @file{sendfax.config}. 3012 3013@code{RSPEC errors}: some series of USR Sportsters and early Couriers 3014have bugs in the handling of the @code{AT+FCC} command. It's meant to specify 3015the maximum transmission speed, like ``14400'', but these modems interpret 3016it as @strong{minimum} speed, so they fail if sending to a machine that 3017can only do 9600 bps. If you see RSPEC errors in the sendfax log (+FHS:24), 3018try the setting @code{modem-quirks 0x20} in @file{sendfax.config}. This 3019will tell @code{sendfax} not to set the corresponding @code{AT+FCC} parameter. 3020 3021 3022The USR modems support Caller ID delivery (both the I-Modem series and the 3023analog ones). Switch it on with @code{AT#CID=1} and mgetty should 3024automatically be able to recognize the incoming caller ID. If not, show 3025me a detailed log file... 3026 3027Firmware upgrades and documentation are available on @code{ftp.usr.de} 3028in the directory @file{/pub/USRobotics/modem/...}. 3029 3030@node Elink-ISDN, i4l, USR, Modems 3031@subsection Elink ISDN Terminal Adaptors 293, 310, 393 with X.75 and V.110 3032 3033The TA's are connected to national German ISDN (1TR6) or Euro-ISDN. The 3034host side is a standard serial port with an AT-command set, letting them 3035look like a conventional modem. Therefore they are often (wrongly) called 3036'ISDN modems'. 3037 3038It is strongly recommended to feed them with 115k2 bps, else only V.110 3039(38k4 bps) is available. Configuration may differ slightly, depending on 3040which of those Elinks is used, wether it is connected to Euro-ISDN or 1TR6 3041and last but not least they are still under developement, so you're on your 3042own with that. 3043 3044ISDN generally supports two nice features: first it is now possible to 3045check callers number, which may be used to identify callers, second ist 3046the charge service, where it is possible to request the amount of charge 3047units for the call. For mgetty the second one is only from minor interest, 3048but the first one is. The opposite phone number will be shown with the 3049command @code{AT\O}. If a call comes in, @code{AT\OA} will answer the 3050call, display caller's id in a 'digit only' (e.g. @samp{04419808550}) form 3051and then print out the @code{CONNECT}-String. 3052 3053To enable mgetty to utilize this, the "get caller ID" sequence must be set 3054up accordingly and the @samp{CND} feature must be enabled: 3055 3056Use @code{get-cnd-chat "" AT\\O OK} in @file{mgetty.config}, and make 3057sure that @code{#define CNDFILE "@dots{}/dialin.config"} at the 3058end of @file{policy.h} is enabled. 3059 3060If you only want to grab the phone 3061number and not check it against @file{dialin.config}, you can try playing 3062with something like @code{answer-chat "" AT\\OA CONNECT \c \r} 3063in @file{mgetty.config}. 3064 3065Having a glance at the output of @code{AT I4}-output of the Elink, it looks 3066as if it is able to support Fax-Service too, but there is no hint in the 3067manual. So mgetty will likely put itself into data-only mode. (I got some 3068information from the Elink people that some of the Elinks have a data/fax 3069analog modem built in, which should work nicely with the fax part of 3070@code{mgetty}, but I didn't try yet.) 3071 3072(Thanks to Ulrich Tieman, lord@@olis.north.de, for this section. Don't ask 3073me, ask him if you use an ELINK) 3074 3075@node i4l, i4l-capi, Elink-ISDN, Modems 3076@subsection ISDN 4 Linux support 3077 3078@code{mgetty} and @code{sendfax} work with isdn4linux (i4l), but there 3079are a number if things to point out. 3080 3081For data calls via ISDN V.110 or X.75 async modem emulation, you can put 3082mgetty on a @file{/dev/ttyI*} device and mgetty will handle so-called 3083"asynchronous ISDN" connections fine. To make sure that mgetty will 3084pick up the phone, set your local ISDN number with @code{AT&E<number>} 3085from @code{init-chat} (otherwise isdn4linux will just ignore incoming 3086calls). 3087 3088As far as I can see, i4l will always signal the caller ID for incoming 3089calls as "CALLER NUMBER: ..." to mgetty. Mgetty can handle this 3090just fine. 3091 3092If you want to see the destination number for incoming calls, add 3093@code{ATS23.2=1} to the @code{init-chat}. This will make i4l signal 3094the dialed MSN number as @code{CALLED NUMBER: 12345}, and mgetty will 3095then pass it on as $CALLED_ID to fax scripts and so on. This is 3096implemented since Linux 2.4.10, or in earlier Versions with Jan 3097Oberlaender's patch 3098(http://www.stud.uni-karlsruhe.de/~uslk/i4l-callednumber.tar.gz). 3099(@strong{NOTE}: This doesn't seem to work for at least Linux 2.4.20 3100as shipped by RedHat 8.0 - anyone with some details??!) 3101 3102Alternatively, you can set @code{ATS23.0=1}. This will make i4l signal 3103the dialed MSN number as @code{RING/12345}. This was problematic in the 3104past, as lots of other modems have a similar format to report the Caller ID 3105(like @code{RING;4321} in ELSA modems) but recent mgetty versions handle 3106this properly. With this, you can run a single mgetty instance for all 3107your telephone numbers: just set @code{AT&L*} in your init string - this 3108tells isnd4linux that @strong{all} incoming calls are to be signalled 3109to mgetty, not only specific MSN. 3110 3111@c init-chat "" ATZ OK AT&L* OK ATS23.0=1S23.2=1S0=0 OK 3112@c fax-only yes 3113@c rings 2 3114@c modem-quirks 1 3115 3116For the full list of available AT commands, consult the i4l docs 3117(for example in @file{/usr/src/linux/Documentation/isdn/README}. 3118 3119For ISDN PPP calls with synchronous PPP (which is the "normal" way to do 3120PPP over ISDN), you do @strong{not} need @code{mgetty}. PPPoISDN calls 3121are handled by @code{ipppd}, which is part of isdn4linux. Mgetty can 3122only handle PPP-over-X.75 or PPP-over-V110, which is something that is 3123only used for WAP connections or with old terminal adaptors. 3124 3125Fax support with isdn4linux is a tricky issue. For most ISDN cards, 3126this will @strong{NOT WORK}. It only works for cards that have a fax 3127chip (or separate CPU) on board, and can be accessed with the fax 3128class 2/2.0 command set. It will work fine with the Diehl Server BRI 3129ISDN card (active), and that's the only card I know that will work as of 3130June 2001. Accessing ISDN fax via CAPI is NOT supported (see below). 3131 3132There's a small catch: modem autodetection will make mgetty think that 3133your ttyI device doesn't support fax (because most cards can't do it). So 3134you need to set @code{modem-type cls} in @file{mgetty.config} and/or 3135@file{sendfax.config} to force class 2 mode. Class 2.0 mode is not 3136supported. 3137 3138Voice support with @code{vgetty} should work (use your ttyI device 3139as an answering machine, etc.). I have not tried it yet - talk to the 3140mgetty or i4l mailing lists if it doesn't work. 3141 3142@node i4l-capi, Class 1, i4l, Modems 3143@subsection ISDN 4 Linux with CAPI 3144 3145Some of the ISDN card manufacturers have pushed to adapt the windows 3146Common ISDN API (CAPI) to Linux. This in itself is not bad, but it has a 3147nasty side effect: less energy is invested to provide a useful Fax Class 2 3148support for the active ISDN cards that can do fax. Some cards don't have 3149Fax Class 2 at all, and for some cards the Class 2 support is quite 3150broken. 3151 3152So you might end up with a nice fax-capable card and no ttyI / Fax Class 2 3153support for it... 3154 3155@code{mgetty+sendfax} will, as of 1.1.31, @strong{NOT} work with a CAPI 3156interface. 3157 3158One of the problems with CAPI is that it is the wrong sort of 3159abstraction for the purpose of sending a fax. The call setup part 3160(dialing up) needs far too much attention for ISDN protocol details, and 3161the actual fax transmission part is far too automated - the CAPI doesn't 3162provide proper feedback about what's going on in the fax layer, like ``the 3163client requested a retransmission of page 2, and the connection was lost 3164in the middle of page 4'' - all you get is ``success/failure'' and the 3165number of pages transmitted (including retransmissions -- which makes this 3166figure less than useful). 3167 3168If you need to use fax with CAPI, take a look at the ``capifax'' software 3169available on @file{ftp://ftp.isdn4linux.de/pub/capi4linux} (not written 3170by me, but it works). The stuff works with a CAPI-specific file format 3171called ``SFF''. 3172 3173Conversion to SFF can be done with recent ghostscripts (cfax driver), 3174and conversion from SFF to G3 can be done with the @code{sff2g3} program 3175which comes with mgetty. (I needed something like this for a customer 3176project, and the existing SFF-to-something converters were all much to 3177heavyweight - requiring tons of additional libraries, C++ converters, 3178and whatnot. My sff2g3 is 330 lines of code, needs no external libraries 3179and only an ANSI C compiler. Beat that :-) ). 3180 3181Chances are good that I will eventually hack @code{capifax} into something 3182that's call-compatible to @code{mgetty} (for fax reception) and 3183@code{sendfax} (for fax sending). But this depends somewhat on customer 3184demand, read: paid-for time. 3185 3186@node Class 1, , i4l-capi, Modems 3187@subsection Class 1 Faxmodems 3188 3189These do not work. They are not going to be supported (class 1 faxing is 3190a mess, and the timing is extremely critical---nearly impossible in a 3191unix environment---read the comments to the FlexFax/Hylafax package for 3192details). 3193 3194Update: some very preliminary support is in the code now. It's known 3195to be incomplete in a large number of places. If you feel adventurous, 3196compile mgetty with @code{-DCLASS1}, and try it -- but I will NOT give 3197beginner-level support here. If it doesn't work, send the log file of 3198a problematic call, unmodified and complete, at debug level 6. 3199 3200@node Systems, General, Modems, Problems 3201@section Operating Systems 3202 3203This section describes problems that have occured while porting the 3204package to various operating systems. 3205 3206@menu 3207* OS-Generic:: Problems and mistakes common to all operating systems 3208* SCO-322:: SCO Unix 3.2.2 (ODT 1.0 / 1.1) 3209* SCO-324:: SCO Unix 3.2v4 (ODT 2.0 / 3.0) 3210* Linux:: Linux 3211* ISC:: ISC 3212* SVR4:: SVR4 Unix 3213* SVR42:: SVR4.2 Unix - Onsite, UnixWare, ... 3214* BSD:: BSD-like flavours of Unix 3215* AIX:: IBM's AIX Operating System 3216* SunOS:: SunOS 4.1.1 and up 3217* Solaris2:: SunSoft Solaris 2.3 and up 3218* 3b1:: AT&T 3b1 3219* HP-UX:: The HP-UX operating system 3220* NEXTSTEP:: The NEXTSTEP operating system 3221* Darwin:: Apple's MacOS X / Darwin operating system 3222@end menu 3223 3224If your system is not in the list, that doesn't mean it won't work. It 3225just means that I didn't get a report (or a port) for that system yet. 3226 3227mgetty+sendfax should work on most unixoid operating systems, as long as 3228they provide @code{SysV termio} or @code{POSIX termios} call for tty 3229management. @code{BSD sgtty} support isn't finished yet. 3230 3231For best results, your system should have @code{select(S)} or 3232@code{poll(S)}, but if both functions are not available or don't work on 3233ttys (@code{poll(S)} is known to do this on SVR3.1 and earlier), you can 3234use a kludge, @code{-DUSE_READ}. 3235 3236Besides that, you'll need some fiddling with the header files to get all 3237defines and prototypes right. 3238 3239Further, you'll have to check @file{tio.c}, function 3240@code{tio_set_flow_control()}, whether the way hardware flow control is 3241activated works on your system. Most likely, it won't --- that's one of the 3242major portability problems. If you change something and get it to work, 3243please send me patches. (You're welcome to do so anyway). 3244 3245@node OS-Generic, SCO-322, Systems, Systems 3246@subsection Generic problems and common mistakes 3247 3248There are a few things that can go wrong on all supported operating 3249systems. This section is meant to give a few hints how to find them. 3250 3251@itemize @bullet 3252@item 3253@code{mgetty} is correctly set up in @file{/etc/inittab}, but @code{ps} 3254doesn't list @code{mgetty} anyway. 3255 3256This is usually caused by not notifying the @code{init} of your changes to 3257@file{/etc/inittab} (or @file{/etc/ttytab} on BSD). You have to signal 3258@code{init} with a HUP signal (@code{kill -1 1}) that it should re-read this 3259file. 3260 3261@item 3262@code{mgetty} is setup correctly, runs a while, then stops being listed by 3263@code{ps}, and @code{init} complains something like @samp{respawning to 3264fast, disabling @dots{}}. 3265 3266This means, there is an error in the mgetty set up. If the @code{mgetty} 3267process quits too fast (because of an error), and too often in a row, 3268@code{init} will assume that something is going crazy, and disable the 3269process. You can re-enable it with @code{kill -1 1}, but you should check 3270the mgetty log file (!!!!!) before, to find out @strong{why} it failed in 3271the first place 3272@end itemize 3273 3274 3275@node SCO-322, SCO-324, OS-Generic, Systems 3276@subsection SCO Unix 3.2.2 (ODT 1.0 / 1.1) 3277 3278No major twiddling needs to be done. If your @code{select()} refuses to 3279sleep less than one second, use poll(S) instead (set @code{-DUSE_POLL} in 3280the CFLAGS section of @file{Makefile}). 3281 3282Use the modem-control devices for mgetty and dial-outs (e.g. 3283@file{/dev/tty2A}), or (far better), use FAS with minor number of 80+port, 3284using full RTS + CTS handshake, and non-blocking opens (@file{/dev/ttyF01}) 3285- the original SCO serial driver is slow, unreliable and doesn't do proper 3286hardware flow control. @xref{SCO-324}. 3287 3288Ignore all the warnings about ``passing arg 2 of signal from 3289incompatible pointer type''. They are caused because the SCO 3.2.2 3290development system header files are somewhat unusual. 3291 3292If it doesn't work, or some weird things happen on login (e.g., zmodem 3293downloads do not work), try compiling with -DSYSV_TERMIO. I had some 3294problems with Posix termios on SCO ODT 1.0. 3295 3296@node SCO-324, Linux, SCO-322, Systems 3297@subsection SCO Unix 3.2.4 (ODT 2.0 and ODT 3.0) 3298 3299I'm using mgetty on SCO 3.2v4(.2) (in fact, developing it there), so be 3300assured: it works. 3301 3302I consider the way that hardware flow control is handled on SCO to be 3303broken, so I @emph{strongly} recommend using the @code{FAS} serial driver 3304(version 2.11 or higher, earlier versions may crash the system), to be 3305found on your nearest comp.sources.unix archive. With @code{fas}, use the 3306devices with a minor number of @samp{80+port number} for best results. Make 3307sure that your modem enables the @samp{DSR} line, because otherwise, 3308@code{FAS} won't do hardware handshake. 3309 3310If you don't use @code{fas}, I've been told that you have to use the 3311@samp{modem control} lines, that is, the ``uppercase'' lines, e.g. 3312@file{/dev/tty1A}, because SCO's serial driver won't do any hardware flow 3313control at all on the ``lowercase'' lines. Be warned, the driver will also 3314disable hardware flow control if you use Xon/Xoff flow control (no way to 3315use both). Since I do not have a SCO system without @code{fas}, I'd like to 3316hear very much about results on one. 3317 3318Also, you've to define @code{LOCKS_LOWERCASE}, since that's the convention 3319on SCO Unix and most other programs expect it. 3320 3321If mgetty works only partially, but hangs the moment @file{/etc/issue} 3322is printed, before the `system!login:' prompt is output, you may have to 3323change the following line of @file{mgetty.c} (around line 780): 3324 3325@example 3326 /* honor carrier now: terminate if modem hangs up prematurely 3327 */ 3328 tio_carrier( &tio, TRUE ); 3329@end example 3330 3331to: 3332 3333@example 3334 tio_carrier( &tio, FALSE ); 3335@end example 3336 3337But before you do this, make sure that your modem enables the CD line 3338while a carrier is present (Hayes modems: @samp{AT&C1}) and also enables 3339the DSR line (otherwise the port will block once @code{CLOCAL} is 3340removed). 3341 3342This could have been a problem specific to Uwe's dumb AST-compatible 3343fourport card, but I do not think so. 3344 3345 3346Compilation issues: 3347 3348Ignore warnings about @samp{struct utimbuf} and @samp{struct timeb}, they 3349are caused by improper include files. On SCO 3.2v4.2, ignore the warnings 3350about the getopt() prototype, or change prototype or include files. 3351 3352 3353Installation: 3354 3355SCO provides two utilities to manipulate @file{/etc/inittab}, 3356@code{enable} and @code{disable}. Those tools work only if you have 3357specified a gettydefs tag on the @code{mgetty} command line, otherwise 3358they will complain about ``not a valid tty''. So, either append the 3359gettydefs tag (@code{mgetty} will ignore it if not compiled with 3360@code{USE_GETTYDEFS}) or change @file{/etc/inittab} manually. 3361 3362@node Linux, ISC, SCO-324, Systems 3363@subsection Linux 3364 3365 3366In current stable kernels (i.e. the latest 2.0.xx release or even 3367one of the 1.2.xx series) and current shared libraries (libc version 33685.x) there should be no bug to interfere with this software. 3369 3370If you have a really old Linux system, notice that Linux kernel 3371versions prior to 0.99pl15 have a bug in the serial handshake code, 3372that is, if the `CRTSCTS' flag is set, software flow control (XON/XOFF) 3373won't work. The alarm() call is broken in 4.1 and 4.4.2 libraries, 3374which sometimes results in aborting the fax receiving. 3375 3376On very recent systems using the GNU Libc, you @strong{must} use 3377mgetty 1.1.10 or higher, as the timeout handling on all previous 3378versions doesn't work under glibc. Unfortunately, this means that 3379the version of mgetty shipped with RedHat 5.0 (1.1.9) won't work. Upgrade! 3380 3381Hardware handshake (RTS+CTS) on Linux works flawlessly (but only if mgetty 3382is compiled with POSIX_TERMIOS, but that is default on Linux 3383anyway). Nevertheless, the @code{scrts.c} program in @file{contrib/} is 3384still provided, it has some other uses, too. 3385 3386Linux has no poll(S), so, don't #define @code{USE_POLL}, and the default, 3387@code{USE_SELECT}, will be used. 3388 3389@strong{Important note:} Use the @file{/dev/ttyS*} devices for getty and 3390for dial-out (that is, for kermit, uucico, cu, seyon, ...) - @strong{never} 3391use @file{/dev/cua*}. Dialing out on @file{/dev/cua*} will result in the 3392error message ``device busy''. (There are reasons why @code{mgetty} cannot 3393use the ``@file{ttyS*} vs. @file{cua*} kernel locking mechanism'', see 3394below). If @strong{all} programs agree on using @file{/dev/cua*} only, 3395it will work, too - but they have to agree on one variant. 3396 3397For some background about @file{ttyS} vs. @file{cua}, you might want 3398to read a mail from the author of the Linux serial drivers, Ted Ts'o, 3399posted to the Linux-PPP mailing list. I have included it in 3400@file{doc/ttyS-cua.txt}. 3401 3402Some guys seemingly can't resist posting misinformation to the net all the 3403time, don't believe 'em. The @file{/dev/cua*} devices are @strong{not} 3404different from the @file{/dev/ttyS*} devices concerning data flow or modem 3405control lines. The only difference is how the device reacts if you do an 3406@code{open()}: Opening @file{/dev/ttyS*} normally blocks until the ``carrier 3407detect'' line goes active (unless @code{open()} is called with the 3408@code{O_NDELAY} flag; @code{mgetty} and all dial-out programs do that), and 3409opening @file{/dev/cua*} will return an error message (@code{errno=EBUSY}) 3410if another process has the device already open, thus @emph{preventing 3411dial-out on @file{/dev/cua*}} if @code{mgetty} is active on 3412@file{/dev/ttyS*}. 3413 3414We use @file{/dev/ttyS*} all the time for dial-in @emph{and} for dial-out, 3415and believe me, it works, and it's the @emph{only} combination that will 3416work properly. The kernel locking mechanism only works if you use modem 3417auto-answer (the getty process sleeps until the modem gets a carrier), and 3418mgetty uses manual answer (it waits for the RING message from the modem), 3419which will save your callers a lot of grief because their calls will 3420only be answered if your computer is ready to receive a call. Part of the 3421motivation for writing mgetty was being tired of losing lots of money 3422for useless calls to a hung machine. 3423 3424I'd recommend against using @file{/dev/modem} as a link to the real 3425device, but if you do that, make it a @strong{hard link} to the 3426appropriate @file{/dev/ttyS*}. A soft link will cause problems with the 3427device ownership because of a peculiarity in the linux @code{chown()} 3428implementation (that I refuse to work around). 3429 3430If you get into trouble with write permissions on ttySx, you may add 3431a new group @samp{dialout} to @file{/etc/group}, then 3432@code{chown .dialout /dev/ttySx} your device, and add your users to 3433the dialout group. Don't forget to add the system user @samp{uucp} to 3434that group (UUCP needs to have modem access), and make sure, 3435@code{port-group} in mgetty's configuration file is set up correctly. 3436The concept of such a dialout group is already used in most Linux 3437distributions today. 3438 3439There are various different @code{init} and @code{last} programs out there, 3440some work with mgetty, some don't. If you get some strange output from 3441@code{who} or @code{last} and are using a different @code{init} program 3442than the @code{sysv init}, try to define @code{-DNO_SYSVINIT}. That should 3443help. 3444 3445I've been told that it's necessary to do that if you use the 3446@code{simple-init}. 3447 3448Anyway, I can only @strong{strongly} recommend to switch over to 3449@code{SysVinit} if you use @code{simple init}, since the latter seems to 3450be severely broken regarding utmp and controlling tty handling. 3451 3452If you have problems because of an uninitialized @code{TERM} environment 3453variable (which really isn't getty's job, but @code{getty_ps} insists on 3454doing it, and people rely on it), use the @code{term @dots{}} config file 3455option to set it according to your needs. 3456 3457If you're experiencing problems with hanging @code{/bin/login} processes, 3458@xref{login-hang}. 3459 3460Recently, I have received a number of bug reports concerning operation in 3461systems using one or more @strong{Cyclades serial boards}. There is some 3462incompatibility between the standard Cyclades driver and the GNU CC 34632.7.2, which can result in system lockups. Upgrade to the very latest 3464Linux driver, which can be found on ftp.cyclades.com. I have received 3465reports that the driver version 2.1 works fine (85 modems on one system, 3466connected to 3 Cyclom Ye boards!). 3467 3468@node ISC, SVR4, Linux, Systems 3469@subsection ISC 3470 3471The ISC port has been done by Russell Brown, russell@@lutton.lls.com. Thanks! 3472 3473First of all, define @code{-DISC} in the Makefile. This will take care 3474of some minor problems. Then, link with @code{-linet -lpt}. 3475 3476If you have a ISC Unix 4.0, you may have to define @code{-D_POSIX_SOURCE} 3477to get around some include file problems and link @code{-lcposix}. 3478 3479If you have problems with the AWK programs in the @file{fax/} shell 3480scripts, try defining @code{AWK=nawk} in the @file{Makefile}. That should 3481take care of those problems. 3482 3483Again, for best results I recommend using the FAS serial driver, and 3484using a port with a minor number of 80+portno (ttyF01 etc.) 3485 3486If you use a Digiboard smart serial cart (e.g. the digiboard pc/8e), use 3487the @file{/dev/ttyi*} devices instead of @file{/dev/cui*}, becaus only the 3488former ones honour carrier drops (If you use @file{cui*}, your processes 3489won't die if the modem unexpectedly hangs up) 3490 3491 3492@node SVR4, SVR42, ISC, Systems 3493@subsection SVR4 Unix 3494 3495mgetty has been ported to SVR4 now (many thanks to Bodo Bauer, 3496<bodo@@hal.nbg.sub.org>, Martin Husemann, <martin@@bi-link.owl.de> and Marc 3497Boucher <marc@@cam.org>). 3498 3499As far as I know, it's sufficient to add @samp{-DSVR4} to the CFLAGS in 3500Makefile. If you have any problems or suggestions, please report them also 3501to the people above, since I do not have a SVR4-System to run tests on. 3502 3503If you use the @code{SAS} serial driver (streams-version of @code{FAS}) and 3504want to force @code{sas} to use hardware-handshake all the time, use a 3505device with a minor device number of @code{80+port number} (see the 3506@code{sas} manual for explantations). If you use a port with a minor device 3507number of @code{7*16+i}, @code{mgetty} is able to switch hardware handshake 3508on and off according to the flags set in policy.h, using 3509@file{sys/termiox.h}. (Well, it works - but apparently fax reception 3510doesn't work with this minor device number. Symptom: only one byte is 3511received during fax reception (0x00). Anybody any clue?). 3512 3513If you use @code{FAS}, use the devices with a minor device number of 3514@code{80+port number} (as usual). 3515 3516@node SVR42, BSD, SVR4, Systems 3517@subsection SVR4.2 - Onsite Unix, UnixWare, ... 3518 3519Basically, SVR4.2 is quite similar to SVR4, but you have to watch out for 3520some details (defining @code{-DSVR42} in the Makefile will do it for you). 3521 3522Most important, the @emph{termiox} interface via the @code{TCGETX} / 3523@code{TCSETX} @code{ioctl()}s does not seem to work any longer - the calls 3524return an error, and the port behaves strangely. If you're experiencing 3525this, please try commenting out the corresponding code in @file{tio.c}, 3526funtion @code{tio_set_flow_control()} and mail me whether that make it 3527work. 3528 3529Further, ussing @code{USE_POLL} or @code{USE_READ}, won't work. The default 3530of @code{USE_SELECT} is OK. 3531 3532To enable hardware handshake, use the tty device with the trailing ``h'', 3533e.g. @file{tty01h}. On the other one (@file{tty01}), the driver won't do 3534H/W handshake. 3535 3536Depending on the configuration, parallel dial-out with Taylor-UUCP may fail 3537(uucico complaining that it cannot set @code{CLOCAL}), in that case, you've 3538to recompile Taylor with different settings for the @code{termio} selection 3539(POSIX vs. SYSV). 3540 3541Many thanks to Joerg Weber (joerg@@interface-business.de) for finding all 3542those problems. 3543 3544@c FAX_SEND_IGNORE_CARRIER --> UnixWare bug! 3545 3546Ed Hall (edhall@@rand.org) found another major glitch on UnixWare 4.2: if 3547you run @code{sendfax} without setting 3548@code{ignore-carrier true} in @file{sendfax.config}, and @code{sendfax} 3549switches off carrier detection at the end of the very last page, the 3550kernel code messes up something and bytes get lost. The modem then returns 3551funny error codes, like, for example, 3552@example 3553Transmission error: +FHNG:44 (Unrecognized Transparent data command) 3554@end example 3555If you're experiencing this, just set @code{ignore-carrier true} 3556and everything should work just fine (please tell me in any case whether 3557it was necessary, because if it happens for other people as well, I'll 3558make this permanent on SVR42). 3559 3560@xref{Solaris2}. 3561 3562@node BSD, AIX, SVR42, Systems 3563@subsection BSD-like flavours of Unix 3564 3565A port to 386BSD, NetBSD, FreeBSD has been done by Martin Husemann, 3566martin@@bi-link.owl.de, and Gunther Shadow, gusw@@fub46.zedat.fu-berlin.de. 3567 3568I think it works quite well, except that the @code{VTIME} mechanism to 3569timeout @code{read()} calls doesn't work in older *BSD versions. If 3570@code{mgetty} hangs, with the last line in the log file being something 3571like ``waiting for line to clear'', upgrade your kernel, or, if you can't 3572do that, compile @code{mgetty} with @code{-DBROKEN_VTIME} (in that case, 3573select() will be used). 3574 3575For older versions of BSD Unix that do not have @file{termios.h}, you'll 3576have to complete the unfinished support for @file{sgtty.h} in @file{tio.c} 3577and @file{tio.h}. 3578 3579Generally, BSD Unices do not have a @file{/etc/inittab} as system V has. 3580Instead, they have @file{/etc/ttys} (or sometimes @file{/etc/ttytab} on 3581really old BSD systems). Thus, you have to enter a line like 3582@example 3583cua0 "@SBINDIR@/mgetty -x 3 cua0" vt100 3584@end example 3585or 3586@example 3587cua00 "@SBINDIR@/mgetty -x 3" vt100 on insecure 3588@end example 3589there. See the corresponding manpage for an exect description of the files 3590format on your system. Don't forget to remove (or comment out) the 3591original getty on the corresponding @file{/dev/tty*} line. 3592 3593@node AIX, SunOS, BSD, Systems 3594@subsection IBM's AIX Operating System 3595 3596Chris Lewis, Harald Milz and Michael Staats have done excellent work on 3597porting @code{mgetty} to AIX. Since then, I have taken over and actively 3598use mgetty+sendfax on AIX for customer systems, and everything is very 3599well tested now. 3600 3601On AIX, many people do not want to manipulate @file{/etc/inittab} directly, 3602instead, use some system administration tools (like 'smit'). To ease 3603@code{mgetty} installation on AIX, Michael Staats has provided a small 3604shell script, @code{inittab.aix}, that will help you setup your 3605@file{inittab} after you've run @code{make install}. Just call it with the 3606name of the tty you're modem is connected to, e.g. 3607 3608@code{./inittab.aix tty0}. 3609 3610I have received a couple of problem reports on AIX 4.1 where ``suddenly'' 3611the modem line stopped working and all mgetty reported were error 3612messages. If that happens to you, set @code{toggle-dtr no} in 3613@file{mgetty.config}. AIX 4.1 doesn't seem to like programs that fiddle 3614with the modem control lines. 3615 3616Christoph Brinck (cb@@medat.de) has also reported that it's 3617necessary to enable the ``dtropen line discipline'' for the serial line 3618you're using (whatever that may mean). This is done with the command: 3619 3620@example 3621chdev -l 'tty1' -a flow_disp='rts' 3622chdev -l 'tty1' -a open_disp='dtropen' 3623@end example 3624 3625or via the @samp{chgtty} part of @code{SMIT} (but I think that's the 3626default setting for new ttys anyway). 3627 3628Hardware and Software flow control work fine on AIX 3.x and AIX 4.x now. 3629 3630@node SunOS, Solaris2, AIX, Systems 3631@subsection SunOS 4.1.1 and up 3632 3633mgetty has been ported to SunOS, and seems to work quite well. If you use 3634SunOS, please send me a brief report about your results. 3635 3636Thanks to Earl Hartwig, earl@@fozzi.ocunix.on.ca, for the initial port. 3637 3638For compilation, please define @code{-Dsunos4}. 3639 3640In @file{policy.h}, you've to adapt the location of the LOCK files. 3641 3642In the Makefile, set @code{ECHO='...'} to 3643@code{/usr/5bin/echo}, because the standard one doesn't 3644support escape codes like @samp{\n} or @samp{\c}. Alternatively, if you 3645don't have the System5 options installed, use @code{mg.echo}. 3646 3647If a fax reception hangs shortly after the @samp{+FCON} is seen, please try 3648setting @code{FAXREC_FLOW} to Xon/Xoff (@code{FLOW_SOFT}). Hardware 3649handshake has problems on SunOS versions without the ``Jumbo TTY'' patch. 3650 3651If fax sending hangs mysteriously between the first and the second page, 3652you're likely to have a modem that drops DCD during pages. As SunOS' 3653serial drivers are dumb, reception of data will fail if DCD is low and 3654handshake is set to RTS/CTS. So, set @code{ignore-carrier yes} in 3655@file{sendfax.config} @strong{and} @code{#define FAXSEND_FLOW FLOW_SOFT} 3656in @file{policy.h} and fax sending should work. 3657 3658Please use the ``outgoing'' devices (@file{/dev/cua*}) for mgetty and 3659dial-outs, using the ``incoming'' devices (@file{/dev/tty*}) will make 3660dialout impossible. Further, carrier detect (DCD) is only honoured 3661on the @file{cua*} lines. 3662 3663It is @strong{very} strongly recommended that you install the 3664``jumbo tty patch'' (patch number 100513-05 for 4.1.2 or .3, patch 3665number 101621-01 for 4.1.3_u1 and up) because it will fix a lot 3666misbehaviour of the serial line drivers. 3667 3668Please read also the generic BSD section. 3669 3670@node Solaris2, 3b1, SunOS, Systems 3671@subsection Solaris 2.3 and up 3672 3673mgetty runs successfully and without trouble under Solaris 2.3, 2.4 and 36742.5.1 (later versions should also work, but I didn't get any report so far). 3675For compilation use @code{-Dsolaris2}. With Solaris 2.3 it's recommended to use 3676GNU gcc, but with Solaris 2.4 it compiles fine with the SPARCompiler C 3.0.1. 3677Define @code{CC=cc}. 3678 3679In @file{policy.h} you have to define @samp{term/a} or @samp{term/b} as 3680@code{FAX_MODEM_TTYS}. Don't use the outgoing devices @samp{/dev/cua/*}!! 3681 3682As @code{DEVICE_GROUP} you should configure @samp{uucp}. If you want allow 3683to normal users to dial out, add all users allowed to do that, to the group 3684@samp{uucp}. Then it's important to change the permissions of 3685@file{/var/spool/locks} from the default permissions @samp{drwxr-xr-x} to 3686@samp{drwxrwsr-x}. Make sure that it's owned by @samp{uucp.uucp}. 3687Otherwise no one wanting to dial out is able to create a lock file. The 3688@code{FILE_MODE} in @file{policy.h} must be @samp{0660} as well. 3689 3690If you don't want allow anyone to dial out you should set @code{FILE_MODE} 3691to @samp{0640} or @samp{0600}. 3692 3693For the "notify mail" message to look best, define @code{MAILER} in 3694@file{policy.h} to @var{/usr/lib/sendmail} and define 3695@code{NEED_MAIL_HEADERS}. So a proper subject header is created. 3696Nevertheless, @code{/usr/bin/mailx} works, as it is the default for SVR4. 3697 3698If everything compiled well and you did @code{make install}, you have to 3699add an entry to @file{/etc/inittab} like the following: 3700 3701@example 3702ya:234:respawn:/usr/local/sbin/mgetty -s 38400 -x 3 term/a 3703@end example 3704 3705@emph{Don't use the Solaris @code{admintool} to create any port monitoring 3706entries in @file{/etc/saf/_sactab} and @file{/etc/saf/zsmon/_pmtab}.} 3707 3708Many thanks to Stefan Muehlenweg (muehlenw@@samhh.hanse.DE) for this section. 3709 3710Solaris (as all Sun operating systems) seems to be somewhat weird 3711concerning its handling of the RTS line. I have received two reports that 3712'sometimes' a modem hangs during initialization, and won't talk to mgetty 3713anymore. In these cases, the problem went away when the modem (an USR 3714Sportster) was set to @code{AT&R1}, which means 'ignore RTS line'. Thanks 3715to Valerio Di Giampietro for detailing this. 3716 3717@node 3b1, HP-UX, Solaris2, Systems 3718@subsection AT&T 3b1 3719 3720Glenn Thobe and Chris Lewis have ported mgetty+sendfax to AT&T's 3B1 3721machines, it should compile without changes to the source (but define 3722-D_3B1_ in the Makefile). 3723 3724These ports are to two different environments: 3725 3726Glenn's port was with GCC (ANSI C) and an add-on select() library routines. 3727Chris's port was with stock 3b1 C, without select(). 3728Both seem reliable. 3729 3730Some further hints concerning a select() library and the pbmplus tools can 3731be found in the file @file{contrib/3b1} which are the notes from Glenn's 3732port. 3733 3734Chris's port relies simply on the suggested definitions (especially 3735@code{-DUSE_READ}) in the Makefile. Chris suggests that you use select() 3736if you already have it for some other reason, but that it seems to work 3737just fine without it. 3738 3739Right now, I think mgetty won't compile with the standard C compiler (it 3740will with gcc), because the stuff I do in the @file{conf_*.c} source files 3741is a little bit too hard for it. I'll work on it. 3742 3743@node HP-UX, NEXTSTEP, 3b1, Systems 3744@subsection The HP-UX operating system 3745 3746@code{mgetty} runs on HP-UX, but that's very much all I can say about it (I 3747don't know anything about HPs, except that they are somewhat strange). 3748 3749Currently, documentation for HP-UX is a bit lacking - if you know 3750something about @code{mgetty} on HP-UX, please contribute. 3751 3752@node NEXTSTEP, Darwin, HP-UX, Systems 3753@subsection The NEXTSTEP operating system 3754 3755NEXTSTEP is lacking quite a few commands used by mgetty and its 3756tools: Luckily, they are available from the GNU project 3757(please mail me if I forgot any), 3758e.g. gawk, cut (from textutils), id and logname (from sh-utils). All of 3759them can be compiled for NEXTSTEP without problems, and it's certainly 3760a good idea to install them anyway. ghostscript needs some fiddling for 3761NEXTSTEP, but it's available precompiled on the arcives as GSPrintFilter. 3762If you don't intend to use faxspool and friends, you may succeed without 3763installing the forementioned utilities. 3764 3765Having said this, there are two different ways to compile @code{mgetty} 3766for NEXTSTEP, each with their pros and contras: 3767 3768@itemize @bullet 3769@item 3770With termios interface: To use @code{mgetty}'s termios interface (the 3771default), you have to link against NEXTSTEP's buggy POSIX library. 3772 3773In the Makefile, add "-posix -DBSD" to CFLAGS and LDFLAGS. 3774 3775Drawbacks: The log file will be corrupted due to an append bug in libposix. 3776 3777Use this only if you want to try vgetty. In all other cases it's probably 3778better to choose the second variant: 3779 3780@item 3781With sgtty interface: Ben Stuyts @samp{benst@@stuyts.nl} has done an 3782effort to make a @code{mgetty} port using the BSD sgtty style interface 3783to the serial ports. This port doesn't need the POSIX library. 3784 3785In the Makefile, add "-DNEXTSGTTY -DBSD". 3786 3787This port has been tested with m68k and i386 machines. 3788 3789For i386 machines, you may want to use the /bin/login replacement 3790@samp{modem-login} in @code{mgetty}'s contrib directory. NEXTSTEP's login 3791has problems with 8-bit logins. I've got one report from Ben Stuyts, 3792though, that @samp{modem-login} does fix problems on ``Black NeXT''s as 3793well. Just try it. 3794 3795Drawback: You can't compile vgetty with sgtty support yet! If you want to use 3796vgetty with NEXTSTEP, you'll have to stick with the termios port. There are 3797problems with the LNOHANG bit not being acknowledged 3798correctly, therefore hanging the modem when the caller hangs up. 3799@end itemize 3800 3801For i386 machines, it's wise to use the /dev/cudfX (hardware flow 3802control,...) devices. I'm using them with NeXT's most recent serial port 3803driver, Mark Salyzyn's Mux driver also supports them. 3804 3805For m68k machines, you have to stick with /dev/cufa. 3806 3807This are the settings I use in the Makefile: 3808 3809@example 3810CC=cc 3811CFLAGS=-DNEXTSGTTY -DBSD -O2 (-posix -DBSD for termios port) 3812INSTALL=install -c -o root -g wheel 3813spool=/usr/spool 3814SBINDIR=$(prefix)/etc 3815ECHO="mg.echo" 3816INSTALL_MECHO=mg.echo 3817AWK=gawk 3818@end example 3819 3820Furthermore, you should define binary lock files, in policy.h: 3821 3822@example 3823#define LOCKS_BINARY 1 3824@end example 3825 3826Finally, when using NEXTSTEP's cc, you need to run "make noident" in 3827the first place to remove the #ident directives from the source files. 3828 3829If you have questions, comments or suggestions regarding @code{mgetty} with 3830NEXTSTEP, feel free to contact Gregor Hoffleit 3831@samp{flight@@mathi.uni-heidelberg.de} or Ben Stuyts 3832@samp{benst@@stuyts.nl}. 3833 3834@itemize @bullet 3835@item 3836Coming real soon now: 3837 3838How to use @code{mgetty} to send faxes via the NEXTSTEP fax panel 3839 3840(using Kevin Peckover's ps2g3 package, available as 3841@samp{ftp://peanuts.leo.org/pub/next/Tools/postscript/ps2g3.s.tar.gz}). 3842 3843@item 3844Coming soon: 3845 3846How to patch and use @code{mgetty} to spool received faxes in the NEXTSTEP 3847fax system. 3848@end itemize 3849 3850@node Darwin, , NEXTSTEP, Systems 3851If I understand this correctly, "Darwin" is the underlying operating 3852system that Apple MacOS X is based upon. 3853 3854Edwin C Wirth <ecwirth@@mac.com> gave me an account to his "Darwin Kernel 3855Version 5.1" machine (running MacOS 10.1.1 on top of it) so I could port 3856@code{mgetty+sendfax} to that OS. Thanks to that, Darwin is supported 3857from 1.1.28 on. 3858 3859Compilation is pretty straightforward: use the default CFLAGS and LIBS 3860settings in the Makefile, set @code{CC=cc}, and then run @code{make}. It 3861will spit out a ton of warnings about @samp{undefined or invalid # 3862directive} - but those are harmless, it's just cpp not understanding 3863@code{#ident}. 3864 3865At run time, as far as I could see, the internal Mac modem is available on 3866@file{/dev/tty.modem}. The macintosh I had for testing also had "KeyUSA" 3867USB-to-Serial ports that appeared as @file{/dev/tty.KeyUSA28X913.1} and 3868@file{.2} - so other serial ports should also appear as @file{/dev/tty.*} 3869devices. Note: there seem to be ''cu'' devices as well 3870(@file{/dev/cu.modem}), as in older Linux variants. I did only try 3871sending faxes via @file{tty.modem} yet, but to resolve locking issues, 3872it might be neccesary to use @file{cu.*} devices. To be continued... 3873 3874Mgetty should be run from @file{/etc/ttys} as in other BSDs, see 3875@code{man ttys} (there is no @file{/etc/inittab}). 3876 3877Open issues: 3878@itemize @bullet 3879@c @item how to access external serial ports? 3880@item is it better to use @file{/dev/cu.*} or @file{/dev/tty.*}? 3881@item how is tty locking done? Couldn't find UUCP lock files 3882@item any tricky things about logging in remotely? utmp/wtmp? 3883@item where should the log files go to? /var/log doesn't seem to exist. 3884@end itemize 3885 3886@node General, logfiles, Systems, Problems 3887@section General problems 3888 3889@menu 3890* pbmtog3:: pbmtog3 3891* Locks:: Lock files 3892* login-hang:: 3893* ecu:: ecu (extended cu) 3.20 collides with mgetty 3894@end menu 3895 3896@node pbmtog3, Locks, General, General 3897@subsection pbmtog3 3898The @code{pbmtog3} program from the @file{pbmplus} distribution produces G3 3899data that does not adhere to the T.4 standard. The initial EOL code is 3900missing, and the lines are not always 1728 pixels wide. So, some fax 3901machines won't accept the output at all (not printing even one line), and 3902others will complain. 3903 3904A fix for this problem is available: I have included a patch for pbmtog3, 3905called @file{patches/pbmtog3.p1}, that will fix the problems. (Oh, by the 3906way, if you try to send a fax generated with an unpatched pbmtog3, sendfax 3907will complain that it doesn't like the file @dots{} I've added a small 3908sanity check to spare me the time browsing through the logfiles guessing 3909@emph{why} sendfax failed (won't work if the file has been processed by 3910@code{g3cat}, though!)). If you use the @code{pbm2g3} program that is 3911shipped with @code{mgetty}, there is @strong{no need to patch anything}. 3912 3913Basically, there is no need at all to use @file{pbmplus}' @code{pbmtog3} 3914program any more, since @code{mgetty} includes an own copy. I just wanted 3915to warn you. 3916 3917Anyway, my program is lots faster @dots{}. 3918 3919@node Locks, login-hang, pbmtog3, General 3920@subsection Lock files 3921Kermit et.al. cannot dial out while mgetty is running (modem responses 3922are eaten by mgetty)---what's wrong? 3923 3924Most propably, you have not configured the @code{LOCK} and 3925@code{LOCKS_BINARY} defines in @file{policy.h} properly. Make sure that 3926the lockfiles kermit (or cu, pcomm, seyon,@dots{}) expect are in the 3927path specified in @code{LOCK} and set @code{LOCKS_BINARY} to 1 if they do 3928not write the PID of the locking process in ascii (10 bytes) to the lock 3929file but as a 4-byte integer instead. Mgetty and Sendfax will understand 3930both types of lock files, but if @code{LOCKS_BINARY} is not set properly, 3931other programs may not understand the lock file. 3932 3933Also, make sure that both processes use the same name for the device. 3934(i.e., mgetty locking @file{/dev/ttyS0} and kermit locking 3935@file{/dev/modem} will definitely fail.) 3936 3937@node login-hang, ecu, Locks, General 3938@subsection mgetty works, /bin/login hangs 3939 3940A problem seen fairly often on directly connected serial lines 3941(@code{mgetty -r}), and seldomly on modem lines, is that @code{mgetty} 3942works flawlessly, but @code{/bin/login} just hangs instead of prompting for 3943the user password. 3944 3945The reason for this is that many @code{login} programs reopen 3946@file{/dev/tty} (the controlling tty of a process) to make sure they have 3947full control over the password entered by the user (for example, to prevent 3948snooping). This will block on some systems if the DCD (carrier detect) line 3949coming from the modem or the other machine is low. Notably those systems 3950are those that have callin/callout device pairs for one serial device, e.g. 3951Linux, SunOS, SCO/FAS, etc. 3952 3953The fix is easy: make sure that the DCD line is high. 3954 3955If you use a modem, the command to do this is usually @code{AT&C1} (but 3956check with your modem manual). 3957 3958If you're using a direct null-modem connection to another host, the 3959recommended solution is to wire DCD on your side to the DTR line on the 3960other side and vice versa. That way, when the remote machine ``hangs up'' 3961(calling program exits and DTR drops), your host will get notified as 3962well. This is what a properly wired (!) ``null-modem cable'' does anyway. 3963 3964If you don't have free lines in your serial cable (classic three-wire 3965approach), wire DCD to the DTR line on your own host, and make sure that 3966mgetty won't toggle DTR upon startup (causing a hangup signal!), e.g. by 3967setting @code{toggle-dtr no} in @file{mgetty.config}. 3968 3969@node ecu, , login-hang, General 3970@subsection ECU 3.20 or earlier on SCO collides with mgetty 3971 3972ECU releases 3.20 and earlier had a severe bug in the utmp handling that 3973prevented dialing out on a port that mgetty uses. It has been fixed in ECU 39743.27. If you run into that problem, please get a newer release. 3975Alternatively, you can use the patch that Uwe Fuerst provided, it can be 3976found in @file{patches/ecu320.p1}. 3977 3978@node logfiles, ftp, General, Problems 3979@section Sample Log files 3980 3981Both mgetty and sendfax can provide logfiles that can be very helpful for 3982debugging and accounting purposes. The amount that is logged is controlled 3983with the default set in @file{policy.h} and the command line argument 3984@code{-x <level>}. Higher numbers give more details. 3985 3986At this place, I want to show you some typical cases, so you can compare 3987your log files to those given here and check what is different. 3988 3989(Note: naturally all the modem initializations, and also some of the modem 3990responses, vary between modem brands!) 3991 3992All the mgetty log files have been done with log level @code{L_MESG}, that is, 3993@code{-x 4}. The sendfax log file was done with @code{L_NOISE}, @code{-x 5}. 3994 3995@menu 3996* log-mgetty-data:: mgetty log file, incoming data call 3997* log-mgetty-fax:: mgetty log file, incoming fax call (one page) 3998* log-mgetty-syslog:: mgetty logging to syslog 3999* log-sendfax:: sendfax log file, sending one page 4000@end menu 4001 4002@node log-mgetty-data, log-mgetty-fax, logfiles, logfiles 4003@subsection mgetty, incoming data call 4004 4005This is a log file of a typical data connection, ZyXEL-to-ZyXEL modems, 4006connect with 19200 bps on a port speed of 38400, login as "Uartinet", the 4007login program called is @code{/usr/lib/uucp/uucico} (controlled by 4008@file{LOGIN_CFG_FILE}, which directs all login names starting with "U" to 4009uucico) 4010 4011@example 401203/03 22:40:15 check for lockfiles 401303/03 22:40:15 locking the line 401403/03 22:40:16 lowering DTR to reset Modem 401503/03 22:40:16 send: \d\d\d+++\d\d\d[0d]\dATQ0V1H0[0d] 401603/03 22:40:20 waiting for ``OK'' ** found ** 401703/03 22:40:20 send: ATS0=0Q0&D3&H3&N0&K4[0d] 401803/03 22:40:20 waiting for ``OK'' ** found ** 401903/03 22:40:20 send: AT+FCLASS=0[0d] 402003/03 22:40:20 waiting for ``OK'' ** found ** 402103/03 22:40:20 send: AT+FAA=1;+FBOR=0;+FCR=1[0d] 402203/03 22:40:20 waiting for ``OK'' ** found ** 402303/03 22:40:20 send: AT+FLID="49 89 3243328"[0d] 402403/03 22:40:20 waiting for ``OK'' ** found ** 402503/03 22:40:20 send: AT+FDCC=1,5,0,2,0,0,0[0d] 402603/03 22:40:20 waiting for ``OK'' ** found ** 402703/03 22:40:20 fax_command: send 'AT+FLPL=1' 402803/03 22:40:20 fax_wait_for(OK)** found ** 402903/03 22:40:21 waiting... 403003/03 22:41:28 waiting for ``RING'' ** found ** 403103/03 22:41:28 send: ATA[0d] 403203/03 22:41:28 waiting for ``CONNECT'' ** found ** 403303/03 22:41:42 send: 403403/03 22:41:42 waiting for `` 4035'' ** found ** 403603/03 22:41:43 ##### data dev=tty4c, pid=6470, caller=none, conn='38400/ZyX 16800/V42b', name='', cmd='/usr/lib/uucp/uucico', user='Uartinet' 4037@end example 4038 4039@node log-mgetty-fax, log-mgetty-syslog, log-mgetty-data, logfiles 4040@subsection mgetty, incoming fax call 4041 4042This is a log file of a fax call I got today. It was a fax call with 14400 4043bps (actually, the call came from another faxmodem, but you won't see that 4044in the log file), using high resolution. One page was received, the 4045connection time was 33 seconds. No errors occured. 4046 4047(All the stuff up to "waiting@dots{}" is identical to the example above, so 4048I don't list it again) 4049 4050@example 4051[...] 405203/03 21:39:32 waiting... 405303/03 21:46:22 waiting for ``RING'' ** found ** 405403/03 21:46:22 send: ATA[0d] 405503/03 21:46:22 waiting for ``CONNECT'' 405603/03 21:46:32 found action string: ``+FCON'' 405703/03 21:46:32 action is A_FAX, start fax receiver... 405803/03 21:46:32 fax_wait_for(OK) 405903/03 21:46:36 fax_id: '+FTSI:+31 20 6147110 ' 406003/03 21:46:36 transmission par.: '+FDCS:1,5,0,2,0,0,0,0'** found ** 406103/03 21:46:36 fax_command: send 'AT+FDR' 406203/03 21:46:36 fax_wait_for(CONNECT) 406303/03 21:46:37 fax_id: '+FTSI:+31 20 6147110 ' 406403/03 21:46:37 transmission par.: '+FDCS:1,5,0,2,0,0,0,0'** found ** 406503/03 21:46:38 fax_get_page_data: receiving /usr/spool/fax/incoming/ffd764c9e4d-+31-20-6147110.01... 406603/03 21:46:51 fax_get_page_data: page end, bytes received: 24933 406703/03 21:46:51 fax_wait_for(OK) 406803/03 21:46:51 page status: +FPTS:1** found ** 406903/03 21:46:53 fax_wait_for(CONNECT) 407003/03 21:46:55 connection hangup: '+FHNG:000'** found ** 407103/03 21:46:56 ##### fax dev=tty4d, pid=4807, caller=none, name='', id='+31 20 6147110 ', +FHNG=000, pages=1, time=00:00:33 4072@end example 4073 4074@node log-mgetty-syslog, log-sendfax, log-mgetty-fax, logfiles 4075@subsection mgetty, logging into syslog 4076 4077If your system has a @code{syslogd} and the @code{syslog()} C function, 4078mgetty can send parts of its log files to the @file{syslog} (For details, 4079see comments in @file{policy.h}). Not all the information from the log file 4080is logged here (to avoid clobbering the syslog), just errors and so-called 4081"audit" messages (seen in the log file as lines with "####" at the 4082beginning). These have a fixed format, and could easily be parsed by a 4083program. Let me list a few, and then comment them. 4084 4085@example 4086Mar 3 18:36:16 greenie mgetty[673]: failed A_FAIL dev=tty4d, pid=673, caller=none, conn='', name='' 4087Mar 3 18:41:56 greenie mgetty[1866]: fax dev=tty4d, pid=1866, caller=none, name='', id='49 89 3243328 ', +FHNG=100, pages=1, time=00:00:29 4088Mar 3 21:46:56 greenie mgetty[4807]: fax dev=tty4d, pid=4807, caller=none, name='', id='+31 20 6147110 ', +FHNG=000, pages=1, time=00:00:33 4089Mar 3 20:45:59 greenie mgetty[4038]: data dev=tty4d, pid=4038, caller=none, conn='38400/V.32 9600/MNP5', name='', cmd='/bin/login', user='mbox' 4090Mar 3 22:41:43 greenie mgetty[6470]: data dev=tty4c, pid=6470, caller=none, conn='38400/ZyX 16800/V42b', name='', cmd='/usr/lib/uucp/uucico', user='Uartinet' 4091@end example 4092 4093Those five lines are one failed call, two fax calls, one of them failed and 4094one successful, and two data calls, one of a human caller, loggin into the 4095BBS system, and one of a calling uucico. 4096 4097It looks very confusing until you understand the system behind it. The 4098first fields specify date and time, originating host (greenie is my 4099machine) and program (mgetty). The next field specifies the type of the 4100connection made: @samp{fax}, @samp{data} or @samp{failed} - the latter one 4101usually means failure to initialize the modem or failure to connect to a 4102calling modem, resulting in the well-known @samp{NO CARRIER} message... 4103 4104The @samp{dev} and @samp{pid} fields specify the line and process ID of the 4105mgetty process writing that line. 4106 4107The @samp{caller} and @samp{name} fields give caller ID information - if 4108none is available (as it is here in Germany), or if your modem doesn't 4109handle it, it will list @samp{none} and @samp{''}, respectively. 4110 4111For fax calls, additional informations given are the remote station ID 4112(@samp{id='@dots{}'}), the hangup code (@samp{+FHNG=@dots{}}, 0 means "ok"), 4113the number of pages and the connection time. 4114 4115For data calls, the string that the modem returned after @samp{CONNECT} is 4116listed as @samp{conn='@dots{}'}. The string that was entered at the login 4117prompt is listed as @samp{user='@dots{}'}, and the program that is called 4118to do the login is given as @samp{cmd='@dots{}'}. Usually this will be 4119@code{@LOGIN@} unless you have some special system setup for fido or 4120uucp callers - as I have here, as you can see above. 4121 4122@node log-sendfax, , log-mgetty-syslog, logfiles 4123@subsection sendfax, sending a single page 4124 4125This is a simple one-page fax that I sent some days ago. Just a single 4126page, f1.g3, to the phone number 2710834. No errors of any kind occured. 4127 4128@example 412902/18 11:10:05 sending fax to 2710834 413002/18 11:10:06 checking f1.g3 413102/18 11:10:06 makelock(tty4c) called 413202/18 11:10:06 do_makelock: lock='/usr/spool/uucp/LCK..tty4c' 413302/18 11:10:06 lock made 413402/18 11:10:06 fax_open_device succeeded, tty4c -> 4 413502/18 11:10:06 fax_command: send 'AT' 413602/18 11:10:06 fax_wait_for(OK) 413702/18 11:10:06 fax_wait_for: string 'AT' 413802/18 11:10:06 fax_wait_for: string 'OK'** found ** 413902/18 11:10:06 fax_command: send 'AT+FCLASS=2' 414002/18 11:10:06 fax_wait_for(OK) 414102/18 11:10:06 fax_wait_for: string 'AT+FCLASS=2' 414202/18 11:10:06 fax_wait_for: string 'OK'** found ** 414302/18 11:10:06 fax_command: send 'AT+FLID="49 89 3243328"' 414402/18 11:10:06 fax_wait_for(OK) 414502/18 11:10:06 fax_wait_for: string 'AT+FLID="49 89 3243328"' 414602/18 11:10:06 fax_wait_for: string 'OK'** found ** 414702/18 11:10:06 fax_command: send 'ATL7M1' 414802/18 11:10:06 fax_wait_for(OK) 414902/18 11:10:06 fax_wait_for: string 'ATL7M1' 415002/18 11:10:06 fax_wait_for: string 'OK'** found ** 415102/18 11:10:06 fax_command: send 'AT+FDCC=1,5,0,2,0,0,0,0' 415202/18 11:10:06 fax_wait_for(OK) 415302/18 11:10:06 fax_wait_for: string 'AT+FDCC=1,5,0,2,0,0,0,0' 415402/18 11:10:06 fax_wait_for: string 'OK'** found ** 415502/18 11:10:06 fax_command: send 'AT+FBOR=0' 415602/18 11:10:06 fax_wait_for(OK) 415702/18 11:10:06 fax_wait_for: string 'AT+FBOR=0' 415802/18 11:10:06 fax_wait_for: string 'OK'** found ** 415902/18 11:10:06 fax_command: send 'AT&H3D2710834' 416002/18 11:10:06 fax_wait_for(OK) 416102/18 11:10:07 fax_wait_for: string 'AT&H3D2710834' 416202/18 11:10:39 fax_wait_for: string '+FCON' 416302/18 11:10:39 fax_wait_for: string '+FNSF:00 00 00 00 ' 416402/18 11:10:39 fax_wait_for: string '+FCSI: 49 89 2710834 ' 416502/18 11:10:39 fax_id: '+FCSI: 49 89 2710834 ' 416602/18 11:10:39 fax_wait_for: string '+FDIS:1,3,0,2,0,0,0,4' 416702/18 11:10:39 fax_wait_for: string 'OK'** found ** 416802/18 11:10:39 fax_send_page("f1.g3") started... 416902/18 11:10:39 fax_command: send 'AT+FDT' 417002/18 11:10:39 fax_wait_for(CONNECT) 417102/18 11:10:39 fax_wait_for: string 'AT+FDT' 417202/18 11:10:45 fax_wait_for: string '+FDCS:1,3,0,2,0,0,0,4' 417302/18 11:10:45 transmission par.: '+FDCS:1,3,0,2,0,0,0,4' 417402/18 11:10:45 fax_wait_for: string 'CONNECT'** found ** 417502/18 11:10:45 waiting for XON, got:[0a][11] 417602/18 11:10:45 sending f1.g3... 417702/18 11:11:03 sending DLE ETX... 417802/18 11:11:03 fax_wait_for(OK) 417902/18 11:11:16 fax_wait_for: string 'OK'** found ** 418002/18 11:11:16 fax_command: send 'AT+FET=2' 418102/18 11:11:16 fax_wait_for(OK) 418202/18 11:11:16 fax_wait_for: string 'AT+FET=2' 418302/18 11:11:25 fax_wait_for: string '+FPTS:1' 418402/18 11:11:25 page status: +FPTS:1 418502/18 11:11:26 fax_wait_for: string '+FHNG:00' 418602/18 11:11:26 connection hangup: '+FHNG:00' 418702/18 11:11:26 (Normal and proper end of connection) 418802/18 11:11:26 fax_wait_for: string 'OK'** found ** 418902/18 11:11:26 fax_send: 'AT+FCLASS=0^M' 419002/18 11:11:26 removing lock file 4191@end example 4192 4193@node ftp, get-uucp, logfiles, Problems 4194@section How to get the mentioned software by FTP? 4195 4196Most of the software mentioned in this document should be available on most 4197major ftp sites. Nevertheless, I've got so many questions about the 4198software that I'll list some ftp sites here. 4199 4200Furthermore, I'll list some other software that may be interesting if you 4201plan to use @code{mgetty+sendfax} in different environments than I do. 4202 4203@itemize @bullet 4204@item 4205@code{mgetty+sendfax} 4206 4207The starting point to find mgetty releases is: 4208 4209FTP: ftp://mgetty.greenie.net/pub/mgetty/ 4210 4211HTTP: http://mgetty.greenie.net/ 4212 4213There are some mirrors, but all the official mirror sites are not working 4214anymore, so in doubt, you'll need to use google to find mgetty download 4215sites. 4216 4217@item 4218@code{pbmplus} 4219 4220I found the pbmplus package (bitmap manipulation tools) at the following 4221places (most other sites mirroring X11 should also have them): 4222 4223src.doc.ic.ak.uk:@file{/computing/graphics/pbmplus10dec91.tar.Z} 4224 4225wuarchive.wustl.edu:@file{/packages/X11R5/contrib-pub/pbmplus10dec91.tar.Z} 4226 4227ftp.germany.eu.net:@file{/X11/contrib/pbmplus10dec91.tar.Z} 4228 4229ftp.leo.org:@file{/pub/comp/os/unix/networking/mgetty/} 4230 4231The @code{pbmplus} package has been superceded by the @code{NetPBM} 4232package which has some more conversion tools (but also some more bugs). It 4233should be available on the same sites. You could also check: 4234 4235wuarchive.wstl.edu:@file{/graphics/graphics/packages/NetPBM} 4236 4237ftp.rahul.net:@file{/pub/davidsen/source} 4238 4239ftp.informatik.uni-oldenburg.de:@file{/???} 4240 4241The @code{pbmtodot} program mentioned in the ``fax'' chapter can be found, 4242if nowhere else, in the @file{mgetty} directory on ftp.leo.org (see above). 4243 4244@item 4245@code{FAS} 4246 4247Some sites carrying the @code{fas} serial driver for SCO Unix, ISC, @dots{}: 4248 4249ftp.fu-berlin.de:@file{/pub/unix/driver/fas/fas-2.11.tar.gz} 4250 4251ftp.germany.eu.net:@file{/pub/newsarchive/comp.sources.unix/volume27/fas-2.11.0/*} 4252 4253src.doc.ic.ac.uk:@file{/usenet/comp.sources.unix/volume27/fas-2.11.0/*} 4254 4255As far as I know, the current version is 2.12, but you should find 2.12 at 4256the same places as 2.11. I never upgraded, 2.11 works very fine for me :) 4257 4258@item 4259@code{GhostScript} 4260 4261The GNU GhostScript postscript interpreter can be found at all sites 4262carrying GNU Software. The ``main'' GNU site is @emph{prep.ai.mit.edu}. 4263 4264The new version 3.x isn't GNU software anymore, but uses a special 4265license. You can find it in @file{/pub/ghost/aladdin} on 4266@emph{ftp.cs.wisc.edu}, and on various other mirror sites (e.g. ftp.leo.org). 4267 4268@item 4269@code{hp2pbm} 4270 4271GhostScript is huge and slow... if you don't need it for other purposes, 4272you could use Chris Lewis' hp2pbm package, placed at 4273 4274mgetty.greenie.net as @file{hp2pbm*} (in the mgetty directory mentioned above). 4275 4276This package contains all you need to convert ASCII or LJ PCL4 -> PBM, G3, 4277PS, X windows, Epson 24 pin. Coupled with mgetty's @code{g32pbm}, it's all 4278you need to send ASCII or HP LJ via FAX, and display/print FAXes on X, PS, 4279LJ, Epson, or via PBM utilities 4280 4281It performs better than most of the equivalent PBMPLUS utilities. Indeed, 4282if your application can generate both LJ and PS, generating LJ and 4283converting to G3 via @code{hp2pbm} is *much* faster than generating PS and 4284converting via GhostScript. 4285 4286[Citing Chris: Incidentally, "g32pbm" plus my "pbm2lj" is much faster 4287than g3tolj. Am not entirely sure why yet. May have something to do 4288with scaling, which g32pbm and pbm2lj don't do.] 4289 4290@item 4291@code{psroff} 4292 4293ftp.uunet.ca:@file{/distrib/chris_lewis/psroff3.0pl17/*} 4294 4295[Chris: It should be ...psroff/*, but they never answer when I ask them to 4296fix my symlink] 4297 4298Contains all you need to generate PS, LJ, or ditroff from ditroff or CAT 4299troff or groff. Together with hp2pbm, you can generate FAXes. Contains 4300quite a number of LJ fonts, font manipulation, and font scaling utilities. 4301 4302With the last two tools, you can send, receive, and print FAXes using 4303_just_ mgetty and hp2pbm (and a Laserjet printer ;-), without needing 4304pbmplus or GhostScript or anything else. 4305 4306@item 4307@code{Ifmail} 4308 4309Ifmail is Eugene Crosser's FidoNet (tm) compatible mailer + gateway 4310software for Unix and Linux. Together with @code{mgetty}, it provides the 4311perfect modem solution, allowing incoming Fido calls as well as Unix-Login 4312and fax. It can be found on: 4313 4314tsx-11.mit.edu:@file{/pub/linux/sources/usr.bin/ifmail*} 4315 4316sunsite.unc.edu:@file{/pub/Linux/system/Fido/ifmail*} 4317 4318@item 4319@code{dialog} 4320 4321Dialog is a very nice shell tool to simplify input/output functions in 4322shell scripts. All the programs in @file{mgetty/frontends/dialog/} rely on 4323it. It runs on most operating systems (except FreeBSD), as long as they 4324have a @code{curses} library. The source can be found on 4325 4326sunsite.unc.edu:@file{/pub/Linux/utils/shell/dialog*} 4327 4328@item 4329@code{ps2g3} 4330 4331is a small package to integrate @code{mgetty+sendfax} into the NeXTStep 4332operating system. It can be found on ftp.leo.org in the directory 4333@file{/pub/comp/platforms/next/Tools/postscript/ps2g3.s.tar.gz}. 4334 4335@item 4336@code{dvips5.47} 4337 4338Dvips 5.x and up create a strange kind of postscript that, when converted 4339with Ghostscript 3.x, produces Fax files that can not be faxed to paper 4340fax machines (modems work fine) because the line width isn't exactly 1728 4341pixels. Dvips 5.47 doesn't do this. It can be found on: 4342 4343@file{ftp.leo.org:/pub/comp/os/unix/networking/mgetty/dvips*} 4344 4345@file{midway.uchicago.edu:pub/tex/dvips/dvips547.tar.Z} 4346 4347@item 4348@code{g3vga} 4349 4350Is a nice, fast G3 viewer for Linux and SVGALIB (standard console mode, no 4351X11). You can find it in @file{.../apps/graphics/viewers} on all mirrors 4352of SunSITE.unc.edu. 4353 4354@end itemize 4355 4356@node get-uucp, , ftp, Problems 4357@section How to get the mentioned software by UUCP 4358 4359For those of you that do not have FTP access: all the software mentioned in 4360the last section can also be found on the following UUCP sites: 4361 4362@itemize @bullet 4363@item 4364GREENIE (my system): ++49-89-35663089, V32bis/V.34, get greenie!~/green.files.gz 4365 4366@item 4367CameloT (Frank Bartels): ++49-89-8948040, V34+, get /pub/ls-lR.gz 4368 4369@end itemize 4370 4371@node Thanks, , Problems, Top 4372@chapter Thanks 4373Many thanks to (in no special order): 4374 4375@itemize @bullet 4376@item 4377Peter Bechtold, peter@@fns.greenie.muc.de, for sending me dozens of faxes 4378to test mgetty, for calling me back numerous times after failed 4379attempts to send him a fax with sendfax, @dots{} 4380 4381Further, for the idea to use the remote fax id as part of the filename on 4382received faxes. 4383 4384@item 4385Klaus Weidner, klaus@@greenie.muc.de, for the original linux port, 4386testing dozens of pre-releases, writing the original texinfo 4387documentation, and finally for writing @code{vgetty}. 4388 4389@item 4390Lawrence 'dreamer' Chen, lawrence@@combdyn.com, for the initial ISC port, 4391and for testing the package with a SupraFAX-Modem. 4392 4393@item 4394Kay Schulz, kschulz@@gold.t-informatik.ba-stuttgart.de, for testing on ISC 4395--- and telling me that it's possible to ask dozens of questions without 4396having ever read the README file @dots{} 4397 4398@item 4399Georg Edelmann, georg@@alpha.saar.de, for testing on Linux, and finding 4400some stupid bugs. 4401 4402@item 4403Uwe S. Fuerst, uwe@@phiger.com, for testing on SCO 3.2v4 (and helping me a 4404lot nailing down the problem with dial-in/dial-out) 4405 4406@item 4407Bodo Bauer, bodo@@hal.nbg.sub.org, for porting mgetty to SVR4 (though he 4408did quite confuse me by insisting that the fax receiver does 4409not work @dots{}), and later, bodo@@suse.de, for his @code{faxrunqd} 4410daemon. 4411 4412@item 4413Christoph Adomeit, for bugging me long enough to implement XON / XOFF 4414flow control in fax sending / receiving, and for lending me one of 4415his GVC modems long enough to make faxing (well, fax sending) work with it. 4416 4417@item 4418Christopher M. Ward, for testing on SCO with another GVC modem. 4419 4420@item 4421Ralf Stephan, for finding a problem in sendfax whith some modems that 4422lower CD too soon. 4423 4424@item 4425John C. Peterson, for correcting a similar problem in mgetty / faxrec. 4426 4427@item 4428Chel van Gennip, for the @code{pbmscale}, @code{g3toxwd} and 4429@code{g3tolj} programs. 4430 4431@item 4432Glenn Thobe and Chris Lewis, for doing the 3B1 port(s). 4433 4434@item 4435Chris Lewis, for doing all the @file{/etc/gettdefs} stuff, CallerID, 4436space limiting, making the source look really awful (K&R C support), 4437miscellaneous minor fixes, 4438and tolerating my sometimes very unfriendly reactions to his suggestions. 4439 4440@item 4441Caz Yokoyama, for his suggestions concerning faxspool and the mail-to-fax 4442gateway 4443 4444@item 4445Martin Husemann, for SVR4 testing (damn ESIX) and the NetBSD 386 port 4446 4447@item 4448Michael A. Meiszl, mam@@mamunx.werries.de, because he asked me to (*grin*) 4449- and because he found + changed lots of small, nevertheless annoying 4450things. 4451 4452@item 4453Brent Mosbrook from ZyXEL USA, brentm@@zyxel.com, who has been 4454@strong{very} helpful solving some ZyXEL-specific and generic fax 4455questions. 4456 4457@item 4458ELSA Computer GmbH, Germany, for giving me a number of test modems and 4459being pretty suportive overall concering questions of modem firmware, 4460protocol handling, and so on. A big thanks! 4461 4462@item 4463Sam Leffler, sam@@sgi.com, for many interesting discussions and insights. 4464 4465@item 4466Christian Starkjohann, cs@@ds1.kph.tuwien.ac.at, for important parts of 4467the NeXT port. 4468 4469@item 4470Geoffrey Collyer and Henry Spencer, for writing the @code{newslock.c} program 4471I use in @code{faxrunq}. 4472 4473@item 4474Simone ``Neko'' Demmel, for going to bed early, giving me time to proof 4475read this manual and correct all the nasty bugs. 4476 4477@item 4478Russel Nelson, nelson@@crynwr.com, for hosting the mgetty mailing list 4479since December '96. 4480 4481@item 4482Medat Computer GmbH, Munich, for using mgetty+sendfax and paying me for 4483improvements (faxrunqd rewrite and lots of detail work). 4484 4485@item 4486SpaceNet GmbH, Munich, for sponsoring IP connectivity for alpha.greenie.net. 4487Should you ever need an Internet Service Provider in Germany, look at 4488http://www.space.net/... 4489 4490@item 4491Wiebke Baars, for being a really good friend, and for a number of 4492wonderful days spent together. 4493 4494@item 4495@dots{} and to all others who contributed in some way. 4496 4497@end itemize 4498 4499@contents 4500@bye 4501 4502@c Local Variables: 4503@c fill-column: 75 4504@c texinfo-column-for-description: 20 4505@c End: 4506 4507