HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- set speed tty
Operating System - HP-UX
1829109
Members
14018
Online
109986
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2006 02:33 PM
07-21-2006 02:33 PM
set speed tty
How can set speed to serial port to 9600, by stty commands?.
Thanks for your help
Luis Lino
Thanks for your help
Luis Lino
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2006 02:40 PM
07-21-2006 02:40 PM
Re: set speed tty
stty 9600 < /dev/ttyXX
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2006 03:44 PM
07-21-2006 03:44 PM
Re: set speed tty
After looking at your other posting, what you proabaly want to do is actually disable the logins on the port(s) and yet open the port for communication. In that case, what you should do is edit /etc/inittab and replace your "respawn" with "off" for the desired port(s). You then issue an "init q" command to force a reconfiguration of init.
Now what you need is a command that will somehow open the port and keep it open after setting a desired baudrate. This process will not terminate (unless you do a kill -15 pid) so the port will remain open for use by other processes. It fork()'s and the parent process exit so no nohup or start in background is needed.
You compile it like this:
cc holdport.c -o holdport
You use it like this:
holdport -t /dev/ttyXX -s 9600
If you also need to issue additional stty commands, they can follow the holdport because the port is now open and the stty will not hang:
e.g.
stty cs8 -ixany < /dev/ttyXX
You can then send your characters to the port, thusly:
echo "\033[A\c" > /dev/ttyXX
Now what you need is a command that will somehow open the port and keep it open after setting a desired baudrate. This process will not terminate (unless you do a kill -15 pid) so the port will remain open for use by other processes. It fork()'s and the parent process exit so no nohup or start in background is needed.
You compile it like this:
cc holdport.c -o holdport
You use it like this:
holdport -t /dev/ttyXX -s 9600
If you also need to issue additional stty commands, they can follow the holdport because the port is now open and the stty will not hang:
e.g.
stty cs8 -ixany < /dev/ttyXX
You can then send your characters to the port, thusly:
echo "\033[A\c" > /dev/ttyXX
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2006 03:45 PM
07-21-2006 03:45 PM
Re: set speed tty
Oh, by the way, holdport.c is intentionally done in K&R C so that the Bundled C Compiler will handle it although it could be converted to ANSI syntax in about 2 minutes.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP