 |
 |

10-12-2001, 08:10 AM
|
|
|
modem ready?
|
how can i know that the modem is ready to dial? assuming that the correct serial port is open, can i just test DSRholding? is that standard?
|
|

10-12-2001, 08:25 AM
|
 |
Contributor
Retired Leader * Expert *
|
|
Join Date: Jan 2001
Location: Ohio
Posts: 717
|
|
Re: modem ready?
|
If you us MSComm1.Output = "ATdt" + Chr$(13) you should get back an OK
|
__________________
A man is a success if he gets up in the morning and gets to bed at night,
and in between does what he wants to do. - Bob Dylan
Vb code does not go through spell check very well - Me
|

10-12-2001, 09:06 AM
|
|
|
Re: modem ready?
|
i send this:
FireCom.Output = "ATDT" + vbCr
view with this:
MsgBox "BUFFER: " + StrConv(FireCom.Input, vbUnicode), , "BUFFER CONTENTS"
and i get this "ATDT", then an out of memory error. my buffer gets a 1024 size data chunk and then chokes even though the buf len is 1024 exactly. then (err to debug window) it responds w/ no dialtone. that is expected....but how can i avoid that out of mem err, and if there was a dialtone, is the response "OK" standard?
thanks a TON
|
|

10-12-2001, 09:20 AM
|
 |
ISearchGoogle
Retired Moderator * Expert *
|
|
Join Date: May 2001
Location: england
Posts: 6,321
|
|
Re: modem ready?
|
The most basic and unprofessional way would be to stick a
<pre><font color=red>On Error Resume Next
</pre></font color=red>at the top of your Function or Sub.
Chief
|
__________________
Chuck Norris ordered a Big Mac at Burger King, and got one.
|

10-12-2001, 09:23 AM
|
|
|
Re: modem ready?
|
yeahhhh....but being of the curious breed [img]images/icons/wink.gif[/img], i want to know how to stop it, why it's happening, etc. it seems like the last time i was working w/ mscomm i had this problem, that was a few months ago though.
|
|

10-12-2001, 09:33 AM
|
 |
Contributor
Retired Leader * Expert *
|
|
Join Date: Jan 2001
Location: Ohio
Posts: 717
|
|
Re: modem ready?
|
Ok try putting this:
FireCom.Output= "ATDT" + Chr$(13) <font color=green>'Put where you have FireCom.Output = "ATDT" + vbCr </font color=green>
And then put this in your OnComm() to see the "OK"
Dim Inp as String
Private Sub FireCom_OnComm()
If FireCom.InBufferCount > 0 Then ds = FireCom.Input
If ds <> "" Then Inp = Inp + ds
Debug.Print ds
End Sub
|
__________________
A man is a success if he gets up in the morning and gets to bed at night,
and in between does what he wants to do. - Bob Dylan
Vb code does not go through spell check very well - Me
|

10-12-2001, 10:00 AM
|
|
|
Re: modem ready?
|
i didn't try that, but the proposed accumulator wouldn't hold anything other than whatever ds is currently = to...since it's dim not static or global...right?
anyway, i tried something that half solved the prob, maybe you'll have some input on this. in the oncomm event i did:
If FireCom.CommEvent <> comEvReceive Then Exit Sub
that got rid of the err...so do ya have any clues as to why it ran out of mem? obviously reading the buf contents when no data was received was the prob....the Q is why?
|
|

10-14-2001, 08:30 AM
|
|
Centurion
|
|
Join Date: Sep 2001
Location: Yugoslavia
Posts: 103
|
|
Re: modem ready?
|
Simply, restart him with command "ATZ" and wait until you get answer "OK". Then just dial a number that you want (MSComm1.Output = "ATDT XZZZZX" Or MSComm1.Output = "ATX3DT XZZZZZX" -if you don't have dial tone)
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|