mirror of
https://github.com/sixfab/Sixfab_PPP_Installer
synced 2025-12-06 10:23:20 +00:00
atcom line updated with suitable new atcom version
This commit is contained in:
@@ -6,17 +6,17 @@ source functions.sh
|
||||
debug "Checking APN and Modem Mode..."
|
||||
|
||||
# APN
|
||||
atcom "AT+CGDCONT?" "OK" "ERROR" 10 | grep super >> /dev/null
|
||||
atcom "AT+CGDCONT?" | grep super >> /dev/null
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
atcom "AT+CGDCONT=1,\"IP\",\"super\"" "OK" "ERROR" 10
|
||||
atcom "AT+CGDCONT=1,\"IP\",\"super\""
|
||||
debug "APN is updated."
|
||||
fi
|
||||
|
||||
atcom "AT#USBCFG?" "OK" "ERROR" 10 | grep 0 >> /dev/null
|
||||
atcom "AT#USBCFG?" | grep 0 >> /dev/null
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
atcom "AT#USBCFG=0" "OK" "ERROR" 10
|
||||
atcom "AT#USBCFG=0"
|
||||
debug "RMNET/PPP mode is activated."
|
||||
debug "Modem restarting..."
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@ function check_network()
|
||||
NETWORK_OK=0
|
||||
|
||||
debug "SIM Status:"
|
||||
atcom AT+CPIN? OK ERROR 10 | grep "CPIN: READY"
|
||||
atcom AT+CPIN? | grep "CPIN: READY"
|
||||
SIM_READY=$?
|
||||
|
||||
debug "Network Registeration Status:"
|
||||
# For super SIM
|
||||
atcom AT+CREG? OK ERROR 10 | grep "CREG: 0,5"
|
||||
atcom AT+CREG? | grep "CREG: 0,5"
|
||||
NETWORK_REG=$?
|
||||
# For native SIM
|
||||
atcom AT+CREG? OK ERROR 10 | grep "CREG: 0,1"
|
||||
atcom AT+CREG? | grep "CREG: 0,1"
|
||||
NETWORK_REG_2=$?
|
||||
# Combined network registeration status
|
||||
NETWORK_REG=$((NETWORK_REG+NETWORK_REG_2))
|
||||
|
||||
Reference in New Issue
Block a user