Last active
July 31, 2020 17:10
-
-
Save rlcamp/8cd286056fc9f913ab618e78eec52325 to your computer and use it in GitHub Desktop.
Get around the "stty not persistent" issue on macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get around the "stty not persistent" issue on macOS (works fine on linux too) | |
# Usage: ./catty.sh /dev/cu.SLAB_USBtoUART 115200 | |
exec 3<>$1 | |
stty speed $2 <&3 >/dev/null | |
exec cat <&3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./zmodem_get.sh /dev/cu.SLAB_USBtoUART 115200 /path/to/remote/filename | |
# assuming the far end of the serial device is already sitting at a prompt | |
exec 3<>${1} | |
stty speed ${2} <&3 1>/dev/null | |
echo "sz -b -e ${3}" >&3 | |
exec rz >&3 <&3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ./zmodem_put.sh /dev/cu.SLAB_USBtoUART 115200 /path/to/local/filename | |
# assuming the far end of the serial device is already sitting at a prompt | |
exec 3<>${1} | |
stty speed ${2} <&3 1>/dev/null | |
echo "rz" >&3 | |
exec sz -b -e ${3} >&3 <&3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment