Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Modem-To-Modem Communication... So Lost


i know there are many topics here around the issue as i've been looking around to find an answer before starting a new post.

though i'm putting together some code and still it does not seem to work right... i hope someone can point me in the right direction.

i'm programming a simple client/server application:

1. the client uses a modem, dials the server's number;
2. server picks up the phone;
3. server sends "HELLO" text to client;
4. client diplays incomed text in a textbox.

i can get the client modem to call using the ATDT# command, and the server modem to respond using the ATA command.

however, when the phones are connected (i can hear my voice coming out of the server phone), i still do not get the CONNECTED message on the client application. i do receive BUSY if the phone is busy, but no signal when the phone has been answered.

i get the same problem using hyperterminal, so VB may not be the issue here, rather: HOW do i establish a connection between two application via modem so that i can transfer pure text between them?

if someone can help i'm really getting lost here...

FYI, code i use to open the mscomm control:


Code:
'port
Client.MSComm1.CommPort = 1

'inputlen = 0 means to receive the full buffer
Client.MSComm1.InputLen = 0

'activate oncomm receive event after 1 byte
Client.MSComm1.RThreshold = 1

'activate oncomm send event after 1 byte
Client.MSComm1.SThreshold = 1

'activate communication to modem
Client.MSComm1.RTSEnable = True

'handshaking
Client.MSComm1.Handshaking = 2

'settings
Client.MSComm1.Settings = "9600,N,8,1"

'open the port
Client.MSComm1.PortOpen = True

'send attention command to modem and check it responds with OK
Client.MSComm1.Output = "ATV1Q0" & Chr$(13)

'wait for the data to come back from the serial port
Do
DoEvents
mBuffer = mBuffer & Client.MSComm1.Input
Loop Until InStr(mBuffer, "OK" & vbCrLf) > 0

'OK now modem is connected




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Communication Modem To Modem Problems
I have a program that dials and connects with a machine running an answering program. The program dials, connects, sends 6's till it sees a 7, then sends 3 passwords, one at a time after receiving A's from the answering program. It then sends files. My problem is, I had it working on one machine(in VB, not compiled), but when I try it on 2 different machines, I connect, but never see any input or output on either machine. I have also been having trouble with certain modems not being able to connect to each other. I have a third party control that works just like the MSComm control with a few extras. I tried using both controls, the results were the same. I am just learning programming, and the person who wrote the original answer program, programs in DOS, so maybe we are just missing something that windows controls. One more thing, the machines that the program worked on were Win95 and a non windows machine(answering machine). The program won't work on a Win98 machine sending to a non windows machine. Here is a sample of the code that worked on the one Machine:

private Sub Command1_Click()
'
Open "c:TestCommlog.fil" for Output as #8
Open "Param.dbs" for Random as #2 len = 256
get #2, 1, PR
Pass$ = PR.PASSWORD
'
Open "TRANSACT.DBS" for Random Access Read as #5 len = 128
SaxComm1.CommPort = 2
SaxComm1.Settings = "9600,E,7,1"
SaxComm1.PortOpen = true


SaxComm1.Output = "ATDT97411409" & vbCr
SaxComm1.InputLen = 1
'
'Setting time for time out
Time1& = Val(mid$(time$, 7, 2))_
+ (60 * Val(mid$(time$, 4, 2))) + (3600 * Val(mid$(time$, 1, 2)))

WaitForInput:
If SaxComm1.InBufferCount = 0 then
Time2& = Val(mid$(time$, 7, 2))_
+ (60 * Val(mid$(time$, 4, 2))) + (3600 * Val(mid$(time$, 1, 2)))

If Time2& - Time1& > 45 then
H% = 1
GoTo NoResponse
End If
GoTo WaitForInput
End If

C$ = SaxComm1.input
If C$ = Chr$(10) then GoTo WaitForInput
If C$ = Chr$(13) then GoTo TestConnect
P$ = P$ + C$
GoTo WaitForInput

TestConnect:
If InStr(P$, "CONNECT") then

