You are not logged in.

#1 2009-08-22 10:58:40

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

mkwvconf: simplify configuration of mobile broadband (umts/hsdpa/etc)

A short (114 lines) python script which parses the information contained in mobile-broadband-provider-info and generates a configuration for wvdial. All you need to know is the name of your broadband provider, your country code, and the location of your USB modem device (usually /dev/ttyUSB0).

The configuration is printed to stdout, the user needs to manually add the section to wvdial.conf.

This was hacked together in an hour and probably contains plenty of bugs, so you've been warned smile Maybe this can be useful to somebody.
Contributions/comments/improvements are always welcome.

Edit: some basic error checks have been added.
Edit2: generated config header is now [Dialer profilename] instead of [profilename]

github: http://github.com/schuay/mkwvconf/tree/master
aur package name: mkwvconf-git
aur package url: http://aur.archlinux.org/packages.php?ID=29534

Sample output:

Available country codes:

['ae', 'al', 'ao', 'ar', 'at', 'au', 'az', 'ba', 'bb', 'bd', 'be', 'bg', 'br', 'bs', 'bn', 'by', 'bw', 'ca', 'cd', 'cg', 'ch', 'ci', 'cl', 'cm', 'cn', 'cr', 'co', 'cz', 'de', 'dk', 'do', 'dz', 'ec', 'ee', 'eg', 'es', 'fi', 'fj', 'fr', 'gb', 'ge', 'gh', 'gr', 'gt', 'gy', 'hk', 'hn', 'hr', 'hu', 'id', 'ie', 'il', 'in', 'is', 'it', 'jm', 'jp', 'ke', 'kr', 'kw', 'kz', 'la', 'lb', 'lc', 'lk', 'lt', 'lu', 'lv', 'ma', 'md', 'me', 'ml', 'mn', 'mo', 'mt', 'mu', 'mv', 'mx', 'my', 'mz', 'ng', 'ni', 'nl', 'no', 'np', 'nz', 'om', 'pa', 'pe', 'ph', 'pk', 'pl', 'pt', 'py', 'ro', 'rs', 'ru', 'sa', 'se', 'sg', 'si', 'sk', 'sn', 'sv', 'th', 'tr', 'tt', 'tw', 'ua', 'ug', 'us', 'uy', 'uz', 'vc', 've', 'za']

Get providers for which country code? : at

Providers for 'at':

0: Max
1: Mobilkom/A1
2: T-Mobile
3: Orange
4: Three
5: Drei
6: Yesss

Choose a provider [0-6]:3
Your choice: '3'. Is this correct? Y/n: 

Enter modem location (default is /dev/ttyUSB0): 
Your choice: '/dev/ttyUSB0'. Is this correct? Y/n: 

Enter name for configuration: orange
Your choice: 'orange'. Is this correct? Y/n: 

Do you want me to try to modify /etc/wvdial.conf (you will need superuser rights)? Y/n: n

Done. Insert the following into /etc/wvdial.conf and run 'wvdial orange' to start the connection.


[Dialer orange]
Modem Type = Analog Modem
Phone = *99#
ISDN = 0
Baud = 460800
Username = web
Password = web
Modem = /dev/ttyUSB0
Init1 = ATZ
Init2 = at+cgdcont=1,"ip","web.one.at"
Stupid Mode = 1

Last edited by schuay (2009-09-26 11:33:17)

Offline

#2 2009-09-26 11:31:06

schuay
Package Maintainer (PM)
From: Austria
Registered: 2008-08-19
Posts: 564

Re: mkwvconf: simplify configuration of mobile broadband (umts/hsdpa/etc)

Update: added option to automatically insert new configuration into wvdial.conf .

Offline

#3 2009-11-01 16:58:03

Gooler
Member
Registered: 2009-11-01
Posts: 19

Re: mkwvconf: simplify configuration of mobile broadband (umts/hsdpa/etc)

Thank you for sharing the script, it has been very usefull ;-)

Offline

#4 2010-01-04 17:06:55

Mogger
Member
From: Sweden
Registered: 2008-12-07
Posts: 153
Website

Re: mkwvconf: simplify configuration of mobile broadband (umts/hsdpa/etc)

Thanks to your script I'm now connected through my mobile phone, thank you so much. smile

Offline

#5 2010-01-05 05:56:09

dw
Member
From: Vienna, Austria
Registered: 2006-11-25
Posts: 160

Re: mkwvconf: simplify configuration of mobile broadband (umts/hsdpa/etc)

this is a nice nice one, schuay. thx for sharing!

Offline

Board footer

Powered by FluxBB