1.6 Seconds stats

This commit is contained in:
Cameron Thompson
2024-04-04 01:33:34 -04:00
committed by GitHub
parent c528e33876
commit 0eb07f75ef

View File

@@ -2,20 +2,17 @@
while true; do
# Run AT+CGMM to get the modem model
echo -en "AT+CGMM\r\n" | microcom -t 1000 /dev/ttyOUT > /tmp/modemmodel.txt
sleep 2
echo -en "AT+CGMM\r\n" | microcom -t 15 /dev/ttyOUT > /tmp/modemmodel.txt
# Run AT+CGCONTRDP once then proceed to while loop
echo -en "AT+CGCONTRDP=1\r\n" | microcom -t 1000 /dev/ttyOUT > /tmp/apn.txt
sleep 2
echo -en "AT+CGCONTRDP=1\r\n" | microcom -t 15 /dev/ttyOUT > /tmp/apn.txt
# Run AT+QUIMSLOT? to get the current sim slot
echo -en "AT+QUIMSLOT?\r\n" | microcom -t 1000 /dev/ttyOUT > /tmp/simslot.txt
sleep 2
echo -en "AT+QUIMSLOT?\r\n" | microcom -t 15 /dev/ttyOUT > /tmp/simslot.txt
# Send request to modem and wait 3 seconds for data
# Send request to modem and wait 0.03 seconds for data
echo -en "AT+QSPN;+CEREG=2;+CEREG?;+CEREG=0;+C5GREG=2;+C5GREG?;+C5GREG=0;+CSQ;+QENG=\"servingcell\";+QRSRP;+QCAINFO;+QNWPREFCFG=\"mode_pref\";+QTEMP\r\n" \
| microcom -t 3000 /dev/ttyOUT > /tmp/modemstatus.txt
| microcom -t 30 /dev/ttyOUT > /tmp/modemstatus.txt
if [ $? -eq 0 ]
then
# Parse
@@ -24,5 +21,5 @@ while true; do
/usrdata/simpleadmin/scripts/modemstatus_parse.sh
fi
fi
sleep 25 # Add a sleep to avoid CPU overload
done
sleep 1 # Add a sleep to avoid CPU overload
done