Skip to main content
Topic: Serial Bugs (Read 1103 times) previous topic - next topic

Serial Bugs

My program is being activated by apparent data coming from the serial port, but there's no data in the application's buffer, it happens if I press remote buttons quickly in a row. I can easily reproduce the problem.

It wouldn't be the first time a non-character byte causes this behavior (0x1A).

Re: IR Toy & Non-Characters

Reply #1
Many of the IRToy communication modes are 8-bit, and any of the 256 possible codes are possible.  I don't understand what a "non-character" would be, since there is no guarantee that the IRToy messages are printable ASCII.

What makes it apparent to you that there is data coming from the serial port if there's no data in the buffer?  Is there some mechanism besides the buffer that provides serial information to your program?

Note that I don't do Windows, so I can't make any guesses about bugs in .NET

Re: Serial Bugs

Reply #2
I'm getting a data received event when there are zero bytes in buffer. I thought it could be a 0x1A byte (Ctrl-Z), but I can see 0x1A in the output of my application, so I suppose Microsoft fixed that bug. Also, there is a bug where the buffer is filled with 00 bytes with no known cause.

I don't know why the event is raised, I was thinking of non-characters as in the case of 0x1A triggering the event (known bug). I'll take a look at the data coming in using Portmon.