I'm developing using VS 2005 and CE 6.0 Platform Builder and C#. My target device is an eBox-2300 CEPC with two physical serial ports.
All of my code thus far works on the development PC, but I have problems when I try to deploy to my device.
I have two immediate issues that I need help with.
First, I have a routine that attempts to enumerate the serial ports on the system. The code is as follows:
********************************************************
public static string SetPortName(string defaultPortName)
{
string portName;
Console.WriteLine("Available Ports:");
foreach (string s in SerialPort.GetPortNames())
{
Console.WriteLine(" {0}", s);
}
Console.Write("COM port({0}): ", defaultPortName);
portName = Console.ReadLine();
if (portName == "")
{
portName = defaultPortName;
}
return portName;
}
**************************************************
The problem here is that I only get COM1 returned by the routine. I need and expect to also see a COM2, which is physically present and enabled in the system's BIOS.
Checking the OS design, the serial ports appear to be included. Is this an issue with the Board Support Package What else should I be looking for
The second error I get is when I try to open the serial port found in the above code, COM1.
I do a
_serialPort.Open();
and I immediately get the following error message:
An unhandled exception of type 'System.IO.IOException' occurred in System.dll
Additional information: IOException
How can I begin track down these errors
Any pointers gratefully received...

Win CE 6.0 - Serial port enumeration and ioexception on serialport.open()
e. ogas
I'm using an x86 compatible processor which boots off of a compact flash card. The CF card first boots DOS. In order to load my CE image, I use an autoexec.bat file which calls the LOADCEPC.EXE application.
LOADCEPC.EXE is a command line app which has a number of possible parameters. I use the following construct:
LOADCEPC /C:0 nk.bin
This tells it not to use the second serial port as a debug port, allowing my applications to use it.
I hope this helps.
AlexBB
Thanks for the help.
Andrew
Tej62007
Luigi Fonti
My call to serialport.open() calls, System.IO.Ports.SerialStream.SetBufferSizes(), which calls System.IO.Ports.SerialStream.CheckResult(), which throws System.IO.Ports.SerialStream.WinIOError().
Is this any help
syperk
HScottBuck
Hi
The reason why you see only one serial port instead of two is most likely because Windows CE uses the physical port COM1 as debug serial port. The port used as (kernel)debug serial port is not available to applications.
I'd suggest that you write a C++ small test program using all serial communication relared APIs. This should help to isolate the problems.
Michael
dustinto
Hi,
Iam trying to send data via serial port of CEPC to another PC's serial port.
I have WinCE 5.0 installed in my machine .
As i read this replys in the forum i came to know in CEPC serial port COM1 : is used for debugging , in order to use serial port for my application we need to disable serial for debugging purpose.
Please tell me where i need to do the changes
In my machine i have only one serial port COM1 and i want this to be used for my application.
Please help