M
Mike Endys
I have application that reads NMEA data from COM port. It works well with
hardware devices. But I need to emulate GPS device. There is FakeGPS
utility, that works with Microsoft sample project, but I need FakeGPS to
work as HW GPS device - I need to read data by my application from COM port.
Is it possible? How to configure the FakeGPS to be able read from COM port?
I have this registry settings:
HKLM\System\CurrentControlSet\GPS Intermediate Driver
IsEnabled = 0x1 (1)
HKLM\System\CurrentControlSet\GPS Intermediate Driver\Drivers
CurrentDriver = TestGPSFile
HKLM\System\CurrentControlSet\GPS Intermediate Driver\TestGPSFile
File1 = \Program Files\FakeGPS\GPSFiles\fakegpsdata.txt
FriendlyName = TestGPSFile
InterfaceType = File
CommPort = COM2:
Baud = 0x2580 (9600)
Iterations = 0x1 (1)
MaxReadSize = 0x78 (120)
MinReadSize = 0x78 (120)
ReadInterval = 0x3E8 (1000)
When I try to open COM2 port I allways get
IOException: at System.IO.Ports.SerialStream.WinIOError(Int32 errorCode,
String str)
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate,
Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32
writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable,
Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
What I do wrong?
Thanks for answer
Mike
hardware devices. But I need to emulate GPS device. There is FakeGPS
utility, that works with Microsoft sample project, but I need FakeGPS to
work as HW GPS device - I need to read data by my application from COM port.
Is it possible? How to configure the FakeGPS to be able read from COM port?
I have this registry settings:
HKLM\System\CurrentControlSet\GPS Intermediate Driver
IsEnabled = 0x1 (1)
HKLM\System\CurrentControlSet\GPS Intermediate Driver\Drivers
CurrentDriver = TestGPSFile
HKLM\System\CurrentControlSet\GPS Intermediate Driver\TestGPSFile
File1 = \Program Files\FakeGPS\GPSFiles\fakegpsdata.txt
FriendlyName = TestGPSFile
InterfaceType = File
CommPort = COM2:
Baud = 0x2580 (9600)
Iterations = 0x1 (1)
MaxReadSize = 0x78 (120)
MinReadSize = 0x78 (120)
ReadInterval = 0x3E8 (1000)
When I try to open COM2 port I allways get
IOException: at System.IO.Ports.SerialStream.WinIOError(Int32 errorCode,
String str)
at System.IO.Ports.SerialStream..ctor(String portName, Int32 baudRate,
Parity parity, Int32 dataBits, StopBits stopBits, Int32 readTimeout, Int32
writeTimeout, Handshake handshake, Boolean dtrEnable, Boolean rtsEnable,
Boolean discardNull, Byte parityReplace)
at System.IO.Ports.SerialPort.Open()
What I do wrong?
Thanks for answer
Mike