I have a GPS from u-blox.com with a USB-connection and driver. The driver installs a virual COM port that pops up when you plug the USB in. Using a hyperterminal I can then
I have used the following code to communicate over USB to an Arduino, it send and receives a byte from the Arduino. It's simple, and isn't talking to a GPS, but hopefully it will help somehow!
public static byte ReadByte()
{
byte byteRead = new byte();
SerialPort port = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
port.Open();
int byteValue = port.ReadByte();
port.Close();
byteRead = Convert.ToByte(byteValue);
return byteRead;
}
public static void SendByte(byte packet)
{
SerialPort port = new SerialPort("COM3", 9600, Parity.None, 8, StopBits.One);
port.Open();
byte[] writeByte = new byte[1];
writeByte[0] = packet;
port.Write(writeByte, 0, 1);
port.Close();
}