No announcement yet.

Opening virtual gps com port.

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 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
    catch (Exception e)
    Logging.WriteToLog("Error in GPS(): " + e.Message);
    MessageBox.Show("Error in GPS(): " + e.Message);
    My Work Thread:
    Source switcher for Lill

  • #2
    A newer version of xport3 fixed this. Thanks Curiosity for updating xport to work with the C# 2.0 library.
    My Work Thread:
    Source switcher for Lill