Bug 23325 - wvdial and rp3 fails to init some modems
Summary: wvdial and rp3 fails to init some modems
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: wvdial
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-04 16:32 UTC by Need Real Name
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-15 10:13:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-01-04 16:32:06 UTC
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
raised).

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 17:56:06 UTC
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...

Thanks!

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


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