#!/bin/bash
#
if [ ! -n "$1" ]
then
  echo "usage: `basename $0` nodeURL portName"
  exit 1
fi  


# suspend the driver
echo "Suspending service on port $2"
$SIAM_HOME/utils/suspendPort $*

#start serial console
echo "(Note: ^a for terminal options, ^x to exit)"
$SIAM_BIN/rconsole `$JAVA -cp $SIAM_CLASSPATH \
                   -Djava.security.policy=$SIAM_HOME/properties/policy \
                   -Dlog4j.threshold=OFF \
                   moos.operations.utils.GetRemoteSerialPortParams $1 $2`

# resume the driver
echo "Resuming service on port $2"
$SIAM_HOME/utils/resumePort $*


