|
-
Jun 8th, 2005, 09:48 AM
#1
Thread Starter
New Member
Accessing Via Com port
Hi All,
I want to access com port to read the GPS readings (GPS is hooked to the com port). I am using MScomm to do this, but iam not able to see the GPS signal (NMEA strings).This this the code I use. Please help me if anything is wrong.
MSComm1.CommPort = 1
MSComm1.PortOpen = True
Text1.Text = MSComm1.Input
Thanks in advance for any input.
Nathan
-
Jun 8th, 2005, 10:12 AM
#2
Thread Starter
New Member
Re: Accessing Via Com port
Dave Sell,
I am able to see the GPS signal now. This is the code I used. but these signals are in some encyted format. I need to convert them to ascii strings. how to convert these signals to ascii string?
Since GPS is contiuously sending signals, I am using the DoEvents to pause so that I can see the signal in Text box.
Dim start
MSComm1.CommPort = 1
MSComm1.PortOpen = True
MSComm1.Handshaking = comNone
For i = 1 To 10
Text1.Text = MSComm1.Input
start = Timer
Do While Timer < start + 0.25
DoEvents
Loop
Next
Thanks
Nathan.
-
Jun 8th, 2005, 10:24 AM
#3
Re: Accessing Via Com port
Glad to hear your communications is working. Are you sure it's encrypted? How would you know that for sure? Maybe you can post an example of your comm input.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jun 8th, 2005, 10:28 AM
#4
Thread Starter
New Member
Re: Accessing Via Com port
This is what I see in the Text box.
ff0f3Ìà†à†à†<à†˜†~怘€
Nathan
-
Jun 8th, 2005, 11:00 AM
#5
Re: Accessing Via Com port
You can get garbage in your comm input if the baud rate is not set to match both sending and receiving devices. If you're sure they match, then I'm not sure you may be getting binary data. I doubt if it's encrypted, as you say.
You may have to contact the mfg of your GPS device to aqcuire the compatible protocol.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jun 8th, 2005, 12:42 PM
#6
Thread Starter
New Member
Re: Accessing Via Com port
Dave Sell,
I tried all the valid baud rates. None of them works. If it is binary data, how can I convert it to ascii string.
Thanks
Nathan.
-
Jun 8th, 2005, 12:42 PM
#7
Re: Accessing Via Com port
No one can tell you that except the mfg of the GPS device.
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jun 8th, 2005, 01:07 PM
#8
Thread Starter
New Member
Re: Accessing Via Com port
Thank You Dave Sell,
It works for baud rate of 4800.
Thank You very much.
nathan.
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
|