summaryrefslogtreecommitdiff
path: root/tool/connect
diff options
context:
space:
mode:
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"