You are not logged in.
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 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
Update: added option to automatically insert new configuration into wvdial.conf .
Offline
Thank you for sharing the script, it has been very usefull ;-)
Offline
Thanks to your script I'm now connected through my mobile phone, thank you so much.
Offline
this is a nice nice one, schuay. thx for sharing!
Offline