** Update: This project is now hosted on Google Code. See
http://code.google.com/p/msify/wiki/GettingStarted for more information and to download the latest version. **
I just got a new
Sify BroadBand connection. My experience with Sify Broadband proved again that using a non-Windows machine in India is not very easy. I will spare my Linux-In-India woes to another post. Now let me tell you about the tools I use to log in to Sify's network.
All Sify customers are assigned a static IP address. To be able to use Sify Broadband, we have to configure our machine to use that particualr IP address. Sify provides different client programs for different operating systems. With these programs only we can sign into their network.
Using their Linux client is a pain. The client program has two parts --
sifyd
that runs in the background, and
sifyconnect
that we can use to log into Sify's network. I was not very happy with these programs because:
- If something goes bad,
sifyd
dies. We have to manually spawn it again. And only root user can do that.
sifyconnect
will not let me pass my user name and password in the command-line. Every time, I have to type my user name and password only when it's ready to accept my input. For obvious reasons, password is read from the terminal instead of standard input. Hence I cannot write a shell script to run sifyconnect
and input my user name and password automatically.- I have to manually reconfigure my network to Sify-specified IP address etc. before I invoke
sifyconnect
.
It is fortunate that there is a third-party open source Sify Broadband client called
EasySify. I downloaded its code to find what's happening underneath. With some small experiments I could understand that they are using a really simple protocol between the client and the server. In a few hours I could write my own version of Sify client.
How is my client program different from Sify? The big difference (that matters for me) is that it delivers me what I want in the way I want it to be. :-)
My client also has two parts (no, not in any way similar to
sifyconnect/sifyd
;-). One shell script that reconfigures my network connection to match Sify's network and a Python program that actually talks to Sify server over HTTP. Both the programs take input from
~/.sify
configuration file. My
.sify
file looks like this:
[network]
interface = eth0
localip = 14.44.23.101
netmask = 255.255.255.0
gateway = 14.44.23.1
nameserver1 = 202.144.10.50
nameserver2 = 202.144.13.50
[authentication]
username = my_username
password = my_password
Once this file is ready, all I need are
set-ifconfig.sh
and
sify.py
. I put both the files in
~/bin
, which is in my
PATH
, and I am done!
When I come back from office, all I have to do is to connect the network cable and run the command
sify.py i
to log in to Sify. To disconnect, I just type
sify.py o.
Life is easier now!
If you are interested, you are free to download and use it. Before that, I must tell you a few limitations of this script:
- Your password must be specified in the config file. If you cannot do so for security reasons, this script won't work.
- You won't see good-looking output from the script. It spews out whatever XML it receives from the server.
- It works only in Linux. (Check out EasySify if you use Windows.)
Changing the script to eliminate these problems is fairly trivial. But for my usage, current version is good enough. If you think you can use this script if at all it's a bit more friendlier to the user (with improved error-handling, easy-to-understand messages etc.), let me know. I will make the changes for you.
hi buddy, Still using sify broadband? I would like get a copy of both python and shell script... if possible please send it to joesixongeorge@gmail.com. the rapid share links are broken.
ReplyDeleteThanks
Hi Anonymous,
ReplyDeleteThanks for your interest. I have moved this project to Google Code.
Look at http://code.google.com/p/msify/wiki/GettingStarted for
downloading and installation instructions.
Look at http://mankikannan.blogspot.com/2007/08/sify-broadband-client-for-linux.html
for configuring your network.