#!/bin/bash
# Copyright 2013 Monterey Bay Aquarium Research Institute, all rights reserved.
# Put radios in "CDMA coverage map" mode. 

# Kill instances of syncDorado and syncBeach
pid=`ps -eaf | grep syncDorado | grep -v grep | awk '{print $2}'`
kill $pid

pid=`ps -eaf | grep syncBeach | grep -v grep | awk '{print $2}'`
kill $pid

# Turn off AUV radio
fwOff

# Disconnect CDMA ppp, power off radio
cdmaOff

# Leave console ON!

# Turn on CDMA modem, but don't start ppp
/home/smc/bin/SetPowerSwitch 2 1

# Read and log CDMA modem RSSI
python -u /home/hotspot/smc-script/modemtest.py /dev/ttyLX1 115200 5 0 >> /opt/hotspot/logs/cdmaRSSI.log &


