I made a script to ease the process of connecting to gCn, and it includes a nifty ASCII logo. The script also suppresses messages not dealing with errors (using grep). Feel free to use it as you would like.
Code:
Code:
#!/bin/sh
clear
echo 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv'
echo '| _________ |'
echo '| _____ \_ ___ \ ___ |'
echo '| / ___ \/ \ \/ / \ |'
echo '| / /_/ /\ \___| | \ |'
echo '| \___ / \_____ /___| / |'
echo '| /_____/ \/ \/ |'
echo '| |'
echo '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'
echo '------globalCALCnet v2.2------'
echo '-------By: Kerm Martian-------'
echo '-------dcs.cemetech.net-------'
echo
echo
echo
echo "Choose option"
echo "[1] Connect"
echo "[2] Quit"
echo
read -p "> " CONNECT
if [ $CONNECT = "1" ]
then
echo
echo "Input desired method of connection"
echo "[1] Direct USB"
echo "[2] Arduino-based Bridge"
echo "[3] USBHID/'10-Dollar' Bridge"
echo
read -p "> " METHOD
echo
echo "Input desired name for LOCAL gCn hub"
echo
read -p "> " NAME
echo
echo "Choose online hub"
echo "[1] IRCHub"
echo "[2] oblithub"
echo "[3] Other (Specify Custom)..."
echo
read -p "> " HUB
echo
if [ $HUB = "1" ]
then
export HUBNAME="IRCHub"
fi
if [ $HUB = "2" ]
then
export HUBNAME="oblithub"
fi
if [ $HUB = "3" ]
then
echo "Input the name of the SERVER hub to connect to"
echo
read -p "> " HUBNAME
fi
clear
echo "Ctrl+C to quit..."
echo '(Do NOT use Ctrl+Z!!!)'
echo
echo "In case of emergency, unplug the cable from the calculator,"
echo "and press [ON], [ON], [CLEAR] on the calculator to exit the"
echo "currently running Cn2.2 program."
echo
echo "When using oblithub, a key *MUST* be held down at at times"
echo "until prgmOBLITR8 has been launched on the calculator!"
echo "If no key is held down, the calc will essentially freeze."
echo
echo "Press [ENTER] to run the gCn Client application."
read CONTINUE
clear
if [ $METHOD = "1" ]
then
sudo gcnclient -l $NAME -n $HUBNAME -d d | grep "device"
fi
if [ $METHOD = "2" ]
then
sudo gcnclient -l $NAME -n $HUBNAME -d a | grep "device"
fi
if [ $METHOD = "3" ]
then
sudo gcnclient -l $NAME -n $HUBNAME -d u | grep "device"
fi
fi