mt5700 unicom isp code
This commit is contained in:
@@ -633,19 +633,27 @@ tdtech_sim_info()
|
||||
return
|
||||
fi
|
||||
|
||||
#ISP(互联网服务提供商)
|
||||
at_command="AT+COPS?"
|
||||
isp=$(sh ${SCRIPT_DIR}/modem_at.sh ${at_port} ${at_command} | grep "+COPS" | awk -F'"' '{print $2}'| tr -d '\r\n' | xargs)
|
||||
if [[ "$isp" == "4E2D56FD8054901A" ]]; then
|
||||
isp="CHN-UNICOM"
|
||||
fi
|
||||
if [ -z "$isp" ]; then
|
||||
at_command="AT^EONS=1"
|
||||
isp=$(sh ${SCRIPT_DIR}/modem_at.sh ${at_port} "${at_command}" | grep "^EONS" | awk -F'"' '{print $2}'| tr -d '\r\n' | xargs)
|
||||
if [[ "$isp" == "4E2D56FD8054901A" ]]; then
|
||||
isp="CHN-UNICOM"
|
||||
fi
|
||||
fi
|
||||
ISP_Read(){
|
||||
operatorCode=$(sendat 1 'AT^EONS=2' | awk -F ',' '{print $2}' | sed '/^$/d')
|
||||
case "$operatorCode" in
|
||||
"46000" | "46002" | "46004" | "46007" | "46008" | "46020")
|
||||
isp="中国移动"
|
||||
;;
|
||||
"46001" | "46006" | "46009")
|
||||
isp="中国联通"
|
||||
;;
|
||||
"46003" | "46005" | "46011")
|
||||
isp="中国电信"
|
||||
;;
|
||||
"46015")
|
||||
isp="中国广电"
|
||||
;;
|
||||
*)
|
||||
isp="未知运营商"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
ISP_Read
|
||||
# if [ "$isp" = "CHN-CMCC" ] || [ "$isp" = "CMCC" ]|| [ "$isp" = "46000" ]; then
|
||||
# isp="中国移动"
|
||||
# elif [ "$isp" = "CHN-UNICOM" ] || [ "$isp" = "UNICOM" ] || [ "$isp" = "46001" ]; then
|
||||
|
||||
Reference in New Issue
Block a user