GNU Screen and Xmodem!

How many terms are incompatible with Google? screen (the gnu screen program) is one of them unfortunately.

How often have you found yourself needing to upload an IOS to a dead router or switch? And how often do you have to do this on a Linux or Mac based machine?

Well, here is how to use sx from the lrzsz package and gnu screen. Firstly, connect your console to screen with a command like so:

screen /dev/tty.usbserial 115200

Then begin your xmodem transfer and follow up with some fancy screen commanding

^a :exec !! sx -kb Downloads/newfirmware.bin

That is control-a and then type, without the quotes, “:exec !! sx -kb path/to/firmware.bin”

Genius! Unfortunately, sx doesn’t really come stock with my particular flavor of OS so some package manager digging was in order.

Advertisements

One response to “GNU Screen and Xmodem!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s