From owner-freebsd-questions@FreeBSD.ORG Sat Dec 15 10:06:19 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB2BD6D9 for ; Sat, 15 Dec 2012 10:06:19 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 72DAA8FC0A for ; Sat, 15 Dec 2012 10:06:18 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id qBFA6sob067474; Sat, 15 Dec 2012 04:06:54 -0600 (CST) Date: Sat, 15 Dec 2012 04:06:54 -0600 (CST) From: Robert Bonomi Message-Id: <201212151006.qBFA6sob067474@mail.r-bonomi.com> To: freebsd-questions@freebsd.org, sam.gh1986@gmail.com Subject: Re: modem communication In-Reply-To: X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 10:06:19 -0000 > From owner-freebsd-questions@freebsd.org Sat Dec 15 03:27:08 2012 > Date: Sat, 15 Dec 2012 12:54:44 +0330 > Subject: modem communication > From: s m > To: freebsd-questions@freebsd.org > > hello guys, > > please forgive me if my question is not related to this list but i don't > know where i should ask about it. > > i have a freebsd8.2 and wanna talk my modem by com port. when i connect my > modem to com port, everything is ok. > > for some reasons, i have to communicate with modem, run a command, close > the connection, connect again, run another command, close connection,... . > in the other words, in each communication i have to run just one ati > command and close connection. BAD IDEA(TM) > my question is: are there any ati commands in modems that should be run > continuously (in the same communication)? i mean running one command, > close connection, open it again and run another command would make any > wrong? yes. > my program should work with all modems not a specific one. > > any hints or comments are really appreciated. Open the serial port at the beginning of the 'session', keep it open while you do everything needed, then (and only then!) close the serial port.