I am having a problem with serial port programming. I have a program that uses Com3. I use the DataReceived event handler for receiving characters from this port. When I debug my program through Visual Studio everything works as expected. However, if I disconnect my USB cable and run the Fez off a power supply the data received event does not fire when receiving characters.
To help debugging, I added a task that periodically sends out a debug message on Com3 with the value of the BytesToReceive property of Com3.
The debug string is being transmitted so the port is indeed being opened properly. If I send characters to the PandaII, the BytesToReceive is definitely increasing. So the com port seems to be functioning, its just the DataReceived event is not being called.
Doe anyone know why this would happen?