|
-
Nov 2nd, 2001, 01:16 PM
#3
Thread Starter
Hyperactive Member
I got it right....!!!!
I wrote:
.
.
MsComm1.Output = "ATZ" & vbCrLf 'Send a command to the port.
dim sTemp, b as string
sTemp = ""
Do until Instr(sTemp, "OK") > 0 or Instr(sTemp, "ERROR") > 0
b = MsComm1.Input
sTemp = sTemp & b 'Create a string to parse through.
Loop
.
.
The modem responds best when you pass the AT command along with a Carriage return line feed command.
Then you want to stay inside a loop while capturing the Input buffer and parsing through it for response..(I looked for an OK or ERROR. You can look for other responses). You can then write the rest of your code depending on the response (if error..do this, if Ok..do this, etc.)
This was a lot easier than I thought!
Thanks for the help.
Last edited by rplcmint; Nov 2nd, 2001 at 01:23 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|