Ok. I'm still testing to get auto proxy setting script. But in the mean time, you can copy and use this simple script to dial/disconnect your Celcom 3G. Feel free to alter the script if you use other telco. I put this one under my ~/.profile, but you can also create a file, paste the script and chmod the script executable.
# This is to dial celcom3g
function celcom3g {
# Some internal functions
function celcom3gConnect {
sudo ifconfig ppp0 create
pppd call celcom3g
}
function celcom3gDisconnect {
pkill -9 pppd
sudo ifconfig ppp0 destroy
}
# Dialing function
if [[ $1 = "connect" ]];
then
echo "Connecting to Celcom3G...";
celcom3gConnect;
elif [[ $1 = "disconnect" ]];
then
echo "Disconnect from Celcom3G...";
celcom3gDisconnect;
elif [[ $1 = "restart" ]];
then
echo "Restarting Celcom3G connection...";
celcom3gDisconnect;
celcom3gConnect;
else
echo "Usage: $0 [connect|disconnect|restart]";
fi
}
So if I want to dial to Celcom 3G, I just type celcom3g connect in the console, celcom3g disconnect will disconnect the connection and celcom3g restart will disconnect and connect. Currently celcom3g restart doesn't work properly as I need to implement some pausing after disconnect before reconnecting. So, for the time being, to restart the connection, I disconnect, wait a few seconds (until the USB modem light stop blinking) then connect. I'll update this post with other enhancement if I found any. Also, make sure your pppd script is named celcom3g in your /etc/ppp/peers/ folder. Find my previous post regarding this. Enjoy. Later.
Subscribe to:
Posts (Atom)
6.5 amd64: Modify existing certbot certificates.
Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...
-
Now FreeBSD has version 6.x fer production purpose and 7 fer current. I missed quite a release nowadays. But 1 of the most important news I...
-
Update: My Updated wmiirc Status Bar Script is the recent version, there's a bit of error in the script below so you guys better take a...
-
Ok. I'm still testing to get auto proxy setting script. But in the mean time, you can copy and use this simple script to dial/disconnect...