SaxComm1.Settings = "9600,E,7,1"
Text2.Text = "Connected"
GoTo GotConnected
End If
GoTo WaitForInput
GotConnected:
Time1& = Val(mid$(time$, 7, 2))_
+ (60 * Val(mid$(time$, 4, 2))) + (3600 * Val(mid$(time$, 1, 2)))
22174
SaxComm1.Output = Chr$(6) + vbCr

22175 If SaxComm1.InBufferCount = 0 then
Time2& = Val(mid$(time$, 7, 2))_
+ (60 * Val(mid$(time$, 4, 2))) + (3600 * Val(mid$(time$, 1, 2)))
If Time2& - Time1& > 45 then
H% = 2
GoTo NoResponse
End If
Timer1.Interval = 30
Timer1.Enabled = true
GoTo 22174
End If
C$ = SaxComm1.input


22200 If C$ = Chr$(7) then GoTo 22204
GoTo GotConnected

22204 SaxComm1.Output = (Chr(1) + Pass$ + Chr$(13))

Time1& = Val(mid$(time$, 7, 2))_
+ (60 * Val(mid$(time$, 4, 2))) + (3600 * Val(mid$(time$, 1, 2)))
22206 If SaxComm1.InBufferCount = 0 then
Time2& = Val(mid$(time$, 7, 2))_
+ (60 * Val(mid$(time$, 4, 2))) + (3600 * Val(mid$(time$, 1, 2)))
If Time2& - Time1& > 24 then
H% = 3
GoTo NoResponse
End If
GoTo 22206
End If
C$ = SaxComm1.input
If C$ = "X" then
BPW% = BPW% + 1
If BPW% > 5 then GoTo InvalidPassword
GoTo 22204
End If
If C$ = "A" then
BPW% = 0
GoTo 22207
End If
GoTo 22206
''Program continues



Any advice on communications would be appreciated. Thanks in advance.

Catrina

Modem To Modem Communication
is it possible to write a VB program that can control 32 modems, with a dialog box for each modem, to accept incoming calls? I know how to do it with one modem, but I haven't found anything on multiple modems. We have a program that does this which is written in C++ but I don't know much about C++, I am strong in VB, so I'd like to possibly rewrite it in VB so I will be able to better support the software.

Thanks!@

Modem Communication
I need to communicate with an equipment throught using modem. How do I get started. Should I use MsComm or WinSock?? Do I need to send an initilazation string to make both modem communicate.

I've nerver worked with modem communications, so I just need some clues to get started.

Thanks

USB Modem Communication
Hi all

I'm facing problem in communicationg to an USB modem. Earlier i was using the COM port to connect to modem using the MSCOMM control of VB.

But now I want to shift to USB modem since I can connect multiple modems to one system and make a server program in VB which creates different instances of itself and listens to the USB port. So if any of my customers dial to the server, modem that is free and connected to the server should receive the request and as soon as the modem starts the program hsould start listening to the request.

Can any one help me on how to acheive this .. meaning listening to a USB port

Thanx in advance

Modem Communication In VB...
I have a server which is essentailly a voice mail server. That's not how it's sold, but that's what it is. Has a dialogic card (16 port) and rocketmodem (4 port).

The question (for now ) is this:

We've been looking for a way to automate some processes. The main hurdle is a means to dial into the system, enter a 7 digit DTMF user ID (let's use 4134134 as the touch tone example), then enter a 2, then a 9, and then another 9 and loop this process (the 2, 9, 9 part) as many times as the user has requested in a text box called NumberOfJobs.

