This content has been marked as final. Show 1 reply
Interesting question. I haven't done this myself and am looking forward to learning the best answer as well. Meanwhile, I can offer a quick note about what I would try.
I am assuming that the code receiving from the Port is like a TargetDataLine, and that there would be a read command in a while loop. Can you leave that running and test for the number of bytes read and use that as a condition? Or does the port return zero-filled bytes when there is no data? If so, the next option I'd consider would be to inspect the data in the read buffer for non-zero values.