aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/qmi-network.in26
1 files changed, 21 insertions, 5 deletions
diff --git a/utils/qmi-network.in b/utils/qmi-network.in
index 76abcfd..0f9af06 100755
--- a/utils/qmi-network.in
+++ b/utils/qmi-network.in
@@ -50,7 +50,12 @@ help ()
echo " following way (e.g. assuming APN is called 'internet':"
echo " APN=internet"
echo
- echo " 4) Once the qmi-network script reports a successful connection"
+ echo " 4) If you want to instruct the qmi-network script to use the"
+ echo " qmi-proxy setup, you can do so by configuring the following line"
+ echo " in the profile:"
+ echo " PROXY=yes"
+ echo
+ echo " 5) Once the qmi-network script reports a successful connection"
echo " you still need to run a DHCP client on the associated WWAN network"
echo " interface."
echo
@@ -93,7 +98,18 @@ load_profile ()
if [ "x$APN" != "x" ]; then
echo " APN: $APN"
+ else
+ echo " APN: unset"
fi
+
+ if [ "x$PROXY" = "xyes" ]; then
+ echo " qmi-proxy: $PROXY"
+ PROXY_OPT='--device-open-proxy'
+ else
+ echo " qmi-proxy: no"
+ fi
+ else
+ echo "Profile at '$PROFILE_FILE' not found..."
fi
}
@@ -157,7 +173,7 @@ start_network ()
exit 3
fi
- START_NETWORK_CMD="qmicli -d $DEVICE --wds-start-network=$APN $USE_PREVIOUS_CID --client-no-release-cid"
+ START_NETWORK_CMD="qmicli -d $DEVICE --wds-start-network=$APN $USE_PREVIOUS_CID --client-no-release-cid $PROXY_OPT"
echo "Starting network with '$START_NETWORK_CMD'..."
if [ "x$QMIDEBUG" != "x" ]; then
@@ -186,7 +202,7 @@ start_network ()
if [ "x$PDH" = "x" ]; then
echo "error: network start failed, no packet data handle" 1>&2
# Cleanup the client
- qmicli -d "$DEVICE" --wds-noop --client-cid="$CID"
+ qmicli -d "$DEVICE" --wds-noop --client-cid="$CID" $PROXY_OPT
clear_state
exit 2
else
@@ -204,7 +220,7 @@ stop_network ()
elif [ "x$PDH" = "x" ]; then
echo "Network already stopped; need to cleanup CID $CID"
# Cleanup the client
- qmicli -d "$DEVICE" --wds-noop --client-cid="$CID"
+ qmicli -d "$DEVICE" --wds-noop --client-cid="$CID" $PROXY_OPT
else
STOP_NETWORK_CMD="qmicli -d $DEVICE --wds-stop-network=$PDH --client-cid=$CID"
echo "Stopping network with '$STOP_NETWORK_CMD'..."
@@ -230,7 +246,7 @@ packet_service_status ()
USE_PREVIOUS_CID="--client-cid=$CID --client-no-release-cid"
fi
- STATUS_CMD="qmicli -d $DEVICE --wds-get-packet-service-status $USE_PREVIOUS_CID"
+ STATUS_CMD="qmicli -d $DEVICE --wds-get-packet-service-status $USE_PREVIOUS_CID $PROXY_OPT"
echo "Getting status with '$STATUS_CMD'..."
if [ "x$QMIDEBUG" != "x" ]; then