Aditya Kavoor’s Blog

Posts Tagged ‘dataone

HowTo: Automate start and stop BSNL router in Linux

with 9 comments

BSNL is the culprit of spreading insomnia(sleeplessness) among young India. In other words, the happy hours of BSNL free download is scheduled from 0200 hrs to 0800 hrs which results in people staying awake early in the morning and missing out on the essential sleep. This is when automation tools and schedulers come to picture.

This guide basically does you want to do at 0200 hrs and 0800 hrs with a BSNL broadband connection. This works only if your modem is configured in the bridge mode and not in the PPPoE mode, assuming most of you have port-forwarding enabled for higher download speeds which by default needs bridge mode.

OK, here we go. At 0200 hrs -

  • You want to start the internet connection
  • You want to reset your IP
  • You want to start your torrent client

and at 0800 hrs -

  • You want to stop the internet connection
  • You want to stop your torrent client

At a point when you are about to sleep, turn off the internet connection with this command in the terminal:

sudo /etc/init.d/networking stop


Now, start your torrent client and enable all downloads. The downloads will not begin since your internet is off. Remember your modem is still ON.

The main task here is to switch on the internet connection at 0200 hrs, and stop the connection at 0800 hrs and close all torrent clients and download managers. For this we use the inbuilt automation tool in Linux, cron. Open up the terminal and -

sudo crontab -e

Note that if you are running cron for the first time, it asks you to choose an editor. I strongly recommend you to use nano. Enter the following lines into the file -

05 02 * * * /etc/init.d/networking restart
55 07 * * * killall ktorrent deluge
55 07 * * * /etc/init.d/networking stop

Save and close the file. Here replace ktorrent or deluge with your favorite torrent client. Once this is done, your internet automatically restarts at 5 past 2 early morning, starts all your downloads and turns down the internet at 5 minutes to 8 and also closes down the torrent clients.

Now, you may ask how do I initially configure my internet connection in Bridge mode. Thats simple as well.

Open the terminal -

sudo pppoeconf

Follow on screen instructions, enter your BSNL username and password when asked and done, your connection is up and running and activates at every boot.

With this, you can now sleep tight. Good night.

PS: To automate stuff in the PPPoE mode, follow Madhusudan’s Guide.

Written by Aditya Kavoor

June 30, 2009 at 12:10 am

HowTo: Connect to internet in Ubuntu for DataOne

with 4 comments

This is a simple guide for connecting to internet for Ubuntu for BSNL DataOne users.

Make sure you have a lan(ethernet card). All my efforts to find a solution for usb modem have failed. Better buy a lan card, costs only 200 bucks.

Step 1: Make sure all connections are intact and power, link and lan lights are on in your modem.

Step 2: Hit Alt+F2. Type network-admin. Enter your password if you are prmopted for.

Step 3: Select Wired Connection. Then Disable roaming mode in the check box.

Step 4: Select Static IP in the drop down.

Step 5: Use the following addresses

IP adderess :  192.168.1.100

Subnet Mask : 255.255.255.0

Gateway : 192.168.1.1

Press OK.

Step 6: Select the DNS tab. Enter the following OPEN DNS.

208.67.222.222

208.67.220.220

Press OK.

Now you are done. Open Firefox and test your internet. Enjoy.

Written by Aditya Kavoor

July 14, 2008 at 9:49 am