Dear Guys,
We try to make a system, based on debian testing with MM 0.5.2, which is able
to provide the following:
it connect automatically to the mobile broadband network using ZTE or Huawei
usb modems,
it reconnects in any case, when the modem or the provider drops the connection,
it builds up the openvpn channel via the mobile broadband when ppp0 interface
is available and working well
it can make it without any user interaction
note: there is gnome, but lightdm, fluxbox, policykit, network-manager,
modem-manager, nm-applet, nmcli. Minimal system.
As I can see at this moment, we have to write our own control script, which
controls at this moment only the 2G/3G connection:
checks gsm device is ready/available
checks the wwan is on or turn it on
nm-applet setup contains auto-connect for the connection
As in the last few days I found some strange issues with the stability of the
mobile connection, I wonder how others solve this kind of problem?
Do you have any solution, recommendation? Of course the solution should be
bullet-proof :)
Here is our basic control script. The mobile connection has Autoconnect checked.
Any better idea?
Thanks, István
------------ script runs as user with nopasswd sudo or as root -----------------
#!/bin/bash
gsm_status_log="/tmp/1wire_fs/gsm_status"
# What The Fuck indicator: 0: ok, 1: connecting, 2: turn on wwan, 3: there is
no modem or unknown statu
WTF=0
SLEEPTIME=45 # 45 seconds between checks
while [ TRUE ] ; do
GSMSTATUS=`nmcli dev status | grep gsm | gawk '{print $3}'`
DATUM=`date +"%Y-%m-%d %H:%M"`
# echo "GSM_STATUS: $GSMSTATUS"
if [ "$GSMSTATUS" == "kapcsolódva" ]; then
if [ $WTF -ne 0 ] ; then
echo "$DATUM - GSM kapcsolódva." >> /var/log/gsm_status.log
WTF=0
fi
echo "UP" > $gsm_status_log
elif [ "$GSMSTATUS" == "kapcsolódás" ]; then
if [ $WTF -ne 1 ]; then
echo "$DATUM - GSM kapcsolódás folyamatban." >> /var/log/gsm_status.log
WTF=1
fi
echo "CONNECTING" > $gsm_status_log
else
if [ "$GSMSTATUS" == "leválasztva" ]; then
if [ $WTF -ne 2 ]; then
echo "$DATUM - GSM kapcsolódás indul." >> /var/log/gsm_status.log
WTF=2
fi
echo "RECONNECT" > $gsm_status_log
if [ `whoami` == "root" ]; then
nmcli nm wwan on
else
sudo nmcli nm wwan on
fi
else
if [ $WTF -ne 3 ]; then
echo "$DATUM - GSM nem található, vagy ismeretlen státusz: $GSMSTATUS" >>
/var/log/gsm_status.log
WTF=3
fi
echo "UNKNOWN" > $gsm_status_log
fi
fi
sleep $SLEEPTIME
done
_______________________________________________
networkmanager-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/networkmanager-list