summaryrefslogtreecommitdiff
path: root/tool/connect
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-04-24 12:21:46 -0700
committerJulian Blake Kongslie2022-04-24 12:21:46 -0700
commitbb7156fbbd912e79b9c53a24375f92f0cb89f281 (patch)
treea2d9d8aaef7f38c04537bbd186fe8336f4c9f0c0 /tool/connect
parentAdd a quick and dirty script to set expected RS232 terminal settings. (diff)
downloadmultipdp8-bb7156fbbd912e79b9c53a24375f92f0cb89f281.tar.xz
Make the script for setting up the TTY actually connect.
Diffstat (limited to 'tool/connect')
-rwxr-xr-xtool/connect29
1 files changed, 29 insertions, 0 deletions
diff --git a/tool/connect b/tool/connect
new file mode 100755
index 0000000..536db5b
--- /dev/null
+++ b/tool/connect
@@ -0,0 +1,29 @@
1#!/bin/bash
2
3set -eux
4
5OLD_SETTINGS="$(stty -F /dev/ttyUSB0 -g)"
6
7stty -F /dev/ttyUSB0 \
8 115200 \
9 -drain \
10 -clocal \
11 cread \
12 -crtscts \
13 cs8 \
14 cstopb \
15 -hup \
16 parenb \
17 -parodd \
18 -igncr \
19 inpck \
20 -istrip \
21 -ixany \
22 -ixoff \
23 -ixon \
24 -echo \
25 -icanon
26
27con /dev/ttyUSB0 || true
28
29stty -F "$OLD_SETTINGS"