Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Dec 2012 12:38:20 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Robert Bonomi <bonomi@mail.r-bonomi.com>
Cc:        sam.gh1986@gmail.com, freebsd-questions@freebsd.org
Subject:   Re: modem communication
Message-ID:  <20121215123820.4c7943d8.freebsd@edvax.de>
In-Reply-To: <201212151006.qBFA6sob067474@mail.r-bonomi.com>
References:  <CAA_1SgGLQ2Y9uWaR7gCzeWuxS7oU003YtzU82ruZT=u2wsc-0w@mail.gmail.com> <201212151006.qBFA6sob067474@mail.r-bonomi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 15 Dec 2012 04:06:54 -0600 (CST), Robert Bonomi wrote:
> > 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 <sam.gh1986@gmail.com>
> > To: freebsd-questions@freebsd.org
> >
> > 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.

In addition, depending on how you access the modem, e. g.
via open() or fopen(), you could use the corresponding
flush operation - fsync() - to make sure the commands are
written to the modem port _right now_. There should be no
need to re-open the modem for every AT command you send.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121215123820.4c7943d8.freebsd>