H
Hugh Janus
I am trying to receive GPS data into a pocket PC 5.0. I am using the
device emulator. The main PC has a bluetooth dongle connected and is
bonded with the bluetooth GPS transmitter to COM8. In the device
emulator, I am mapping Serial Port 1 to COM8. The below code *should*
work as far as I can see but it does not. It hangs on the ReadLine
line. Any ideas anyone?
If I use hyperterminal on the main computer to read COM8 I can see the
GPS data so the GPS is working OK. Help!?!!
Private Sub ReadGPS
Debug.WriteLine("Starting")
Application.DoEvents()
Debug.WriteLine("Creating COM Port")
Dim GPSCom As New IO.Ports.SerialPort
With GPSCom
.PortName = "COM1"
.BaudRate = "2400"
.DataBits = 8
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.NewLine = "$"
.Open()
End With
Application.DoEvents()
Debug.WriteLine("Attempting read.")
Application.DoEvents()
Do
Debug.WriteLine(GPSCom.ReadLine)
Application.DoEvents()
Loop
End Sub
device emulator. The main PC has a bluetooth dongle connected and is
bonded with the bluetooth GPS transmitter to COM8. In the device
emulator, I am mapping Serial Port 1 to COM8. The below code *should*
work as far as I can see but it does not. It hangs on the ReadLine
line. Any ideas anyone?
If I use hyperterminal on the main computer to read COM8 I can see the
GPS data so the GPS is working OK. Help!?!!
Private Sub ReadGPS
Debug.WriteLine("Starting")
Application.DoEvents()
Debug.WriteLine("Creating COM Port")
Dim GPSCom As New IO.Ports.SerialPort
With GPSCom
.PortName = "COM1"
.BaudRate = "2400"
.DataBits = 8
.Parity = IO.Ports.Parity.None
.StopBits = IO.Ports.StopBits.One
.NewLine = "$"
.Open()
End With
Application.DoEvents()
Debug.WriteLine("Attempting read.")
Application.DoEvents()
Do
Debug.WriteLine(GPSCom.ReadLine)
Application.DoEvents()
Loop
End Sub