I'm having a problem using the MSComm control I hope someone can help 
Author Message
 I'm having a problem using the MSComm control I hope someone can help

I'm having a problem using the MSComm control I hope someone can help
me with.  I'm writing a VB communication app that doesn't seem to work
reliably.  After starting the program I've written I can dial out on
my modem and hang up only on the first try.  If I attempt to dial out
more than once nothing seems to happen.  I've stepped through my code
and I don't seem any obvious problems.  

Before dialing I'm using mscomm.settings to initialize the modem and
mscomm.portopen to open the port .  To disconnect I'm using "ath" and
then I close the port.  But if I try to dia againl nothing happens.

What is the proper way to initialize, hangup and reinitialize a modem
in VB?  

I hope somebody out there who knows more about VB can help me.  \
Thanx....:)



Sun, 16 Jan 2000 03:00:00 GMT  
 I'm having a problem using the MSComm control I hope someone can help

After you hang up do a reset on the modem, "ATZ".
After you get the "OK" from the modem then close the com port.

This is how to close the com port.
    ' Clear the Request to Send
    ' This must be done before you close the port.
    MSComm1.RTSEnable = False
    ' Close the port.
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False


Quote:
> I'm having a problem using the MSComm control I hope someone can help
> me with.  I'm writing a VB communication app that doesn't seem to work
> reliably.  After starting the program I've written I can dial out on
> my modem and hang up only on the first try.  If I attempt to dial out
> more than once nothing seems to happen.  I've stepped through my code
> and I don't seem any obvious problems.  

> Before dialing I'm using mscomm.settings to initialize the modem and
> mscomm.portopen to open the port .  To disconnect I'm using "ath" and
> then I close the port.  But if I try to dia againl nothing happens.

> What is the proper way to initialize, hangup and reinitialize a modem
> in VB?  

> I hope somebody out there who knows more about VB can help me.  \
> Thanx....:)



Mon, 17 Jan 2000 03:00:00 GMT  
 I'm having a problem using the MSComm control I hope someone can help

Hello:-

Quote:
>I'm having a problem using the MSComm control I hope someone can help
>me with.  I'm writing a VB communication app that doesn't seem to work
>reliably.  After starting the program I've written I can dial out on
>my modem and hang up only on the first try.  If I attempt to dial out
>more than once nothing seems to happen.  I've stepped through my code
>and I don't seem any obvious problems.  

>Before dialing I'm using mscomm.settings to initialize the modem and
>mscomm.portopen to open the port .  To disconnect I'm using "ath" and
>then I close the port.  But if I try to dia againl nothing happens.

>What is the proper way to initialize, hangup and reinitialize a modem
>in VB?  

Well I don't know if this is considered "proper", but I disconnect the
modem in a different way...instead of "ATH" I use the property
comm1.RTSEnabled=false and then I shutdown the port. Well this makes
sure that the modem hangs up...because some modems (like mine) doesn't
respond to "ATH" messages when already connected.

To reinitialise, I reopen the port, reenable RTS and reinitialise the
modem...hee :)

Scorched



Fri, 28 Jan 2000 03:00:00 GMT  
 I'm having a problem using the MSComm control I hope someone can help

Quote:

>Hello:-

[snip]>>
>>What is the proper way to initialize, hangup and reinitialize a modem
>>in VB?  

>Well I don't know if this is considered "proper", but I disconnect the
>modem in a different way...instead of "ATH" I use the property
>comm1.RTSEnabled=false and then I shutdown the port. Well this makes
>sure that the modem hangs up...because some modems (like mine) doesn't
>respond to "ATH" messages when already connected.

No Hayes compatible modem responds directly to ATH, or it could happen
during a transmission.  The modem enters command mode on receipt of
"+++" after a 2 second pause in data transmission.  Then you can send
ATH.  Did you read the manual that came with your modem?

Visit my source code page at http://www.mindspring.com/~johnecarter
Visit my favorite school at http://www.mindspring.com/~addison

Get PR-Tracker -- tracks problem reports, defects, bugs
INFORMATION:  http://www.prtracker.com/info.html
DOWNLOAD:     http://www.prtracker.com/download.html



Fri, 28 Jan 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ** Hope someone know how to send a Querystrig, having alot of problems with this

2. ? hope someone can help - filesystemobject

3. hope someone can help

4. Hi hope someone call help with this listview ?

5. And yet another question! Hope someone can help

6. And yet another question! Hope someone can help

7. I'm having trouble using a DBList control

8. ~~ Help, I'm having file input problems...

9. 'Canned' data in VB program

10. Help I'm having a problem with dbgrid32.ocx in unbound mode

11. Still having problems with MSComm

12. MSComm for Port I/O - having problems

 

 
Powered by phpBB® Forum Software