Results 1 to 8 of 8

Thread: Accessing Via Com port

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    5

    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

  2. #2

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    5

    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.

  3. #3
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    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.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    5

    Re: Accessing Via Com port

    This is what I see in the Text box.

    f f0f3Ìà†à†à†<à†˜†~怘€

    Nathan

  5. #5
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    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.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    5

    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.

  7. #7
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    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.

  8. #8

    Thread Starter
    New Member
    Join Date
    Jun 2005
    Posts
    5

    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
  •  



Click Here to Expand Forum to Full Width