summaryrefslogtreecommitdiff
path: root/tool/connect
blob: 536db5b5a3ad7ce92351f81f769437af2236adac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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"