Bug 119374

Summary: Wvdial problem:" Cannot get information for serial port"
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Jürgen Fuhrmann <juergen-fuhrmann>
Component: NetworkAssignee: Hendrik Vogelsang <hvogel>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: juergen-fuhrmann
Version: RC 1   
Target Milestone: ---   
Hardware: 32bit   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jürgen Fuhrmann 2005-09-28 23:26:09 UTC
When using wvdial to dial out through a bluetooth modem, one gets  
 
--> WvDial: Internet dialer version 1.54.0 
--> Cannot open /dev/rfcomm0: Cannot get information for serial port. 
--> Cannot open /dev/rfcomm0: Input/output error 
--> Cannot open /dev/rfcomm0: Cannot get information for serial port. 
 
I tested this with a bluetooth cellphone after   
  
rfcomm bind 0 00:0A:D9:CA:XX:XX 1  
  
and using   
  
modem=/dev/rfcomm0  
  
in wvdial.conf.  
It seems to be sufficient to try ATZ  
  
  
I got this problem after upgrading from Suse 9.2 to 10.0.   
Google led me to the point that I am not the only one. Several  
people complained on this under different Linux systems  
   
So I downloaded the sources  of wvdial 1.54.0 and wvstreams-4.0.2   
and grepped for the message   
in wvstreams. I found it in streams/wvmodem.cc.  It occured   
in the following piece of code:   
   
#if HAVE_LINUX_SERIAL_H   
    struct serial_struct old_sinfo, sinfo;   
    sinfo.reserved_char[0] = 0;   
    if (ioctl(getrfd(), TIOCGSERIAL, &old_sinfo) < 0)   
	seterr("Cannot get information for serial port.");   
    else   
    {   
	sinfo = old_sinfo;   
	// Why there are two closing wait timeouts, is beyond me   
	// but there are... apparently the second one is deprecated   
	// but why take a chance...   
	sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE;   
	sinfo.closing_wait2 = ASYNC_CLOSING_WAIT_NONE;   
   
	if (ioctl(getrfd(), TIOCSSERIAL, &sinfo) < 0)   
	    seterr("Cannot set information for serial port.");   
    }   
#endif   
   
Comparing with an old version of wvstreams (for wvdial 1.53) led me to   
the idea to try without all of this. Voila, it worked...   
   
  
Other people seemed to have the same problem with various other  
modem types. 
 
Jürgen
Comment 1 Hendrik Vogelsang 2005-11-03 10:41:49 UTC
fixed for the next SUSE release.