fix fm350

This commit is contained in:
windrua 2025-01-24 22:52:34 +08:00 committed by GitHub
parent d607fc1659
commit a5b61eaf02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -270,7 +270,7 @@ check_ip()
;; ;;
"mediatek") "mediatek")
check_ip_command="AT+CGPADDR=3" check_ip_command="AT+CGPADDR=3"
check_ipv6=1 mtk=1
stric=1 stric=1
;; ;;
esac esac
@ -278,7 +278,7 @@ check_ip()
esac esac
ipaddr=$(at "$at_port" "$check_ip_command" |grep +CGPADDR:) ipaddr=$(at "$at_port" "$check_ip_command" |grep +CGPADDR:)
if [ -n "$ipaddr" ];then if [ -n "$ipaddr" ];then
if [ "$check_ipv6" = "1" ] && [ "$pdp_type" = "IPv4v6" ];then if [ $mtk -eq 1 ] && [ "$pdp_type" = "IPv4v6" ];then
if ! ping -c 2 -w 5 2400:3200::1 > /dev/null 2>&1; then if ! ping -c 2 -w 5 2400:3200::1 > /dev/null 2>&1; then
m_debug "ipv6 is down,try to restart" m_debug "ipv6 is down,try to restart"
ifdown "$interface"V6 && sleep 2 && ifup "$interface"V6 ifdown "$interface"V6 && sleep 2 && ifup "$interface"V6
@ -759,6 +759,10 @@ at_dial()
cgdcont_command="AT+CGDCONT=1,\"$pdp_type\",\"$apn\"" cgdcont_command="AT+CGDCONT=1,\"$pdp_type\",\"$apn\""
;; ;;
"mediatek") "mediatek")
mtk=1
if [ "$apn" = "auto" ];then
apn="cbnet"
fi
at_command="AT+CGACT=1,3" at_command="AT+CGACT=1,3"
cgdcont_command="AT+CGDCONT=3,\"$pdp_type\",\"$apn\"" cgdcont_command="AT+CGDCONT=3,\"$pdp_type\",\"$apn\""
;; ;;
@ -768,8 +772,13 @@ at_dial()
esac esac
m_debug "dialing vendor:$manufacturer;platform:$platform; $cgdcont_command ; $at_command" m_debug "dialing vendor:$manufacturer;platform:$platform; $cgdcont_command ; $at_command"
at "${at_port}" "${cgdcont_command}" at "${at_port}" "${cgdcont_command}"
sleep 3 #修复fm350拨号失败问题 ps:350处理不过来 if [ $mtk -eq 1 ];then
sleep 3
fi
at "$at_port" "$at_command" at "$at_port" "$at_command"
if [ $mtk -eq 1 ];then
sleep 3
fi
} }
ip_change_fm350() ip_change_fm350()