summaryrefslogtreecommitdiff
path: root/package/network/utils/comgt/files
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-06-02 12:45:09 +0000
committerJohn Crispin <john@openwrt.org>2014-06-02 12:45:09 +0000
commit8e7b9741b0e622936d950a38929b0f08f35737cd (patch)
treee4b1d5328f8f3b48cbc063248015b3d28bf5d17b /package/network/utils/comgt/files
parentf91dd34ee9a3d412c9dc7ff523de56a4f5a7f66a (diff)
downloadmtk-20170518-8e7b9741b0e622936d950a38929b0f08f35737cd.zip
mtk-20170518-8e7b9741b0e622936d950a38929b0f08f35737cd.tar.gz
mtk-20170518-8e7b9741b0e622936d950a38929b0f08f35737cd.tar.bz2
comgt: add support for defining dial number in config file
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> SVN-Revision: 40942
Diffstat (limited to 'package/network/utils/comgt/files')
-rw-r--r--package/network/utils/comgt/files/3g.chat2
-rw-r--r--package/network/utils/comgt/files/3g.sh9
2 files changed, 9 insertions, 2 deletions
diff --git a/package/network/utils/comgt/files/3g.chat b/package/network/utils/comgt/files/3g.chat
index a1fa2a0..6656240 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 2dc719b..deca2c9 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 \