Skip to content

Instantly share code, notes, and snippets.

@cfra
Last active November 11, 2017 01:36
Show Gist options
  • Save cfra/f4aa1cb89693e447011c12fc248690a8 to your computer and use it in GitHub Desktop.
Save cfra/f4aa1cb89693e447011c12fc248690a8 to your computer and use it in GitHub Desktop.
Automate slow Device over Serial

Automate slow Device over Serial

This describes how to push data to a device which doesn't react kindly when flooded with input.

It uses screen.

It is a hack.

It could be used for provisioning switches with config.

# cp input /tmp/screen-exchange      # Location screen reads from
# screen   /dev/ttyUSB0 115200n8     # Start screen

The following are interactions with screen:

Ctrl+A < Load screen exchange file into screen

Ctrl+A : slowpaste 50 - set delay for pasting to 50ms

Ctrl+A ] paste buffer

You might be able to check if mayhem ensued by the output in your terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment