Another method for transfering packets thru a serial port that are a little easier to understand, but admittedly less robust are the "older" protocols like XModem, Ymodem, or even ZModem. The source for these are readily available. It's even pretty easy to write your own protocol for packet transmission on a serial line, but you be re-inventing the wheel. For pure ascii I've written my own in the past and prefer a simple protocol like:
<SOH><ByteCount><DataToBeTransmitted><EOT><Checksum>
Tim Moody