Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SerialPort IOException

19 views
Skip to first unread message

Andreja Žitnik

unread,
Feb 28, 2014, 2:13:39 PM2/28/14
to
Hi,

I have a problem with opening a COM port on WinCE 6 device, but only after a WiFi module has been on for a few hours (it's not plugged into that COM port). When I try to open the COM port using System.IO.Ports.SerialPort I get IOException. Things I have tried:

- restarting device. Usually doesn't change a thing.
- unplugging the WiFi module and restarting device. Usually solves the problem.
- implementing Zach's workaround on WinCE (http://zachsaw.blogspot.com/2010/07/serialport-ioexception-workaround-in-c.html). Executes OK, but I still get IOException when connecting to the port.
- Using OpenNetCF.IO.Serial.Port. Opens the port every time, can send data, but for some reason doesn't alert when response arrives i.e. doesn't receive data. System.IO.Ports.SerialPort has no problem receiving data (if it can open the port).

In both cases the settings appear to be the same (looking at DCB and COMMPROP structures).

Do you have any ideas for either:
- Fixing System.IO.Ports.SerialPort so that it will open port every time
OR
- Fixing OpenNetCF.IO.Serial.Port so that it will read from COM port.

Thank you!
Andreja

alireza....@gmail.com

unread,
Apr 26, 2014, 5:31:59 AM4/26/14
to
On Friday, February 28, 2014 10:43:39 PM UTC+3:30, Andreja Žitnik wrote:
> Hi, I have a problem with opening a COM port on WinCE 6 device, but only after a WiFi module has been on for a few hours (it's not plugged into that COM port). When I try to open the COM port using System.IO.Ports.SerialPort I get IOException. Things I have tried: - restarting device. Usually doesn't change a thing. - unplugging the WiFi module and restarting device. Usually solves the problem. - implementing Zach's workaround on WinCE (http://zachsaw.blogspot.com/2010/07/serialport-ioexception-workaround-in-c.html). Executes OK, but I still get IOException when connecting to the port. - Using OpenNetCF.IO.Serial.Port. Opens the port every time, can send data, but for some reason doesn't alert when response arrives i.e. doesn't receive data. System.IO.Ports.SerialPort has no problem receiving data (if it can open the port). In both cases the settings appear to be the same (looking at DCB and COMMPROP structures). Do you have any ideas for either: - Fixing System.IO.Ports.SerialPort so that it will open port every time OR - Fixing OpenNetCF.IO.Serial.Port so that it will read from COM port. Thank you! Andreja

hello Andreja.
i have the same problem with System.IO.Ports.SerialPort and also with OpenNETCF.IO.Serial . I try diferent ways to come over this problem. the point is as the WIN CE device work frequently more the error occures more! in this case when i reinstall WINCE image on device i see this error less!
0 new messages