Hello everyone!
I'm developing a application that sends and receives some data via Bluetooth virtual port.I'm using CF 2.0 SP2 and win ce 4.2(Pocket PC 2003). At the beginning I was using System.IO.Serial but when I tried to set the BaudRate to the desired value(115200) I started looking for other solution. So I tried using OpenNETCF.IO.Serial. Here is the code I use to init the port:
DetailedPortSettings portSettings = new HandshakeNone();
portSettings.BasicSettings.BaudRate = BaudRates.CBR_115200;
Port serialPort = new Port("COM6:", portSettings, bufferSize, bufferSize);
serialPort.DataReceived += new Port.CommEvent(serialPort_DataReceived);
serialPort.InputLen = 14;
serialPort.RThreshold = 11;
serialPort.SThreshold = 8;
serialPort.Open();
The application hangs on Open() call. I've done some sniffing and it seems that line:
AutoResetEvent rxevent = new AutoResetEvent(false); in
private void CommEventThread()
is to blame. The app never passes this line so it fails to release threadStarted. Any clue what is wrong?