Any ideas? I've played with MSCOMM and some thrid party OCX's with little to no success. With MSCOMM I can dial into the system which seems to work fine (shows up on the server's voice monitor), but it's inputing the DTMF tones for the corresponding user prompts that's not working.

I've searched through this and a bunch of other VB forums for answers and have tried all of the basic TAPI tuts. I'm stuck, please advise.

Any help would be greatly appreciated.

Modem Communication
how can i, first, let my modem dial another modem, and second, how can i communicate between the two PCs ?

Communication Using Modem
I want to develop an application in which two or more PCs can communicate using modem (Not on LAN or Internet).

Any ideas?

Modem Communication
Hi gurus!

I have been dialing with this MSComm control and trying establish connection with another computer (modem-modem) , but am not sure what to do after i have dialed the number. How do i start sending any type of data?The CommEvent is fired when the other end acknowledges the call but after that it just disconnects. Any ideas ?

best regards
Omer

Modem Communication
Can any body help me to find out how can I do a file transfer between two computers by using a Modem (dial-up connection)?

As I noticed, there is a MSComm.Ocx in VB that can do the connection. My question is how can I make sure that the file contents that I output to the Modem are correctly or not.

Will the MSComm or the Modem do the error detection & correction for me?

Thanks for your help.

56K Modem Communication Questions...
I already have built a program that picks up caller ID information from my modem and displays it, now I want to go alittle further...

I want to play sounds over my modem... basically be able to send sound through my modem cable like if it was a phone... is there any way to open up a command and send the speaker sound through it?

Req-HOWTO Add A Serial Modem To Modem Devices List
Hello.
I am trying to write an app that performs the functions of the windows "Add Modem" wizard. I am working with a wireless phone box DOWTEL CDMA 2000 with an RS-232 serial port

1: I am trying to add a modem device to the list of modems windows displays in the "Phones And Modems" control panel applet.
2: I am aware this can be done using the "Add Modem" wizard. I want to achieve this automatically, since Windows 95 to win XP and Server OSes support Standard Modem Types (Standard 33600 bps modem specifically)
3: I used an API Spy to monitor the API calls made to windows when a modem is being added. here is a list.

DeviceIoControl
GetModuleFileNameW
GetProcAddress
LoadLibraryA
LoadLibraryExW
LoadLibraryW
NtConnectPort
NtCreateFile
NtDeviceIoControlFile
NtFlushBuffersFile
NtFsControlFile
NtNotifyChangeDirectoryFile
NtOpenFile
NtQueryAttributesFile
NtQueryDirectoryFile
NtQueryInformationFile
NtQueryVolumeInformationFile
NtReadFile
NtRequestWaitReplyPort
NtSecureConnectPort
NtSetInformationFile
NtWriteFile

4: MSDN has a section on serial communications with API code in C++.. i do not know C and have at least 70 modems to configure before august. I need to automate this process. all the activex controls i have seen tell you how to work with modems already installed not how to install them with the API windows uses. they all claim to expose everything the windows code does, but there is no Addmodem function.. I guess that is what i need.

Thanks

Thanks

Sending Data From Modem To Modem
Hello,

I have 2 modems which i am using to send data between 2 vp apps. At least that's what i want to do, but i'm not too sure how.

Here's what i think i need to do. I want my modem A to dial the modem B on my pc. Then i want the vb app on modem A to send data to the VB app on modem B . So i need the mscomm control to send AT commands to modem A so it can dial modem B .

Has anyone done this before ? Just need some tips as to how to get started. How do i actually send a string ( my data) using an AT commands, to the remote modem ?

Really need some help asap

Thanks.

Ken

Dial Modem To Modem
I made a little chat program. can i have it dial directly modem to modem with phone numbers somehow? i've see this sort of thing on multiplayer games like starcraft and warcraft.
thanx

Gsm Modem
Hello
I would to know how to program a gsm modemto send and receive sms in java.

thank you for the answer

Modem
I have a HSP56k Micromodem.
using mscomm32 would I be able to communicate with the modem without drivers??

-Dont flame I am new to mscomm32

Need Help With Modem
Since the ringer on my phone broke, I have been trying to make a program that listens for incoming calls and plays a wav file through my sound card, but I'm not having any luck. I have even looked at a lot of Caller ID source codes but they don't seem to work either. I wrote a program in Quick Basic for DOS and it worked fine, but I need something that is Windows based. Since VB doesn't support the OUT command, I'm lost.

Here is the source for QB:

count = 0
CLS
OUT &H3E8, 255
A = INP(&H3E8)
begin:
DO
IF count <> 0 THEN LOCATE 2, 55: COLOR 2: PRINT "Call Last detected at "; ltime$
IF count <> 0 THEN LOCATE 1, 1: PRINT "Press [c] to confirm detected call"
LOCATE 10, 30: COLOR 15: PRINT " Monitoring Phone Line "
LOCATE 23, 1: COLOR 7: PRINT "Press [ESC] to Exit"
x$ = INKEY$
IF x$ = CHR$(27) THEN END
IF UCASE$(x$) = "C" THEN
count = 0
LOCATE 1, 1: PRINT " "
LOCATE 2, 55: PRINT " "
END IF
LOOP WHILE INP(&H2E8) = A
here:
ltime$ = TIME$
count = count + 1
DO
OUT &H3E8, 255
COLOR 18, 0
LOCATE 10, 30: PRINT "Incomming Call Detected"
FOR b = 200 TO 3000 STEP 250
SOUND b, 70 / 100
NEXT b
FOR y = 1 TO 2
SLEEP 1
x$ = INKEY$
NEXT y
IF x$ = CHR$(27) THEN END
GOTO begin
LOOP UNTIL INP(&H3E8) = A
GOTO begin

Modem
Does anyone know of an other way of communicating with a modem than with the mscomm object? Any help is very welcome....

Xyz...(modem)
Remote dial-up-only system requests either x y or zmodem protocols for test file transfer, how can i send a file with VB?
i'm using the MS Comm control...could i just select any protocol and proceed to transmit in blocks of data?:

while not EOF(1)
input #1, data$
mscomm1.output=data$ 'if this works, do i also need '+ vbCr'?
wend


ps: this forum is cool....been learning a lot--&gt; maybe i can help out somebody one of these days!

Modem And VB.
How can i trap the number dialed using the modem, i want to build an application to calculate the cost of a phonecall. If you have any ideas or suggestions from where to start, please help.

Use 56k Modem?
Is it possible to use a dialup modem in a computer to make phone calls and then play the audio on the computer speakers?
Also, is it possible to send audio from a normal microphone to the phone through a modem?
I'm thinking about a program that will let me use my computer as a telephone. Thanks!

Modem HELP!!
Hi!
I work usin wester union software which uses the modem to connect to western union, the thing is that when I finish using westerns soft it wont hang up the modem, so I want to make a little app that stays on the tray to hang up...
Does anybody knows how to hang up the modem???
tnx!

Where's The Modem
i asked a similar question about locating a modem, and then another thing hit me. i was using hyperterminal and before it dialed up it showed a little dialog box with the name of the modem...and there's not even a settings section! so it retrieved the information from the registry or some API...

does anyone know an API to retrieve this?

Using Modem By VB
How can I access the modem to dial a telephone number ? Can anyone give me some code to access the modem?

Sms Using Gsm Modem?
anybody can help me on how to do this stuff?

send and receive message using gsm modem.

How Can I Use Modem?
I am making a project in Visual Basic.
I want the solutions for this problem?
1) How can i record the sound from modem speaker out?
2) How Can I identify the telephone Number which has been dialed by the modem?
3) How Can I connect the Internet and disconnect?
If any one know the solutions for these problems please tell me quickly?

