Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Feb 2000 20:07:03 -0600 (CST)
From:      Ryan Thompson <ryan@sasknow.com>
To:        Ptacek <ptacek@dashmail.net>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: modem program... Help
Message-ID:  <Pine.BSF.4.21.0002242000190.88295-100000@ntstn.sasknow.com>
In-Reply-To: <013701bf7f2a$1c4681c0$0301a8c0@Ptacek>

next in thread | previous in thread | raw e-mail | index | archive | help
Ptacek wrote to freebsd-questions@FreeBSD.ORG and freebsd-hackers@FreeBSD.ORG:

> Hi,  I am currently writing a program that will use an attached 
> modem to dial and connect to a remote site to gather data.  I
> have been able to dial, connect, send data back and forth, but
> I just can't seem to get the modem to hangup.  I probably have
> to bring the DTR low (+++ATH<CR> doesn't work).  How
> do I do this?  Also how can I detect if the modem is in 
> command mode, for example if the line gets unplugged and I
> get a NO CARRIER back how do I know to read that as a
> command instead of data?  
> 
>  Thanks,
>    Chris

Hayes-compatible modems require a 1 or 2 second delay in between the +++
escape and the command.  Sleep for 2 seconds before issuing any commands.

The "NO CARRIER" is a message intended mainly for the terminal user to
see.  You should never attempt to parse messages like that.  Instead, you
should detect carrier in the hardware.

-- 
  Ryan Thompson <ryan@sasknow.com>
  Systems Administrator, Accounts
  Phone: +1 (306) 664-1161

  SaskNow Technologies     http://www.sasknow.com
  #106-380 3120 8th St E   Saskatoon, SK  S7H 0W2



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0002242000190.88295-100000>