Bug 23325 - wvdial and rp3 fails to init some modems
wvdial and rp3 fails to init some modems
Product: Red Hat Linux
Classification: Retired
Component: wvdial (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-01-04 11:32 EST by Need Real Name
Modified: 2007-04-18 12:30 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-15 06:13:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-01-04 11:32:06 EST
rp3 and wvdial fails when they are trying to initialize some modems. But
wvdialconf works fine. The config program send two times a "query" string
and the first one is ignored, but the second is ok:
ttyS1<*1>: ATQ0 V1 E1 -- ATQ0 V1 E1 -- OK

Some modems ignore the first thing they get sent after the program
starts... (may be some kind of weird delay after the DTR signal gets

The problem is that wvdial (and rp3) dial initialization only use a try,
and this kind of modems cannot be initialized.
I have wrote a patch and tested it with 3 different modems:Digicom v34, 
56k Bets Buy and US Robotics 56k. All works fine with the patch (without
it, only the US Robotics worked).

It's very simple: If it can be initialize the modem, try two times more :-)
Here is it:
--- wvdialer.cc.orig	Thu Jan  4 16:56:30 2001
+++ wvdialer.cc	Thu Jan  4 17:08:50 2001
@@ -460,10 +460,14 @@
 	               this_str = &options.init9;	break;
     	if( !! *this_str ) {
-    	    modem->print( "%s\r", *this_str );
-    	    log( "Sending: %s\n", *this_str );
+            int init_tries = 0;
+	    do {
+		init_tries++;
+    	    	modem->print( "%s\r", *this_str );
+    	    	log( "Sending: %s\n", *this_str );
+    	    	received = wait_for_modem( init_responses, 5000, true );
+	    } while (init_tries<=3 && received == -1); 
-    	    received = wait_for_modem( init_responses, 5000, true );
     	    switch( received ) {
     	    case -1:
     	    	err( "Modem not responding.\n" );
Comment 1 Need Real Name 2003-02-26 12:56:06 EST
Hi, I remeber this bug every time I update my redhat system (need to copy the
patched version of wvdial). Am I the only person in the world with this problem?
If true, we can close the bug...

Comment 2 Harald Hoyer 2005-07-08 11:25:57 EDT
is this still an issue?

Note You need to log in before you can comment on or make changes to this bug.