I have not noticed that they are out of order. Right now I am assuming that they are in order. I re-wrote the write-to-ram function so that it fills a buffer instead of calling uudecode() for every packet it received. It worked better, but still not good enough. Before the modification, it would get about 200-300 bytes into the 512 byte frame when it received the checksum packet. After the modification, it would get about 300-400 bytes into the 512 byte frame when it received the checksum packet. So it did help, but the packets are arriving faster than I can peel them off the hardware.
EDIT:
I should also point out that every other function seems to be working just fine. Most of the other functions have a handshake process that waits for the microcontroller to respond. The write to ram function is the only one that I have seen that sends multiple packets without an ack until the very end.
EDIT:
I should also point out that every other function seems to be working just fine. Most of the other functions have a handshake process that waits for the microcontroller to respond. The write to ram function is the only one that I have seen that sends multiple packets without an ack until the very end.