home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10601 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  3.7 KB

  1. Path: sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!think.com!unixland!rmkhome!rmk
  2. From: rmk@rmkhome.UUCP (Rick Kelly)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: 57.6Kbps under Linux -- some results...
  5. Message-ID: <9209130031.59@rmkhome.UUCP>
  6. Date: 13 Sep 92 05:31:50 GMT
  7. Article-I.D.: rmkhome.9209130031.59
  8. References: <!nwn!6h.harp@netcom.com>
  9. Reply-To: rmk@rmkhome.UUCP (Rick Kelly)
  10. Organization: The Man With Ten Cats
  11. Lines: 77
  12.  
  13. In article <!nwn!6h.harp@netcom.com> harp@netcom.com (Gregory O. Harp) writes:
  14. >Well, since I opened my big mouth and said that 57.6Kbps probably
  15. >wasn't possible, I ended up doing some experimenting with exactly
  16. >that.
  17. >
  18. >I'll summarize for those who don't want to read the whole thing.  I
  19. >can _almost_ do 57.6Kbps with my 50Mhz 486DX.  I only have 16450
  20. >UARTs, so those of you with 16550A UARTs and very fast machines should
  21. >be able to do it.
  22. >
  23. >[WARNING!  Kernel-hacking ahead!]
  24. >
  25. >First, I had to hack the kernel serial code to handle that speed.
  26. >Linux currently only supports 38.4Kbps as "shipped."  BTW, I'm working
  27. >with version 0.97pl4 of the code, if you want to follow along.  It's a
  28. >matter of modifying the table on lines 328-330 of
  29. >kernel/chr_drv/serial.c.  This is the baud rate divisor table.
  30. >
  31. >Anyway pick an entry like the value 384, which is 300bps, and change
  32. >it to 2, which is the divisor for 57600bps.  You might want to replace
  33. >a less-common baud rate like 50 baud (the divisor to change is 2304),
  34. >but most terminal software won't support that.  BTW, if you really
  35. >want to try it, the divisor for 115Kbaud is 1, but good luck! ;)
  36. >
  37. >If you want to figure it out for yourself, the formula is:
  38. >
  39. >        divisor = 1843200 / (baud * 16)
  40. >
  41. >Once you rebuild the kernel (Remember to back up!  Oops, am I too
  42. >late? ;) ) and reboot, you should be able to tell any software that
  43. >you want to use 300 baud (or whichever entry you modified) and you
  44. >will actually be set up for 57.6Kbaud.
  45. >
  46. >Now, I tried hooking up to my Amiga 3000 at this rate.  I had some
  47. >success, but the file I downloaded was corrupted somewhat and I only
  48. >pulled about 4K/sec out of the transfer.
  49. >
  50. >My next experiement was to null-modem my two serial ports together
  51. >and do the following:
  52. >
  53. >    cat </dev/ttys0 >foo2 & 
  54. >    cat foo >/dev/ttys1
  55. >
  56. >I transferred a 1430343 byte file in 4 minutes and 9 seconds, meaning
  57. >I pulled 5744 bytes per second!  57.6Kbaud!  
  58. >
  59. >Now, once again, the file was a little corrupted, but tar was able to
  60. >identify it as a compressed archive and it at least made it through a
  61. >hundred K or so before crapping out.
  62. >
  63. >I'd be really interested in seeing what a 486DX50 with 16550A UARTs on
  64. >it can do.  If someone out there has one (or they want to swap I/O
  65. >cards with me ;) ) send me mail at harp@netcom.com and we'll talk.
  66. >
  67. >BTW, the reason I keep saying 16550A and not just 16550 is because a
  68. >glance at the code tells me that Linux is only enabling the FIFO if
  69. >the UART is the 16550A (refer to lines 265-272 of serial.c).  Linus,
  70. >can you tell us why you don't use the FIFO on the 16550?  I've
  71. >personally never used the FIFO because my projects were for 16450
  72. >UARTs, but I'm not aware of any problems.
  73. >
  74. >Oh well...  Gotta go.  Glad the weather's nice here in Dallas.  Gonna
  75. >be a nice afternoon for some horseriding!
  76.  
  77.  
  78. The NS16550 has broken FIFOs, they don't work correctly.  The NS16550A or
  79. NS16550AFN have had the bugs fixed.  The N in AFN means a ceramic case for
  80. better cooling.  JDR Microdevices has the NS16550AFN in stock with the part
  81. number listed as NS16550A.  I suspect that most reputable chip dealers sell
  82. the correct part.
  83.  
  84. There are also some Western Digital chips that claim to be 16550A compatible,
  85. but they are broken also.
  86.  
  87. -- 
  88.  
  89. Rick Kelly    rmk@rmkhome.UUCP    unixland!rmkhome!rmk    rmk@frog.UUCP
  90.