SerialPort IOException

  • Thread starter Thread starter Andreja ®itnik
  • Start date Start date
A

Andreja ®itnik

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
 
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 thatCOM 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 thiscase when i reinstall WINCE image on device i see this error less!
 
Back
Top