Serial Port Problem on Pocket PC 2003

M

Mihai Popescu

I wrote a simple application in MFC that uses MSComm ActiveX Control for
serial communication. This app works just fine but I have to port it to
Pocket PC. So, I wrote another simple application in C# for Pocket PC
now using a System.IO.Ports.SerialPort object with the same
communication parameters as the former: 19200,n,8,1 and on COM4.

The problem is that the latter app generates an IO exception
System.IO.FileNotFoundException cause Pocket PC 2003 SE Emulator cannot
find this port and enumerates in SerialPort.GetPortNames() only COM1,
COM3 and COM9.

This is a very strange behaviour of the emulator and I cannot see why it
cannot connect on COM4 as the MFC app.

If you have encountered the same problem or have an ideea please reply.

Thanks!
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Those classes (the ones behind System.IO.Ports) are nto supported by the CF.

Take a look at opennetcf.org for a workaroud
 
G

Ginny Caughey [MVP]

Mihai,

The serial port emulation in the emulator isn't really accurate enough for
testing. I'd suggest testing directly on the device. By the way, did you
have any success using a different com port? You may also want to ask on the
microsoft.public.dotnet.framework.compactframework newsgroup as many of us
work with serial ports all the time in our mobile apps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top