home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / linux / 10548 < prev    next >
Encoding:
Text File  |  1992-09-12  |  3.2 KB  |  79 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!usc!wupost!csus.edu!netcom.com!harp
  3. From: harp@netcom.com (Gregory O. Harp)
  4. Subject: 57.6Kbps under Linux -- some results...
  5. Message-ID: <!nwn!6h.harp@netcom.com>
  6. Date: Sat, 12 Sep 92 13:26:38 GMT
  7. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  8. Lines: 69
  9.  
  10. Well, since I opened my big mouth and said that 57.6Kbps probably
  11. wasn't possible, I ended up doing some experimenting with exactly
  12. that.
  13.  
  14. I'll summarize for those who don't want to read the whole thing.  I
  15. can _almost_ do 57.6Kbps with my 50Mhz 486DX.  I only have 16450
  16. UARTs, so those of you with 16550A UARTs and very fast machines should
  17. be able to do it.
  18.  
  19. [WARNING!  Kernel-hacking ahead!]
  20.  
  21. First, I had to hack the kernel serial code to handle that speed.
  22. Linux currently only supports 38.4Kbps as "shipped."  BTW, I'm working
  23. with version 0.97pl4 of the code, if you want to follow along.  It's a
  24. matter of modifying the table on lines 328-330 of
  25. kernel/chr_drv/serial.c.  This is the baud rate divisor table.
  26.  
  27. Anyway pick an entry like the value 384, which is 300bps, and change
  28. it to 2, which is the divisor for 57600bps.  You might want to replace
  29. a less-common baud rate like 50 baud (the divisor to change is 2304),
  30. but most terminal software won't support that.  BTW, if you really
  31. want to try it, the divisor for 115Kbaud is 1, but good luck! ;)
  32.  
  33. If you want to figure it out for yourself, the formula is:
  34.  
  35.         divisor = 1843200 / (baud * 16)
  36.  
  37. Once you rebuild the kernel (Remember to back up!  Oops, am I too
  38. late? ;) ) and reboot, you should be able to tell any software that
  39. you want to use 300 baud (or whichever entry you modified) and you
  40. will actually be set up for 57.6Kbaud.
  41.  
  42. Now, I tried hooking up to my Amiga 3000 at this rate.  I had some
  43. success, but the file I downloaded was corrupted somewhat and I only
  44. pulled about 4K/sec out of the transfer.
  45.  
  46. My next experiement was to null-modem my two serial ports together
  47. and do the following:
  48.  
  49.     cat </dev/ttys0 >foo2 & 
  50.     cat foo >/dev/ttys1
  51.  
  52. I transferred a 1430343 byte file in 4 minutes and 9 seconds, meaning
  53. I pulled 5744 bytes per second!  57.6Kbaud!  
  54.  
  55. Now, once again, the file was a little corrupted, but tar was able to
  56. identify it as a compressed archive and it at least made it through a
  57. hundred K or so before crapping out.
  58.  
  59. I'd be really interested in seeing what a 486DX50 with 16550A UARTs on
  60. it can do.  If someone out there has one (or they want to swap I/O
  61. cards with me ;) ) send me mail at harp@netcom.com and we'll talk.
  62.  
  63. BTW, the reason I keep saying 16550A and not just 16550 is because a
  64. glance at the code tells me that Linux is only enabling the FIFO if
  65. the UART is the 16550A (refer to lines 265-272 of serial.c).  Linus,
  66. can you tell us why you don't use the FIFO on the 16550?  I've
  67. personally never used the FIFO because my projects were for 16450
  68. UARTs, but I'm not aware of any problems.
  69.  
  70. Oh well...  Gotta go.  Glad the weather's nice here in Dallas.  Gonna
  71. be a nice afternoon for some horseriding!
  72.  
  73. Later folks...
  74.   Greg
  75. -- 
  76. -----------------Greg-Harp----------------harp@netcom.com------------------
  77.   Love me, love my ferrets.               "Break out of the mold before
  78.   Or at least love my ferrets. ;)          the mold sets in" -- B52's
  79.