phone

WvDial With Blank Username and Password

On September 25, 2010, in Other, by evag

There are only three providers in my country that provide 3G/GPRS internet, but two of them don’t requre username and password to sign in. Before finding out that NetworkManager has a mobile broadband feature I’ve tried plenty of times to connect using Gnome-PPP and WvDial. Both they were requiring valid username and password, i.e. you can’t connect to provider which doesn’t use any authentication.
There are a lot of stories about how you can configure WvDial to send an empty username and password. But when you download its sources, you’ll find these lines of wvdialer.cc

bool WvDialer::dial()
/*******************/
// Returns false on error, or true to go asynchronous while dialing.
{
	if(stat == Online)
		return(true);
	if(stat != Idle)
	{
		// error message has already been printed elsewhere
		return(false);
	}
	if (!options.phnum)
	{
		err( "Configuration does not specify a valid phone number.\n" );
		stat = OtherError;
	}

	if (!options.login)
	{
		err( "Configuration does not specify a valid login name.\n" );
		stat = OtherError;
	}

	if (!options.password)
	{
		err( "Configuration does not specify a valid password.\n" );
		stat = OtherError;
	}
// .....

To be able to compile these sources you need WvStreams package which already exists in Ubuntu repos.

sudo apt-get install wvstreams*

Now you can comment (or remove) lines 181-191 from wvdialer.cc and compile the sources then install by running

make
make install

That’s all, now just comment (or remove) password and username fields from your WvDial configs and dial.

0
Comments
Tagged with: