[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Which "baud"?

On Thu, Jun 08, 2000 at 10:57:09PM +0200, Johann Spies wrote:
> I am confused about what is exactly meant by the instruction in the
> documentation of my UPS: "Port must be set to run at 2400 baud"
> According to the Serial-HOWTO.gz it seems to me that even fast serial
> port run at 2400 baud:
>      baud
>         The baud rate is a measure of how many times per second a
>         signal, for instance one sent by a modem (modulator-demodulator)
>         changes. For example, a baud rate of 1200 implies one signal
>         change every 833 microseconds. Common modem baud rates are 50,
>         75, 110, 300, 600, 1200, and 2400. Most high speed modems run at
>         2400 baud. Because of the bandwidth limitations on voice-grade
>         phone lines, baud rates greater than 2400 are harder to achieve,
>         and only work under very pristine phone line quality.

That is correct.

> But when I do  stty -a -F /dev/ttyS1  I get
> speed 38400 baud; rows 0; columns 0; line = 0; etc.
>       ^^^^^

As far as your computer is concerned, it's correct.  Once it hits the
phone wire, the modem converts it (ie, modulates it) to 2400baud (though
probably at some different bps rate).

> That is clearly not the same as what is meant by the HOWTO - or is it?

Techically it is.

> So how do I make sure that the port used by my UPS runs at 2400 baud?

Set it to what stty things is 2400baud.

> Can somebody clear this up for me please?

Think of it this way: modem-to-modem is (with modern modems anyway)
effectively parallel.  There is a whole slew of frequencies sent, and
each 'pulse of frequencies' happens usually 2400 times a second.   But a
serial cable can only send (on the TxD line anyway) one bit at a time,
so if your modem-to-modem pair is doing 14 frequencies (which is what it
does for 33.6k modems) it will, in once "clock cycle" send 14 times as
much data as in one clock cycle on the serial port.

For normal serial devices (including the serial half of a modem even),
baud = bps.  For the telco side of the modem, baud and bps usually vary.

Brian Moore                       | Of course vi is God's editor.
      Sysadmin, C/Perl Hacker     | If He used Emacs, He'd still be waiting
      Usenet Vandal               |  for it to load on the seventh day.
      Netscum, Bane of Elves.

Reply to: