Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using wvdial to connect to a mobile network (I have a usb modem) and it works fine. However, I wanted to automate the connection a bit (currently I am running wvdial every time I want to connect). I was wandering if there is a way to add this network to /etc/network/interfaces (in a truly Debian way) to have it connect on startup and/or whenever I connect my modem.

Any ideas anyone?

share|improve this question

3 Answers 3

Add to /etc/network/interfaces something like

auto ppp0
iface ppp0 inet wvdial

(tested on Ubuntu Lucid)

share|improve this answer
1  
On Debian wheezy works too –  Farhadix Nov 19 '13 at 8:01

You need to integrate wvdial with the ifupdown system. If you want a full shell-based solution start with The alternative PPP connection with wvdialconf. But note that Debian recommends using graphical tools like the NetworkManager for configuring network connections on GUI-based desktops.

PS: That should normally be a comment but I don't have permissions to comment yet :)

share|improve this answer
    
Regarding GUI-based tools, I am using KDE and KNetworkManager just doesn't work :( –  Grzenio Mar 13 '11 at 8:32
    
@Grzenio What do you mean by "just doesn't work"? I remember that it was very easy to create a new mobile broadband connection using the GNOME NetworkManager and set it to auto-connect. It should be similar in KNetworkManager. –  ierax Mar 16 '11 at 8:40

Try the Auto Reconnect feature of wvdial described in wvdial.conf. This option is "on" by default, so might just not work in your case.

It it does not work for you, disable it and use instead this script from ArchWiki Wvdial :

If wvdial randomly drops connection you can use script below.

#! /bin/bash
(
   while : ; do
       wvdial
       sleep 10
   done
) &
share|improve this answer
    
Hi, I found this answer in another question here - it doesn't work. The problem is, sometimes the PPPD process dies, but, wvdial stays up - so, this script won't fire as wvdial can't run twice –  William Hilsum May 18 at 7:16
    
@WilliamHilsum: If pppd is started from /etc/inittab, for example by s1:23:respawn:/usr/sbin/pppd /dev/ttyS1 115200, it will be restarted when it dies. The above script is supposed to fail and keep failing when wvdial is already running. –  harrymc May 18 at 7:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.