I have a Ipaq Pocket PC. It connects to a bluetooth GPS Receiver (COM6). Whenever I try to open this COM Port using the SerialPort component I get an IOException. I have even tried listing all COM ports on the PPC, and opening each one inturn. Some work and some throw an IOException.
Does anyone have a suggestion

SerialPort Component IOException issue
trehberg
I will investigate the issue. To facilitate the investigation, can you let me know:
- the stack trace when the IOException is thrown
- the brand and model of the bluetooth GPS receiver you used
- the brand and model of the bluetooth card/device
- the OS of the device
Thanks,
Anthony Wong [MSFT]
Ickman
Jan V
I was not able to reproduce the issue on a Toshiba e750 with a SocketCom Bluetooth Card, or the integrated Bluetooth on HP IPAQ 6515. The Bluetooth GPS device I used is GlobalSat Bluetooth GPS BT-338 that I think is similar to the one you used. SerialPort.Open() works fine on the outgoing Bluetooth virtual serial port connected to the Bluetooth GPS device, and I can read the data from the Bluetooth GPS device.
I wonder if you could reproduce the issue on other devices as well
Cheers,
Anthony Wong [MSFT]
anandc
The stack trace is as follows:
at System.IO.Ports.SerialStream.WinIOError()
at System.IO.Ports.SerialStream.WinIOError()
at System.IO.Ports.SerialStream.CheckResult()
at System.IO.Ports.SerialStream.SetBufferSizes()
at System.IO.Ports.SerialPort.Open()
at TestThreadingPPC.SerialThreading.StartAsync()
at TestThreadingPPC.frmMain.btnStart_Click()
at System.Windows.Forms.Control.OnClick()
at System.Windows.Forms.Button.OnClick()
at System.Windows.Forms.ButtonBase.WnProc()
at System.Windows.Forms.Control._InternalWnProc()
at Microsoft.AGL.Forms.EVL.EnterMainLoop()
at System.Windows.Forms.Application.Run()
at TestThreadingPPC.frmMain.Main()
The calls in bold are CF calls.
Brand/Model of GPS Receiver: iPAQ Navigation System BT-308
Bluetooth device: HP iPAQ H4150
OS of Device: Windows CE 4.20
Hope this helps
mabadica
You will need to pair up with the bluetooth receiver before you use the serialport class. Are you able to use other programs to communicate with the receiver
Cheers,
Anthony Wong [MSFT]
JPB
After posting the above yesterday I did some further testing. I firstly tested the application with the device paired and connected (same result). I also tried it paired and not connected etc and all was fine.
I have tested successfully with a 3rd party component that reads from the serial port without problem.
Also, late yesterday I worked out that even though the SerialPort component is throwing an IOException on Open(), it is still successfully opening the port. I am able to read from the port! But, the DataReceived event refuses to fire.......
Hope this gives you some more background info...
Cheers
Bobby Fu
Thanks for the information. We will take a look at the issue.
Cheers,
Anthony Wong [MSFT]
MTM
I tried to Open a port on a hp ipaq hx4705 and it worked fine
When i tried the same code on a HP ipaq h5500 it crashed with an IOExeption
Have you guys have a solution for this problem
Rob C
Grateful
Glenn Slayden
When i am trying to call the Open() method of a SerialPort object i get an IOException.
the stack trace:
at System.IO.Ports.SerialStream.WinIOError()
at System.IO.Ports.SerialStream.WinIOError()
at System.IO.Ports.SerialStream.CheckResult()
at System.IO.Ports.SerialStream.SetBufferSizes()
at System.IO.Ports.SerialPort.Open()
at GPSMapMaker.Communicator.Open()
at GPSMapMaker.MainForm..ctor()
at GPSMapMaker.Program.Main()
And this error doesn't occure in a hp ipaq hx4705, only in the hp ipaq h5500
The port is a virtual port for a GlobalSat BT-338 gps reciever.
Mojtaba
I think you will find that even though an IOExeption is raised, the serialPort is still open. put a try catch block around the open method, and do nothing. after opening the port, try reading/writing to it.
Cheers
booga_boy
Were you using NETCF V2 SP1 If not, I would suggest you to try the service pack. The service pack includes fixes for SerialPort which may resolve your issue.
It would also be helpful to include a stack trace of the IOException for further investigation.
Cheers,
Anthony Wong [MSFT]
Jason Lodice
I was finally able to reproduce the issue on an IPAQ 4350 device. The issue seems to be specific to IPAQ 4150/4350 devices, and does not repro on devices like the IPAQ 6515. Nevertheless, we will consider taking a fix of the issue in the next service pack.
Thank you for reporting the issue!
Cheers,
Anthony Wong [MSFT]