Tuesday, October 21, 2014

Zmodem and minicom

Zmodem is a great "emergency backup" way of getting files on and off your target board when all other methods (SD card, ethernet, etc.) have stopped working or you don't have those functions yet.

In order to use Zmodem with Minicom, you need to first cross-compile the 'lrzsz' source code.

What happens if I can't get this file onto my target to begin with?   If this your situation, don't panic!  See my other serial transfers post.

Do a google search for lrzsz-0.12.20.tar.gz, untar it, and configure it with the following command:

CC=arm-linux-uclibc-gcc ./configure --host=arm-linux-uclibc --prefix=/home/andrew/lrzsz_out/

You'll obviously need to replace the CC, --host and --prefix with your own.  Then run:

make; make install

From all the binaries which are built, you're only going to need lrz (for receiving) and lsz (for sending).

If you want to receive a file (that is, get a file onto your target board), you first run the ./lrz binary from anywhere on the target's filesystem, and you'll get a message 'waiting to receive' (along with some ascii garble).

Then you press ctrl+a+z and then s , and then choose 'zmodem'.

After you select 'zmodem' and choose your file from the file browser, you'll see the file uploading to your target, with an ETA (time left).

Sending works similarly, except you use the ./lsz binary and select "receive" from the minicom menu instead.

No comments:

Post a Comment