-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathretrieve.sh
executable file
·35 lines (26 loc) · 941 Bytes
/
retrieve.sh
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
30
31
32
33
34
35
#!/bin/bash
# Marcel Timm, RhinoDevel, 2019aug23
# Setup some constants:
# ---------------------
SERIAL_DEVICE=/dev/ttyUSB0 # Serial device to communicate with Raspi.
BAUD_RATE=115200
# Execute script commands:
# ------------------------
echo "********************************************************************"
echo "*** CBM Tape Pi - Retrieve file from Commodore machine via Raspi ***"
echo "********************************************************************"
echo "(2019 by Marcel Timm, RhinoDevel)"
echo
echo "- Make sure that Raspi is in SAVE move (LED on)."
echo
read -s -p "Press enter key (here) to start waiting for file, then enter SAVE and press return on Commodore."
echo
echo
echo "Configuring serial device \"${SERIAL_DEVICE}\".."
echo
#
sudo bash -c "stty -F ${SERIAL_DEVICE} ${BAUD_RATE}"
echo "Starting to wait for file to be retrieved.."
echo
#
sudo bash -c "rx --ymodem < ${SERIAL_DEVICE} > ${SERIAL_DEVICE}"