|
|
|
@ -15,10 +15,7 @@ export HUBPORT=4 |
|
|
|
|
# powering on MCH using tnetplug, and RP using uhubctl |
|
|
|
|
# Display power-on time |
|
|
|
|
TIMESTAMP_PRETTY=$(date '+%Y-%m-%d %H:%M:%S') |
|
|
|
|
echo "MCH & RP powered on at $TIMESTAMP_PRETTY." |
|
|
|
|
# Test RP network connectivity |
|
|
|
|
# NOTE: Change $RP_HOST inside `rp_ping_test` for your own setup! |
|
|
|
|
./rp_ping_test & |
|
|
|
|
echo "MCH powered on at $TIMESTAMP_PRETTY." |
|
|
|
|
# Power on MCH |
|
|
|
|
echo "A" | nc -W1 $TNETPLUG_HOST $TNETPLUG_PORT & |
|
|
|
|
# Power on RedPitaya connected to the smart USB hub |
|
|
|
@ -34,17 +31,13 @@ nix-shell -p python3Packages.matplotlib python3Packages.numpy python3Packages.sc |
|
|
|
|
# Wait 1 minute before powering off MCH and RP |
|
|
|
|
sleep 60 |
|
|
|
|
|
|
|
|
|
# Issue shutdown on RP, and wait until RP is disconnected |
|
|
|
|
# NOTE: Change $RP_HOST, $RP_USER & $RP_KEY inside |
|
|
|
|
# `rp_shutdown` for your own setup! |
|
|
|
|
./rp_shutdown & |
|
|
|
|
# Wait 30 seconds |
|
|
|
|
sleep 30 |
|
|
|
|
|
|
|
|
|
# Simultaneously power off MCH and RP |
|
|
|
|
# Display power-off time |
|
|
|
|
TIMESTAMP_PRETTY=$(date '+%Y-%m-%d %H:%M:%S') |
|
|
|
|
echo "MCH & RP powered off at $TIMESTAMP_PRETTY." |
|
|
|
|
echo "MCH powered off at $TIMESTAMP_PRETTY." |
|
|
|
|
# Power off MCH |
|
|
|
|
echo "a" | nc -W1 $TNETPLUG_HOST $TNETPLUG_PORT & |
|
|
|
|
# Power off RedPitaya connected to the smart USB hub |
|
|
|
|