I have a PPC app that I am simply trying to open a serial port for using the SerialPort control in VS2005. As soon as I try to open the port it will give me "Error 57: The port 'COM1:' does not exist. And it does this for COM2, COM3 & COM4 too. This is a Dell Axim x30 with Wifi if that helps at all. Anyway, I cant figure out why it keeps throwing this error. If anybody has any ideas what may be going on I would love to hear em'.
Thanks
Mike

Serial Port Error: COM1: does not exist
DOTNETFantasy
You can try NETCF V2 SP1 Beta; it includes some Serial related fixes.
Could NETCF V2 serial stuff be an issue Possible but not likely since your old application can't open this port as well.
Keep in mind native error translation might be off and "does not exist" might simply mean it's not possible to open the port or it's not really a serial port.
As to colon, it’s probably full device name.
Sanjeet Sachan
OK, so I tried my old app (duh) and got the same error. However when I tried
System.IO.Ports.SerialPort.GetPortNames
when running my app it lists COM1 - COM4 Now I'm really baffeled Why would it tell my that COM1, COM2, COM3 & COM4 dont exist when I try and open a port using those COM ports Could the Seial Port Control in VS2005 be the issue I am entering that port as 'COM1' via the designer properties for Serial Port. The only subtle thing I notcied is that the error says "The port 'COM1:' does not exist. Should the colon be there I dont put it in there but the message returns it Ugg, any suggestions
Thanks!!!!
Mike
Suman_g
Ok, the plot thickens.
I created a whole new test application. Added a SerialPort control, opened the port and received data on the exact same device that is giving me the errors. It worked just fine. So I have verified that the device has a working serial/COM port.
I am also using GPS so I thought there must be some sort of conflict going on with the port so I commented out every single bit of code that had anything to do with the GPS and I am still gettting the error.
Lastly, I moved the serialport.open even so that it was the very very first thing that happened when my app loaded (to ensure that there were no other confiicts happening before hand) and it still threw the same error. This is driving me nuts. Any other sorts of conflicts come to mind
Lastly, lastly, I have also verified that the same error occurs on the client device which is the same device the old version of the app worked on.
Thanks again.
jbm
I have used this app before on many Dell Axims. I plug a scientific device into the serial port and insert information from it into the form. Think GPS. The only differences are.
1.) I updated the code to .NETCF 2.0
2.) I am using the VS 2005 serial port control (was using Charon.Communications before).
3.) My one and only testing device is a Dell Axim with Wifi. The older devices worked on COM1 but they didnt have WiFi, could that throw off the port numbering
Isnt there a way to see which ports are available on a Pocket PC
Mike
Skrostrup
That is indeed confusing, but we could rule out both device and NETCF V2 runtime as they work in your test application.
Any chance you have something going on in events as form is loaded Perhaps, another application is using this port
Steve Danielson
The most important part if what you using different device which might be legacy port free.
Does your older application work on that new Axim
You should be able to use System.IO.Ports.SerialPort.GetPortNames to get list of available ports.
I would not be surprised if it's empty as newer devices rarely have serial port and WM 5.0 doesn’t use serial port emulation over USB.
Towering
did you try the RS232-class This class works fine on my CE4.2 PC This class use the coredll.dll.
ronin_xie
Are you sure you have COM1[2,3,4] There might be no COM port at all or it might be pretty much any number, depends on particular device.