Cellular Modem, PPP, and FreeBSD
smithi at nimnet.asn.au
Wed Oct 26 20:33:08 PDT 2005
This was posted to -net, but I suspect -questions is more appropriate.
On Wed, 26 Oct 2005, Jordon Hofer wrote:
> Greetings. I am running a stripped down version of FreeBSD 4.11 on an
> embedded x86 board. I have an embedded cellular modem module (from
> MultiTech) that is attached to the serial port (going through the necessary
> RS232-TTL chip). I am using PPP to connect to the Internet through verizon.
> Everything works well until the connection gets interrupted. I am using
> ddial mode, so if the connection drops, it will redial. From the logs, I
> can see that PPP tries to redial, but after the initial connection, the
> modem does not respond to any at commands. If I power-cycle the modem, it
> will connect just fine the next time PPP tries to reconnect.
Sounds like your modem isn't setup to automatically reset (ie, run ATZ)
on a disconnect. Some Multitechs have had weird command sequences over
the years, so I don't know the extent to which it it runs 'standard'
Hayes-type AT commands, but &D2 is most likely what you need.
&D2 causes a reset (ATZ) on lowering of the DTR line. For this to work
properly your serial port must be driving DTR correctly, ie be setup
for 'hardware handshaking'. You might want to test DTR with a meter?
Failing DTR reset working properly, if the modem is stuck in data mode,
you can have your initialisation send a <pause> '+++' <pause> sequence
to get the modem back into command mode (returning 'OK'), then send ATZ
plus whatever init string you need, but this is last resort measure.
mgetty, for example, does this if lowering DTR has failed to evoke an
'OK' modem response, after a call on inbound modems.
> I realize that there is a good chance that the problem is in the modem. I
> am just wondering if there are any cases where you need a special chat
> script to handle disconnects to return the modem to a clean state.
If the modem is configured correctly, and your serial port control lines
are working as they should, it should go. Perhaps play around with the
modem using tip(1); see also modems(5), or use another terminal program.
Then if you're still in trouble, maybe post your modem init string from
ppp.conf, and perhaps a dump of your modem settings after an ATZ .. AT&V
will do this for most modems, but check your particular modem's manual.
> Also, if there is a better group for this, please let me know.
> Jordon Hofer
> Dir. Software Engineering
> AgSense LLC
More information about the freebsd-questions