That look almost like mine!
edit: Insure you empty that after you have received all the serial data. The last buffer may not fill up, so transmit what you have before closing the connection.
That look almost like mine!
edit: Insure you empty that after you have received all the serial data. The last buffer may not fill up, so transmit what you have before closing the connection.