I'm having a problem writing to my serial port some of the time. It works like a charm many times and then seems to just freeze up completely. It doesn't throw any exceptions, but the code seems to block on that line indefinitely. I've tried many things to get around this: closed and re-opened the outputstream, checked for other serial port events, etc.
I see the output from the first println but not the second. I've replaced the method call with a simple byte and it does the same thing. Only one thing seems different from the myriad previous times it works - that is that this time it follows a method that puts the thread to sleep for about 10 seconds while it waits for the data coming in the serial port to all arrive. Could that make a difference?