Results 1 to 2 of 2

Thread: Opening virtual gps com port.

  1. #1
    Variable Bitrate
    Join Date
    Feb 2006
    Posts
    393

    Opening virtual gps com port.

    Man I am totaly stumped. I have worked on this for hrs but I can't get past it.
    I am trying to open a virtual port created by Xport3. I replicate port 4 (the GPS port) to 5,6,7,8. I am trying to open any of those virtual ports but when I do port.open() it says the request is not supported. If I disable xport3 and open port 4 it works. If I open a port that is non-existant I get an error saying the port doesn't exist.

    Do I have to treat a Xport3 Virtual port differently and if so how?
    Any ideas what I am doing wrong?

    My code is c#.
    Code fragment:
    class GPS
    {
    // Create the serial port with basic settings
    private SerialPort port = new SerialPort("COM7", 4800, Parity.None, 8, StopBits.One);
    private CultureInfo NmeaCultureInfo = new CultureInfo("en-US");
    // Used to convert knots into miles per hour
    private double MPHPerKnot = Double.Parse("1.150779", new CultureInfo("en-US"));

    public string mlat="", mlongitute="";
    public double mspeed=0,mbearing=0;
    public bool mPositionFix = false;
    public DateTime mSatelliteTime;


    public GPS()
    {
    // Attach a method to be called when there is data waiting in the port's buffer
    port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);

    // Begin communications
    try
    {
    port.Open();
    }
    catch (Exception e)
    {
    Logging.WriteToLog("Error in GPS(): " + e.Message);
    MessageBox.Show("Error in GPS(): " + e.Message);
    }
    }

  2. #2
    Variable Bitrate
    Join Date
    Feb 2006
    Posts
    393
    A newer version of xport3 fixed this. Thanks Curiosity for updating xport to work with the C# 2.0 library.

Similar Threads

  1. OEM GPS mod. Writeup + Pics
    By IntellaWorks in forum Hardware Development
    Replies: 67
    Last Post: 07-04-2006, 02:59 AM
  2. Map Mokey GPS "Comm Port in Use"
    By LowLux in forum Map Monkey
    Replies: 2
    Last Post: 06-22-2006, 03:50 PM
  3. Replies: 13
    Last Post: 10-04-2005, 07:31 AM
  4. MediaEngine not opening GPS
    By doof205 in forum Media Engine
    Replies: 2
    Last Post: 09-30-2005, 09:54 AM
  5. USB Serial Port Adapter Troubles
    By bLindmOnkey in forum General MP3Car Discussion
    Replies: 0
    Last Post: 10-13-2004, 11:29 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •