From owner-freebsd-questions Thu Feb 24 18: 7:40 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ntstn.sasknow.com (h139-142-245-100.ss.fiberone.net [139.142.245.100]) by hub.freebsd.org (Postfix) with ESMTP id 503E337BDC0; Thu, 24 Feb 2000 18:07:19 -0800 (PST) (envelope-from ryan@sasknow.com) Received: from localhost (ryan@localhost) by ntstn.sasknow.com (8.9.3/8.9.3) with ESMTP id UAA90540; Thu, 24 Feb 2000 20:07:03 -0600 (CST) (envelope-from ryan@sasknow.com) Date: Thu, 24 Feb 2000 20:07:03 -0600 (CST) From: Ryan Thompson Reply-To: Ryan Thompson To: Ptacek Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: modem program... Help In-Reply-To: <013701bf7f2a$1c4681c0$0301a8c0@Ptacek> Message-ID: Organization: SaskNow Technologies [www.sasknow.com] MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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 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