home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / linux / 17476 < prev    next >
Encoding:
Text File  |  1992-11-21  |  2.5 KB  |  63 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!daemon
  3. From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  4. Subject: Re: serial ports are broken in p4!
  5. Message-ID: <1992Nov21.200132.21794@athena.mit.edu>
  6. Sender: daemon@athena.mit.edu (Mr Background)
  7. Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  8. Organization: The Internet
  9. Date: Sat, 21 Nov 1992 20:01:32 GMT
  10. Lines: 51
  11.  
  12.    From: Jim.Corbett@f35.n152.z1.fidonet.org (Jim Corbett)
  13.    Date: Wed, 18 Nov 1992 12:30:03 -0800
  14.  
  15.    I found that a cable I was using caused my serial connection between
  16.    Kermit 
  17.    on linux and Kermit on a MS-DOS PC.
  18.  
  19.    The cable worked fine w/0.98pl1 not with pl2-pl5.
  20.  
  21.    I believe it is pin 4, old cable was 2-3, 3-2, 4-4, 6-20 and 7-7.
  22.    New cable is 2-3, 3-2 and 7-7 and works fine.
  23.  
  24. 4-4 sounds suspicious; I doubt that was right!  A "correct" null modem
  25. cable would have done something like this:
  26.  
  27.     1 - 1 (protective ground)
  28.     2 - 3 (TX->RX)
  29.     3 - 2 (RX->TX)
  30.     4 - 5 (RTS->CTS)
  31.     5 - 4 (CTS->RTS)
  32.     6 - 20 (DSR->DTR)
  33.     7 - 7 (Ground)
  34.     20 - 6 (DTR-DSR)
  35.  
  36. What you probably saw happening is that after 0.98pl1, Linux started
  37. supporting hardware handshaking, which is one more thing to get right.
  38. The hueristic used by Linux is that if DSR is asserted, then Linux
  39. assumes that hardware handshaking is enabled; that is, it will only send
  40. characters if the remote side has signal that it is OK to do so using
  41. the RTS/CTS lines.  If DSR is not asserted, then the assumption is that 
  42. the remote side probably doesn't understand hardware handshaking, and so
  43. Linux will not look at the RTS/CTS lines.
  44.  
  45. The serial driver can be forced to obey the RTS/CTS lines by doing a
  46. "stty CRTSCTS" on that particular serial line.  It can also be forced to
  47. never look at the RTS/CTS lines by doing a "stty NOCRTSCTS" on that
  48. particuliar serial port.  (Note: not all stty's support NOCRTSCTS; it is
  49. a trivial patch to stty to get it to support the new termio flag,
  50. though.)
  51.  
  52. What probably was happening was that your cable was causing DSR to be
  53. asserted, and either the RTS/CTS lines were not translated correctly, or
  54. your remote PC was not handling the hardware handshaking correctly.  It
  55. would be best to get a full cable and/or get your PC to do hardware
  56. handshaking correctly, since you need that if you want to do high speed
  57. reliable transfers.  Solving it the way you did, by getting a simple
  58. calbe that doesn't try to do anything with the DTR/DSR and CTS/RTS lines
  59. works, as you saw, but at the cost of losing hardware handshaking.
  60.  
  61.                             - Ted
  62.  
  63.