Archive

Posts Tagged ‘BSNL’

Easy Clarity – Connect Easily!

September 5, 2009 2 comments

‘Disconnection’ is a routine process in dial up internet. Here is an C++ snippet which dials BSNL WLL Clarity without asking for password again and again. It automatically closes on disconnection with a beep sound.

/*
 *      easyclarity.cpp
 *
 *      Copyright 2009 Ershad K  ershad92@gmail.com
 *      Licensed under GPL Version 3
 *
 *      Please change USERNAME, PASSWORD and compile with g++
 *      To compile - g++ easyclarity.cpp
 *      To execute - ./a.out
 */

#include <iostream>
#include <stdlib.h>
#include <stdio.h>

using namespace std;

int main ()
{
	char username[] = "USERNAME";
	char password[] = "PASSWORD";
	puts("\n EasyClarity - Connect wisely!  www.ershadk.wordpress.com\n\n");
	ofstream myfile;
	system("sudo wvdialconf");
	myfile.open ("/etc/widial.conf");
        myfile << "[Dialer Defaults]\nInit1 = ATZ\nInit2 = ATQ0 V1 E1 S0=0 "
               << "&C1 &D2 +FCLASS=0\nInit3 = at+crm=1;+cmux=1;+cps=33;+cta=0"
               << "\nModem Type = Analog Modem\nISDN = 0\nPhone = #777\nModem"
               << " = /dev/ttyUSB0\nUsername = "<<username<<"\nPassword = "
               <<password<<"\nBaud = 460800\nStupid Mode = 1\nAuto DNS\nCheck"
                <<" Def Route";
	myfile.close();
	system("sudo wvdial");
	cout << "\a";
	return 0;
}

How to connect BSNL Clarity in ubuntu 9.04 ?

Though we have many tools to connect BSNL Clarity in Linux Systems, unfortunately they don’t work in ubuntu 9.04 and in other lastest OS’. Here, i will explain how to get connected with BSNL clarity in ubuntu 9.04.

First, you need to edit the grub and add a line to ubuntu’s kernel. Follow the steps to do that:

sudo gedit /boot/grub/menu.lst

Modify the ubuntu’s boot configuration to like this :

title        Ubuntu 9.04
uuid        b744ea84-c1b7-4519-9223-3bb99103d42f
kernel        /boot/vmlinuz-2.6.28-11-generic root=UUID=b744ea84-c1b7-4519-9223-3bb99103d42f ro quiet splash usbserial.vendor=0x15eb usbserial.product=0x0001
initrd        /boot/initrd.img-2.6.28-11-generic

I simply added  ‘usbserial.vendor=0x15eb usbserial.product=0x0001′ to the kernel.

Next step is to install wvdial. Since the ubuntu 9.04 CD edition doesn’t have wvdial by default, we need to install it manually. Follow the steps to install it :

1. Download this file

2. Extract it in your home directory

3. Give the following commands in terminal

cd wvidal

sudo dpkg -i *.deb

4. Restart the computer

It’s done ! Now you can browse like the older versions of ubuntu by executing Mr.Dipin Krishna’s executable (./bsnlclarity in terminal after copying it in your home directory) . You can get it here. Good Luck 🙂


Categories: Experiments Tags: , , , ,