reading a data file through serial interface

Hi,

I’m trying to determine the easiest way for an arduino uno to read and store a file from an external piece of hardware that uses an “xmodem 1k” protocol. I want to periodically query this piece of hardware, read a binary data file, and store it to an SD card (using OpenLog or the ethernet shield with a card, whatever is easier). I have successfully created a new .txt file and appended text data from the analog inputs to my OpenLog, but it is unclear how I would write an entire binary file received over serial.

Any thoughts?

D