home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!enterpoop.mit.edu!bloom-picayune.mit.edu!daemon
- From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
- Subject: Re: Do we have a comm program that supports v32bis (14,400kb)?
- Message-ID: <1992Dec12.083728.13852@athena.mit.edu>
- Sender: daemon@athena.mit.edu (Mr Background)
- Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
- Organization: The Internet
- Date: Sat, 12 Dec 1992 08:37:28 GMT
- Lines: 48
-
- From: alsaggaf@athena.mit.edu (M. Saggaf)
- Date: Fri, 11 Dec 1992 04:41:31 GMT
-
- Hmmm, I just took a look at the serial driver, and it seems that to
- set speeds above 38k, the termio B38400 bits of CBAUD have to be set
- along with another flag to substitute the desired speed for 38k. It's
- not entirely obvious to me how that flag should be set via an ioctl
- from an application program. Ted, could you please post some hints on
- how to go about this?
-
- The following is from something I sent to comp.os.linux a few months
- ago. When I have time (hah!), I'll write the short program myself to do
- these things.
-
- - Ted
-
-
- What you need to do is write a small program which does something
- roughly like this
-
- ioctl(fd, TIOCGSERIAL, &sstruct);
- sstruct.fflag &= ~ASYNC_SPD_MASK;
- #ifdef WANT_56KB
- sstruct.fflag |= ASYNC_SPD_HI; /* Use 56000 instead of 38400 */
- #else
- sstruct.fflag |= ASYNC_SPD_VHI; /* Use 115200 instead of 38400 */
- #endif
- ioctl(fd, TIOCSSERIAL, &sstruct);
-
- .... where fd is a file descriptor which is open on the serial port; and
- of course, you'll need to do error checking, which has been omitted in
- this code fragment. Also note that the Linux kernel as currently
- configured uses 56000 bps for ASYNC_SPD_HI, instead of 56700, because
- that's what's in the National Semiconduct Spec. The rest of the world
- seems to use 56700, so if you want, you can make that change in
- baud_table[] in serial.c. It actually doesn't matter, since whether you
- use 56000 or 56700, you get the same baud rate divisor, which is what's
- important anyway.
-
- After you run this program, the serial port will be sent so that when
- 38400 is selected, the actual speed of the port will really be 56000 or
- 115200. So all you need to do is tell kermit "set speed 38400";
- depending on what kermit you are using, you may need to recompile it and
- possibly modify it to force it to include support for the 38400 speed if
- it doesn't support it already.
-
- - Ted
-
-