Dear all,
First of all thank you for your time and effort to assist me. I am having trouble of understanding and finding information how to make my pc communicate with ES440 through SSH and Terminal. I have managed to found some basic commands on the USER MANUAL but I would expect to find many more stuff that I am missing (e.g. how to terminate the SSH connection).
I wrote a short script that partially works, by partially I mean that the terminal is printing the output but apart from that I can not do anything extra as a second step. My plan is to get the current status of the ES440 through the command AT!BAND? and possibly compare it with all the possible statuses and change if the AT!BAND=03 for example reboot the device and run some tests.
Since this is my first modem that I am playing around, I am not really familiar with the syntax and the commands and I can not find relative information online, at least so far. Is there a documentation that someone could reccomend to me for reading?
Sample of my code is provided bellow:
#!/bin/bash
# Simple script will send a BAND request and based on the responce
# we will be able to understand what is the current configuration.
#set -o verbose
# Echoes all commands before executing.
#clear
USR="server"
SERVER="127.0.0.1" # local Ip (sample)
# OUT="out.txt"
# ssh $USR@$SERVER ls > $OUT
ssh -T $USR@$SERVER <<\EOF
#TERM=dumb
#export TERM
myvar='AT!BAND?'
if [ $my_var == "03" ];
then
echo "Test worked!"
elif [ $REPLY != "03" ];
then
echo "Current Configuration is: All Bands."
fi
exit
EOF
Again thank you for your time and effort.