Asking modem for Dial tone

M

Mota

Hi;
Is there an API to query modem and if there is a free dial tone returns
something,and if the connected line is in- use,returns something
else(Checking the line connected to modem,no dialing needed).
Thank you in advance for ur help.
 
A

Adrian Jansen

You need to pass a command string to the modem, to get it to reply. And you
can set various types of response, at least with Hayes type modems. Look up
the manual for the modem first, to see what you need to send. Or Google for
'Hayes commands'

Sending the string is easy. Open a port to Com1 ( or wherever the modem is
connected ). Print strings to the port. Get responses back with Line
Input.

eg
dim strResponse as string

Open "Com1,9600,n,8,1" for random as #1 'random allows both input and
output.

Print #1,"ATI" 'ATI is a standard Hayes command to return modem information

Line Input#1,strResponse

debug.print strResponse 'just to see what the modem returned.

Close #1 'always close a port you opened

Just from memory "ATO" should put the modem online, and you get a response
to tell you whether the command succeeded, eg "No Dialtone" "Connect xxxx"
etc, depending on how you set up the responses.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Connecting modem thru code 6
HSP56 Modem 3
Modem having trouble detecting a dial tone 2
Modem - dial tone broken up, but voice ok 1
Dial-up 1
modem????? 4
Windows XP Using dialer.exe Without My Speakers 6
No Dial Tone 2

Top