diff options
author | John Crispin <blogic@openwrt.org> | 2014-06-02 12:45:09 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-06-02 12:45:09 +0000 |
commit | 2c894a423418c138f9e30e9cd9f0d248655b8ce1 (patch) | |
tree | 0f1419a1c2404573cdd0067eabae01e62a1f85e0 /package/network/utils | |
parent | 60243c285a603db135c0214ff2a97d06b64126c7 (diff) | |
download | master-187ad058-2c894a423418c138f9e30e9cd9f0d248655b8ce1.tar.gz master-187ad058-2c894a423418c138f9e30e9cd9f0d248655b8ce1.tar.bz2 master-187ad058-2c894a423418c138f9e30e9cd9f0d248655b8ce1.zip |
comgt: add support for defining dial number in config file
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40942 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/utils')
-rw-r--r-- | package/network/utils/comgt/Makefile | 2 | ||||
-rw-r--r-- | package/network/utils/comgt/files/3g.chat | 2 | ||||
-rw-r--r-- | package/network/utils/comgt/files/3g.sh | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 53249031c4..89a21be3aa 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=comgt PKG_VERSION:=0.32 -PKG_RELEASE:=21 +PKG_RELEASE:=22 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz PKG_SOURCE_URL:=@SF/comgt diff --git a/package/network/utils/comgt/files/3g.chat b/package/network/utils/comgt/files/3g.chat index a1fa2a02d6..66562400f0 100644 --- a/package/network/utils/comgt/files/3g.chat +++ b/package/network/utils/comgt/files/3g.chat @@ -8,5 +8,5 @@ OK "ATE1" OK 'AT+CGDCONT=1,"IP","$USE_APN"' SAY "Calling UMTS/GPRS" TIMEOUT 30 -OK "ATD*99***1#" +OK "ATD$DIALNUMBER" CONNECT ' ' diff --git a/package/network/utils/comgt/files/3g.sh b/package/network/utils/comgt/files/3g.sh index 2dc719b2ca..deca2c95e2 100644 --- a/package/network/utils/comgt/files/3g.sh +++ b/package/network/utils/comgt/files/3g.sh @@ -13,6 +13,7 @@ proto_3g_init_config() { proto_config_add_string "apn" proto_config_add_string "service" proto_config_add_string "pincode" + proto_config_add_string "dialnumber" } proto_3g_setup() { @@ -23,6 +24,7 @@ proto_3g_setup() { json_get_var apn apn json_get_var service service json_get_var pincode pincode + json_get_var dialnumber dialnumber [ -e "$device" ] || { proto_set_available "$interface" 0 @@ -74,10 +76,15 @@ proto_3g_setup() { [ -n "$SIERRA" ] && { gcom -d "$device" -s /etc/gcom/getcarrier.gcom || return 1 } + + if [ -z "$dialnumber" ]; then + dialnumber="*99***1#" + fi + ;; esac - connect="${apn:+USE_APN=$apn }/usr/sbin/chat -t5 -v -E -f $chat" + connect="${apn:+USE_APN=$apn }DIALNUMBER=$dialnumber /usr/sbin/chat -t5 -v -E -f $chat" ppp_generic_setup "$interface" \ noaccomp \ nopcomp \ |