Modem To Modem (not Using Web)
Hi,

I have a relative who does not have web access.

Is it possible to connect my computer to his computer to pass messages and files ?

That is, I dial out on my modem to his home phone number, and connect to his computer via his modem.

We both have Windows XP Home edition.

I don't mind if it is VB code, or just some application to do it, but have been unable to find it.

Would appreciate help,

Modem Spy
Hi, is there anyway that i could record the sound that is passed though the modem, without using a jack lead from the speaker port. It needs to be via the line in and phone out.

Any Help is thankful???????

Modem
Can I Get The Voltage Of The Phone Line though the modem in vb or a c++ dll?

Modem
hello sir,
I would like to know weather there is any site or do u know any API function for Telephony Aplication.Actually i want an API function which i can include in my project that will interact with modem .
To be very clear ,if some one dials then it comes on to my phone then from there it should be connected to modem and then to my software. Now my API or some code detects the phone number and then it gives him some options and then he will press the number of option which he wants.That is what i want to do.So please give me some code or some idea how to go on it .I want it in vb and vc++ .It will be preperable if i get it in VC++.
I will be waiting for your mail to come.


thanking u
satya.

Modem
Hi all,

I need an idea how i can call a modem from a vb application and get connection with an other computer running an other vb application.

who can help me get this started?

regards asterix

Fax Modem
Hi Every Body

I've 2 Pc

First pc (U.S. Robotics 56K Voice Win) answer very good

