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.DoE vents()
Debug.WriteLine ("Creating COM Port")
Dim GPSCom As New IO.Ports.Serial Port
With GPSCom
.PortName = "COM1"
.BaudRate = "2400"
.DataBits = 8
.Parity = IO.Ports.Parity .None
.StopBits = IO.Ports.StopBi ts.One
.NewLine = "$"
.Open()
End With
Application.DoE vents()
Debug.WriteLine ("Attempting read.")
Application.DoE vents()
Do
Debug.WriteLine (GPSCom.ReadLin e)
Application.DoE vents()
Loop
End Sub