473,508 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FW: Reading responses from Modem.

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:wl*****@ix.netcom.com]
Sent: Thursday, July 22, 2004 5:50 PM
To: py*********@python.org
Subject: Re: Reading responses from Modem.
On Thu, 22 Jul 2004 09:48:31 -0400, Peter Hansen <pe***@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.

-- ================================================== ============ <
wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
wu******@dm.net | Bestiaria Support Staff <
================================================== ============ <
Home Page: <http://www.dm.net/~wulfraed/> <
Overflow Page: <http://wlfraed.home.netcom.com/> <

--
http://mail.python.org/mailman/listinfo/python-list
Jul 18 '05 #1
1 1708
Google 'pyExpect' on comp.lang.python

Etienne Labuschagne <EL**********@gmsonline.co.za> wrote in message news:<ma*************************************@pyth on.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:wl*****@ix.netcom.com]
Sent: Thursday, July 22, 2004 5:50 PM
To: py*********@python.org
Subject: Re: Reading responses from Modem.
On Thu, 22 Jul 2004 09:48:31 -0400, Peter Hansen <pe***@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.

--
> ================================================== ============ <
> wl*****@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wu******@dm.net | Bestiaria Support Staff <
> ================================================== ============ <
> Home Page: <http://www.dm.net/~wulfraed/> <
> Overflow Page: <http://wlfraed.home.netcom.com/> <

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2588
by: Etienne Labuschagne | last post by:
Assuming the modem is on COM5: m = open('COM5','wb+') m.write('+++\r\n') m.flush() m.write('ATQ0V1E0\r\n') m.flush() m.write('ATDT5551234;\r\n') m.flush() response = m.read()
28
2173
by: MLH | last post by:
Would like to roll out something in Access 2.0 to read MAC address on 16-bit systems. Have resolved on 32-bit platforms but still need help with Access Basic code to do it from within Access 2.0.
21
13025
by: JoKur | last post by:
Hello, First let me tell you that I'm very new to C# and learning as I go. I'm trying to write a client application to communicate with a server (that I didn't write). Each message from the...
3
2160
by: Arne Beruldsen | last post by:
How do you read the serial number to a hard drive? Thanks...Arne
17
3335
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
8
3182
by: stephane8 | last post by:
I'm able to open and read my .csv file. But when the character "-" is in one of my fields (ex : 18802-002) I get a system.DBNull value ! Even if I edit the file with notepad and put "18802-002" I...
3
6435
by: Nutshell | last post by:
Hello everybody, in my application I'd need to know if a com port is a modem or not (and eventually its description and if it is a null modem). I get the list of com ports available with: string...
2
2380
by: muruganyuva | last post by:
hi, in my project i'm sending the data from source to destination with the help of modem. one modem at the source and other at the destination. at first i'm initializing the source modem. ...
1
1426
by: subhakohila | last post by:
Hi, Can any one help me to read the wave file and pass through the modem to the telephone line....I tried with some set of codings but its returning some garbage values.... The coding i...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7324
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7042
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5052
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.