From bb7156fbbd912e79b9c53a24375f92f0cb89f281 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 24 Apr 2022 12:21:46 -0700 Subject: Make the script for setting up the TTY actually connect. --- tool/connect | 29 +++++++++++++++++++++++++++++ tool/setup-rs232 | 23 ----------------------- 2 files changed, 29 insertions(+), 23 deletions(-) create mode 100755 tool/connect delete mode 100755 tool/setup-rs232 diff --git a/tool/connect b/tool/connect new file mode 100755 index 0000000..536db5b --- /dev/null +++ b/tool/connect @@ -0,0 +1,29 @@ +#!/bin/bash + +set -eux + +OLD_SETTINGS="$(stty -F /dev/ttyUSB0 -g)" + +stty -F /dev/ttyUSB0 \ + 115200 \ + -drain \ + -clocal \ + cread \ + -crtscts \ + cs8 \ + cstopb \ + -hup \ + parenb \ + -parodd \ + -igncr \ + inpck \ + -istrip \ + -ixany \ + -ixoff \ + -ixon \ + -echo \ + -icanon + +con /dev/ttyUSB0 || true + +stty -F "$OLD_SETTINGS" diff --git a/tool/setup-rs232 b/tool/setup-rs232 deleted file mode 100755 index 689d838..0000000 --- a/tool/setup-rs232 +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -set -eux - -stty -F /dev/ttyUSB0 \ - 115200 \ - -drain \ - -clocal \ - cread \ - -crtscts \ - cs8 \ - cstopb \ - -hup \ - parenb \ - -parodd \ - -igncr \ - inpck \ - -istrip \ - -ixany \ - -ixoff \ - -ixon \ - -echo \ - -icanon -- cgit v1.2.3