Auto reconnect interval configurable?

228 views
Skip to first unread message

wvstreams

unread,
Jul 8, 2008, 2:35:23 PM7/8/08
to WvStreams Mailing List

I seem to have a problem similar to this:

http://ubuntuforums.org/showthread.php?t=696763

So, the modem (in my case, Huawei E220) hangs up sometimes (not often,
though) and takes more than 5 seconds to reset and find that there
really is a network available. Wvdial tries to auto reconnect during
that period, cannot, and exits. Any chance of configuring the auto
reconnect interval to be something else than 5 seconds, or adding more
reconnection attemps every five seconds after the first - or do you
just have to stick to a cron job and a script that restarts the wvdial
process?

Karpetta

unread,
Jul 8, 2008, 2:43:54 PM7/8/08
to WvStreams Mailing List

Uh, and sorry for a generic nick - it is now changed.

Avery Pennarun

unread,
Jul 8, 2008, 2:44:45 PM7/8/08
to wvstrea...@googlegroups.com

The problem seems to be that this is not the original purpose of the
auto_reconnect_delay (see wvdialer.cc).

Auto Reconnect was originally designed to try *redialing*
automatically if your ISP disconnected you or if they gave a busy
signal. In case of problems connecting, wvdial has a backoff timer,
so it'll first wait 5 seconds, then longer and longer each time it
fails. That's why it's not configurable: because the timer is
self-tuning.

However, if wvdial has trouble initializing your modem, that's
considered a critical failure, because it's usually not something you
can fix simply by trying again. Or at least, that's what we thought
when we wrote it :) Apparently in your case, it would have worked
just fine if we had only waited a bit longer.

If you want to try modifying the default timeout, for now you'd have
to modify wvdial itself. Go to around line 548 of wvdialer.cc and
look for the line:

auto_reconnect_delay = 5; // start at 5 seconds

Increase the number 5 to something that sounds right to you. Let us
know if it helps, and if so, we can add an enhancement to wvdial,
basically one or both of:

1) Make the default auto_reconnect_delay configurable

2) Make modem initialization failures not fatal, so the retry backs
off just like it would if there were a dialing problem.

Have fun,

Avery

Karpetta

unread,
Jul 8, 2008, 3:32:08 PM7/8/08
to WvStreams Mailing List
> Increase the number 5 to something that sounds right to you.  Let us
> know if it helps, and if so, we can add an enhancement to wvdial,
> basically one or both of:
>
> 1) Make the default auto_reconnect_delay configurable
>
> 2) Make modem initialization failures not fatal, so the retry backs
> off just like it would if there were a dialing problem.
>
> Have fun,
>
> Avery

Okay, thanks. I'll test that once I visit again the distant, computer-
illiterate relative I set the modem/connection for, and let you know
then - I'm not giving him compilation instructions remotely, `:-O .

Avery Pennarun

unread,
Jul 8, 2008, 3:39:30 PM7/8/08
to wvstrea...@googlegroups.com
On 7/8/08, Karpetta <karp...@gmail.com> wrote:
> Okay, thanks. I'll test that once I visit again the distant, computer-
> illiterate relative I set the modem/connection for, and let you know
> then - I'm not giving him compilation instructions remotely, `:-O .

Great. I wish it were easier, but I don't think this problem has ever
been reported to us before.

Avery

Reply all
Reply to author
Forward
0 new messages