LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-02-2010, 09:19 PM   #1
corone
Member
 
Registered: Jul 2009
Posts: 46

Rep: Reputation: 1
How can I make the baud rate be configured automatically?


Hi,
The /etc/inittab file is configured as the following.

Code:
# vi /etc/inittab
/sbin/getty -l /bin/login /dev/ttyS0 9600 vt100
It always makes the baud rate 9600.
How can I make the baud rate be configured automatically according to the terminal's baud rate? Can I?
 
Old 11-02-2010, 10:52 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
The majority of dumb terminals don't have any protocol for automatic baud rate negotiation.

Last edited by neonsignal; 11-02-2010 at 10:53 PM.
 
Old 11-02-2010, 11:18 PM   #3
corone
Member
 
Registered: Jul 2009
Posts: 46

Original Poster
Rep: Reputation: 1
Oh, sorry!

Oh, sorry!

Not according to the terminal's baud rate, but according to the baud rate which is configured in the bootloader automatically.
Then, is it possible?

Last edited by corone; 11-02-2010 at 11:20 PM.
 
Old 11-03-2010, 12:24 AM   #4
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by corone View Post
Not according to the terminal's baud rate, but according to the baud rate which is configured in the bootloader automatically.
It is possible, though perhaps not trivial. For example, you could write a wrapper program in C to replace getty in the /etc/inittab. The wrapper would grab the baud rate from the bootloader configuration, and then invoke the normal getty using execve.
 
Old 11-03-2010, 03:51 AM   #5
corone
Member
 
Registered: Jul 2009
Posts: 46

Original Poster
Rep: Reputation: 1
Thank you for your answer.

What I wanted to know was how to grab the baud rate from the bootloader configuration.
 
Old 11-03-2010, 06:39 AM   #6
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by corone View Post
What I wanted to know was how to grab the baud rate from the bootloader configuration.
Which bootloader are you using? grub2?
 
Old 11-03-2010, 01:47 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
first of all, what kind of terminal are you using?

I have a WYSE 150 running on /dev/ttyS0 on my machine at 19200. The WYSE terminal's firmware provides a nice menu based configuration for setting the baud rate in it's nvram.

Some older terminals have DIP switches for setting their baud rates.

In short, it is either going to be trial and error to match the entry in /etc/inittab with the baud rate of your device, or a trip to the manual of the terminal if you have it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[help]how to set baud rate up to 230400 in linux? uni_apollo Programming 1 10-25-2007 07:58 AM
serial port (and baud-rate) problem kafix Linux - Newbie 8 07-26-2007 04:54 PM
Change the network baud rate zaheer031 Linux - Software 1 05-15-2006 11:37 PM
How do I change ttyS port baud rate? joe_dejesus Linux - General 1 09-27-2001 09:50 PM
rs232 at non-standard baud rate possible? scgadgets Programming 1 09-14-2001 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration