Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I work with an RS-232 device via GNU screen.

$ screen /dev/ttyUSB0 115200

At some point I need to send a local file to the device using either the xmodem or kermit protocol. On Windows I use TeraTerm which has a corresponding menu item. How can I achieve this in GNU screen?

share|improve this question

2 Answers 2

If you want to use zmodem you have to set the zmodem option to pass, if your screen session is already running, press CTRL+A : and just enter zmodem pass . To send the data just use the sz command from the lrzsz package.

If you want to receive data via screen you have to set the value to catch.

share|improve this answer

the best way to pass a file through xmodem is to use 'sx'. In debian this application is part of 'lrzsz' package.

In debian:

apt-get install screen lrzsz

screen /dev/ttyUSB0 115200

Then press Ctrl-A followed by : and type:

exec !! sx yourbinary.bin

This will send the file to ttyUSB0 over xmodem protocol

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.