comgt: handle service mode for Huawai modems (#12039)
[openwrt/staging/chunkeey.git] / package / comgt / files / 3g.sh
index b5da54c44d51a8e24bc791152ccb6819173f55a1..9e44d0665055a6da2481e36dd94da5093611508a 100644 (file)
@@ -52,6 +52,13 @@ proto_3g_setup() {
                                export MODE="AT_OPSYS=${CODE}"
                        elif echo "$cardinfo" | grep -q "Sierra Wireless"; then
                                SIERRA=1
+                       elif echo "$cardinfo" | grep -q huawei; then
+                               case "$service" in
+                                       umts_only) CODE="14,2";;
+                                       gprs_only) CODE="13,1";;
+                                       *) CODE="2,2";;
+                               esac
+                               export MODE="AT^SYSCFG=${CODE},3FFFFFFF,2,4"
                        fi
 
                        if [ -n "$pincode" ]; then