FW: Reading responses from Modem.
yaipa h.
yaipa at yahoo.com
Sat Jul 24 00:26:48 EDT 2004
Google 'pyExpect' on comp.lang.python
Etienne Labuschagne <ELabuschagne at gmsonline.co.za> wrote in message news:<mailman.740.1090557167.5135.python-list at python.org>...
> Thanks for the responses. I will look into using PySerial for talking to
> the modem as suggested by Peter. The code example I gave is probably not
> the best way to do it, but it seemed to work ok (after running the
> diagnostics program).
>
> How do I "test for the modem prompt" and "confirmation after any outputs"?
> Any pointers as to "the correct way" to dial a number and read the responses
> from the modem (ie to see if the number was dialled, busy tone detected,
> etc.).
>
> Any help is greatly appreciated.
> Etienne
>
> -----Original Message-----
> From: Dennis Lee Bieber [mailto:wlfraed at ix.netcom.com]
> Sent: Thursday, July 22, 2004 5:50 PM
> To: python-list at python.org
> Subject: Re: Reading responses from Modem.
>
>
> On Thu, 22 Jul 2004 09:48:31 -0400, Peter Hansen <peter at engcorp.com>
> declaimed the following in comp.lang.python:
>
> >
> > Note: the +++ string is typically required to have delays
> > with *no* data transmitted on either side of it for one
>
> Which means NO \r\n wanted...
>
> Safest would probably be a sequence (not in Python here)
>
> flush, sleep, write, flush, sleep
>
> I also note that the original posted code does not seem to be
> testing for the modem prompt or confirmation after any outputs.
>
> --
> > ============================================================== <
> > wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> > wulfraed at dm.net | Bestiaria Support Staff <
> > ============================================================== <
> > Home Page: <http://www.dm.net/~wulfraed/> <
> > Overflow Page: <http://wlfraed.home.netcom.com/> <
More information about the Python-list
mailing list