Enable telnet, send command

I have Netgear Nighthawk M1 router, sometimes is drop from LTE to HSPA by network and does not automatically return to LTE
Needs to be reset to restore LTE
This router can be accessed by TELNET on port 5510 and using command AT!GSTATUS? will return output like this:

  PCC:
  LTE band:         B2
  LTE bw:           20 MHz
  SCC1:
  LTE band:         B4
  LTE bw:           5 MHz

I want to establish TELNET session between SL-1300 and MR1100, with script that sends the AT!GSTATUS? command. If the command does not return LTE band or SCC1 in the output, the Gli router resets, forcing the hotspot to reset and refresh network.

What I think need is:

Scheduling touches bash script ever 15 minutes
Script attempts to connect telnet, then send AT!GSTATUS? command
Stores output in plain text file in /root
Scheduling touches plain text file to return LTE band or SCC1 as true
If false, resets the router

please help?

You can repackage the Telnet command so that it can be executed immediately after Telnet login, for example´╝Ü

#!/bin/bash
sudo rm -rf /home/pi/.ssh/known_hosts
a=0
time=$(awk "BEGIN{print int($3 * 2 + 0.99) }")
#start
(sleep 0.5;
 if [ -n "$2" ];then
	 echo "$2 && exit"
 fi
 sleep 0.5
 while true
 do
	ps -a | grep telnet | grep -v telnet.sh 2>/dev/null 1>/dev/null
	if [ $? = 1 -o $a -ge $time ];then
		break
	fi
	sleep 0.5
	a=$(($a+1))

 done
)|telnet $1
#end