|
-
Nov 1st, 2001, 07:17 PM
#1
Thread Starter
Hyperactive Member
-
Nov 2nd, 2001, 12:27 PM
#2
Check MSDN and see what you can find (http://msdn.microsoft.com/ )
-
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.
-
Nov 2nd, 2001, 03:09 PM
#4
Glad you got it worked out, and I'll file this away for future reference.
-
Nov 5th, 2001, 02:55 AM
#5
Lively Member
May i ask if a vb program can reset a modem when the modem is already being used by another program.
If not, is there a way to bypass it?
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
|