second pc (U.S. Robotics 56K Voice INT PnP)

what's different for use AT Command

Modem
Hello.

I need to do a program that accept a call, send voice to modem, receive number touch tone from the emisor.

That is for a telephony sistem, that aswer for some question to a user.

Example.

Press 1 to Invoce
Press 2 to Reports

''''

Enter you code of 3 digits, and the user enter the code pushing the phone key.

Modem
Hello.

I need to do a program that accept a call, send voice to modem, receive number touch tone from the emisor.

That is for a telephony sistem, that aswer for some question to a user.

Example.

Press 1 to Invoce
Press 2 to Reports

''''

Enter you code of 3 digits, and the user enter the code pushing the phone key

Modem
How can I detect dial tones through my modem and send them back out. So that I can make a phone ring somewhere in the house ring?

Any ideas??

Modem???
Somebody know how to send a fax with the modem...
Without the dialog box. I want to do this in my application automatically.

thx

LAN Using Modem!!
Is it possible to connect 2 computers using phone line without dialing phone number.. Actually I have 2 computers in my room with modem (but not with LAN card) and i want to make a small net using existing hardware .. is it possible to do that useing MSComm Control or any other API? Please help me regarding this if possible...
Thank you,
Prashant

Modem Help
I know the Hayes Command Set to communicate with a modem. So I have to send the AT command through the Com Port. But I don't know what the modem answeres.
Where can I get all the commands the modem answeres to the PC?
Thank You.

Modem
i can i send the AT commands to a modem using vb?

mscomm just makes the lights on the front of the modem flicker and it doesn't get the modem to acutally do the command that i send.

thanks

Modem
Hi all,

I need my program to call a phone and play a wav when connected so the reciever of the call can hear the wav
true the speaker of the phone.

Who can help me with this.

Thanx

Modem With VB
how do i get a modem to pick up and dial a number with VB 3.0?

VB5 And A Modem
Hello VB users,

Is it possible to read information from a modem. For example reading the dailed number from somebody who made the telephone call.

Nice regards,

Ingrid.

VB5 And Modem
Hello VB users,

Is it possible if the telephone is ringing, to get information from the telephone line?
Maybe the telephone number of the one who is calling.
In my computer is built in a modem.

Are there books to read? ISBN numbers please.

Nice regards,

Ingrid.

Modem
How to use VB+modem to detect a call made from modem is being answer by others phone.

GSM Modem With SMS API
Hi friends,

I am looking for a GSM modem that come with a SMS API.
API written in VB would be preferable.

Anyone can provide suggestion for me?
Thanks.

Modem
Hi all,


This is not really a VB question, however, i am stuck a modem problem

The modem is connected to a cristie teleport with a speed of 9600 bps.

How can i set the modems DTE speed at fixed to 9600 bps ?

sometimes, the modem has a different DTE speed, i have to disconnect the
modem and connect it to a PC so it "learns" the 9600 bps speed.

I have try'd s23, s37, etc.


Hopefully somebodey has an answer.


Best Regards, Kees

Modem
how can i detect an incoming call, using vb?

Using Modem
dear sir
i am a school boy from iran.my name is farzin and i am
very pleased when i see your intresting site.
i write this letter to say thanks.
but i have got a question:

i want to use modem in vb6.i want to do the following:
1:we define some number for it.for example:
    jack :008716623045
    john :0015225555
    .
    .
    .

2: program should dial the numbers .it begin with jack .then john ...
3:user hold up the phone.

4:now program should play a definit "*.wav" file.
    for example when jack hold up "jack.wav"
    for example when john hold up "john.wav"

i can do steps 1 ..3 but i have two problem:
notice : i used component wich is avilabel with vb6.

a)how i can do step 4?
b)i want that if the user dosn't answer after 4 ring ,program :
   disconect the user and dial the next one.
how i van do that?


with thanks
farzin asadi

Modem
Hello, i need to make a hyperterminal like program using a modem so i can download information, please if anyone have any idea how to do it please anwser

API For ADD Modem
besides showing the user the control panel applet for "Add modem"
is there a way to add a modem programmatically using visual basic or API. i hear this is possible in C++.


thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved