Met with GM Broadband @ MTNL last Friday and he told me that their
portal software was not ready to handle NU and non NU hours for the NU
plan i.e. if the login sessions spans over NU and non NU hours, the
traffic could counted towards "additional usage" leading to the
overcharge nightmare I posted a few weeks back. He told me to turn the
modem off/on @ 00:00 and 08:00 which would create fresh login sessions
until the portal vendor provides them with a fix (this method was also
discussed in this list).
Fortunately, with a Linux/*nix box, the following script can automate
this annoying chore. You need expect and tcl packages installed in your
box.
Enjoy,
-- Arun Khan
<script>
#!/usr/bin/expect -f
###########################################################################
# Name: dsl502t-reboot (install in /usr/local/bin, owner:group root.root
# and file perms 700)
# Purpose: Reboot the DLink 502T ADSL modem/router
# Author: Arun Khan (knura at yahoo dot com)
# Warranty: None - if it breaks your system, you get to keep all the #
pieces :)
# Usage: Create a file with the following lines and install it in
# /etc/cron.d - do not forget to remove "#" for the 2 entries
###########################################################################
# reboot MTNL ADSL modem
#1 0 * * * root /usr/local/bin/dsl502t-reboot
#59 7 * * * root /usr/local/bin/dsl502t-reboot
###########################################################################
# change the ip number if different
spawn telnet 192.168.1.1
expect "ogin:" { send "root\r" }
# change the password if different
expect "ssword:" { send "admin\r" }
expect "#" { send "reboot\r" }
expect eof
</script>