Re: Modem table & init strings revisited

Brian Rice (bri@moondance.livingston.com)
Wed, 20 Sep 1995 18:28:38 -0700 (PDT)

> > Try this:
> >
> > add modem supra SupraFAXmodem288 57600 "ATZ0\r^OK"
>
> "^"! That was what I needed, thanks.

NO! Don't try that, it's not what you need!!!

> However, NOW I see what the hubbub is: Even when I do the above (actually,
> this last time I left out the 57600) and power off the modems, when I power
> them on, something which looks like a reset happens, but if I dial in, the
> DTE speed is still wrong...which is what I remember others complaining
> about.
>
> However, now that I have the correct send-expect string (thanks, Sameer!),
> when I do a reset on the modem ports, THEN the modems get reset to the
> correct speed.
>
> One problem: What happens if there's a power outage and ALL these modems
> revert their DTE speeds back to 28800? When they power up, they're wrong,
> and I have to be able to get in to do the reset (yes, I actually do have a
> way to do that, HOWever... It shouldn't IMHO be necessary).
>
> How do I get the PM to reset the modem automatically when the modem powers
> up? Was there ever a consensus on this? I remember all the discussion,
> and now regret that I didn't pay better attention.

Let me take a stab at explaining how this works ... it'll be close to right,
as usual. :-)

First step, the actual modem config. I must confess, I don't have the
*exact* string for that modem, but I can say what you want in general
and that will go part way in explaining how this all works.

You want "Carrier present only when it connects with another modem".
This is almost always &C1 - consult your manual.

"Toggle DTR and cause the modem to re-read from profile 0". Typically
&D3, but with USR &D2, - consult your manual.

"Latch DTE speed". Most modems follow (and latch) based on the speed
at which you were attached last time you typed an AT command. Some do
not latch until you write the config. USR modems use &B1.

"Hardware Flow Control" Most modems use &K3, USR uses the combination
of &H1 and &R2.

"Negotiate Error Correction" On this setting I am only familiar with USR,
it's &M4.

"Negotiate Compression" Again, I only know the USR setting on this one,
and just to confuse you it's &K1.

Some modem manufactures provide factory profiles that you can apply against
the modem and get just this combination. For USR it's &F1. The real
lesson here is that you have to consult you modem manual (unless you have
USR modems, in which case you just got lucky!)

Now then, I have created a modem entry as illistrated above, but in the
AT field I'm going to put AT&F&B1&C1&D2&H1&R2&M4&K1S0=1&W (the S0=1 piece
for auto answer) or, on the USR, less confusingly, AT&F1S0=1&W. If you
refer to the section in the back of the USR manual about the different
factory profiles you'll see this is the hardware flow control with
compression. Golden.

Now let's apply this to the PortMaster.

set s1 modem modem_entry_name
reset s1
Note that if you quickly show S1 you'll see it's in an initializing phase.
It's stuffing the string to the modem. If you'd like to watch this operation
then:
set console
set debug 0x51
reset s1

Now that the port has been reset the modem has been configured:

show s1

----------------------- Current Status - Port S1 ---------------------------
Status: ESTABLISHED
Input: 9032666 Parity Errors: 0
Output: 54192870 Framing Errors: 0
Pending: 0 Overrun Errors: 0

Active Configuration Default Configuration
-------------------- ---------------------
Port Type: Netwrk Netwrk (Dial Out)
Baud Rates: 115200 115200,115200,115200
Flow Control: RTS/CTS RTS/CTS
Modem Control: on on
Modem Status: Configured p-usr-v34

Remote Host: 199.199.9.99
Netmask: 255.255.255.0 0.0.0.0
Interface: ptp1 (PPP,RIPsend,Compr (SLIP,Quiet)
Mtu: 1500 1500
Async Map: L:00000000 R:00000000 00000000
Dial Group: 0

Ok, I cheated and showed you an active port, but note the Modem Status
field. Once you've properly configured the modem each time the port
is set or the PortMaster boots it's going to send that config string to
the modem. Thus, the above example with ATZ will only cause the modem
to re-read from profile 0 - well, if profile 0 is incorrect than your
modem will never work properly - unless you're one lucky sysadmin.

Does this _completely_ answer the question? I know I came into the middle
of this 'cuz I've been away from the list for awhile so I may be way out
to lunch ...

--
Bri