Hello all :
I use serialport.read function read gps data in windows mobile smartphone by vs.net
2005, but it has some problem happened.
The error happened in serialport1.read(data,0,50)
This following is my code:
Private Sub MenuItem2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
SerialPort1.Open()
If SerialPort1.IsOpen = True Then
Label2.Text = "Open"
Label2.Visible = False
Else
Label2.Text = "close"
End If
Dim data(999) As Char
SerialPort1.Read(data, 0, 50)
TextBox1.Text = data(1)
SerialPort1.Close()
End Sub

windows mobile 5.0 smartphone use serialport reading gps data problem
Vishal Mistry
I moved this to the .NETCF Forum.
Amit Chopra
HSA4733
Hi,
Please test the application on a device instead of the emulator. Let me know if you still experience the issue.
Cheers,
Anthony Wong [MSFT]
Scott Gunn
Hi everybody:
I use windows moblie smartphone Emulator read data from usb gps receiver
but it always can't read data from gps receiver
when I run the code , the error was in serialport1.read()
this error is " IO Exception " , no data read from GPS receiver
The is my code
Private Sub MenuItem2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
SerialPort1.Open()
If SerialPort1.IsOpen = True Then
Label1.Text = "open"
End If
SerialPort1.Close()
End Sub
Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim gps(1000) As Char
Dim str As String
SerialPort1.Read(gps, 0, 10)
str = SerialPort1.ReadExisting
Label2.Text = str
End Sub
Lovie
Hi
I used step by step debug , but in serialport1.read() ,the program was stopped and
I use WM5.0 emulator device , when I wrote vb code
Guillermo Roldán
When I run the program...
SerialPort1.Read(data, 0, 50) will has error
this error is " IO Exception " , no data read from GPS receiver
halola
brrrr
Hi,
Can you include the stack trace Also, what's the WM5.0 SP device you used
Cheers,
Anthony Wong [MSFT]
JeffCurrier
I have exactly the same problem. I am using .NET CF 2 on Windows Mobile 5. If I try to open COM7 with the following code I also get an IOException:
SerialPort
port = new SerialPort("COM7", 4800);port.Open();
I paired my device with bluetooth outgoing port com7 and assigned it to the gps program port.