mgetty 0.98 - checking modem config
Michael Talbot-Wilson (mike@calypso.bns.com.au)
Thu, 14 Dec 1995 08:58:34 +0100
> > What bothers me slightly with AT&F is that different makes of modem might
> > have different factory defaults, so you don't quite get a clean slate.
> > Isn't it a slightly more certain procedure (assuming you have a mixture of
> > modem types) to write the correct settings to NVRAM once and for all?
>
> You get a clean slate for the brand of modem that you have configured
> your software to use. If you change modems, you would need to re-write
> NVRAM again. Also, if you use the modem for more than one purpose
I buy three NoName modems and put them on /dev/ttyS[234]. A few months
later I have seen the light :-) and so I buy two XyXEL modems and put
them on /dev/ttyS[56]. Soon afterwards a fourth NoName that was on
another computer becomes redundant there and so I put it on /dev/ttyS7.
Because the modems differ both in their defaults and in the functions of
similarly-numbered S registers, as well as the available AT commands,
compiling in the init string is perhaps not such a terrific idea in these
circumstances. AT&F is not particularly the issue, as has been pointed
out: what you need to do afterwards differs too.
After adding the modems to S4 and S5 you enter these commands:
kermit -l /dev/ttyS4 NoName.k
kermit -l /dev/ttyS5 XyXEL.k
(An example Kermit script to set up the modem for mgetty is appended to
this note.)
> (shifting back and forth between various apps for instance), then you run
> the risk of having the wrong settings set in the active profile.
I don't think you would do this. You would set the NVRAM for mgetty,
which, after all, is sitting on the line all the time. You configure
your dial-out program to make whatever changes it needs to the defaults,
and it makes no difference whether they are the factory defaults or those
that you stored in NVRAM. You wouldn't allow every comms program you run
to write to the NVRAM.
> for instance, how many people get hit by the ATZ1 annoyance with Procomm +?
> Datastorm likes to set "their" settings in profile 1, and load that profile
> each time.. if you hardare reset your modem, or change modems, a ZyXEL
> goes into a leased line mode :)
Yes, there may be modems that do some highly irrelevant and eccentric
thing when you say "ATZ". I don't think I would base an argument as to
whether to load factory defaults or custom defaults on such cases, nor on
the problems of broken comms programs.
-----------------------------------------------------------------------
; NoName.k --- A Kermit script to set up NoName modems for mgetty.
;
; You must set the line with a command line "-l" option.
;
define error echo Error: \%1, exit 1
set speed 115200
wait 3 cd
; Bail out if the modem is already in use...
if success exit 0
output \13
pause 1
output AT\13
input 3 OK
if fail error {Could not find modem.}
;
; The next line is all you need to change for different modem types.
output AT&FS0=0Q0&D3&K3\\N3%C3W0S95=0\13
;
input 3 OK
if fail error {Modem did not accept the init string.}
output AT&W
input 3 OK
if fail error {Could not write profile to modem.}
pause 1
:end
exit 0