Operating System - HP-UX
1831555 Members
3777 Online
110025 Solutions
New Discussion

Re: serial port parameters

 
Tarek
Super Advisor

serial port parameters

Hi all!!
I have to configure a serail port because i'm installing an UPS (Back-UPS Pro 1000 - APC: american power conversion)- i have to set the speed at 2400 and other options like -cstopb -clocal -crtscts ixon ixoff
But i don't know where to set these paramters...
The UPS's program (PowerChute plus) requires complete control of the serial port. No processes, including gettys, are allowed to access the port. Therefore, to ensure that PowerChute has exlusive control of the serial port selected for it, make sure that the port is not enabled for logins. To disable the port for logins, modify the /etc/inittab and make sure that the port si set to OFF rather than RESPAWN.
I have selected port serial 1. I entered in the /etc/inittab but i don't know which is port 1..i have the following entries:
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
#ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf
My problems are:
1) set the caracteristics of serial port 1
2) which entry in /etc/inittab regards port 1
Hope you can help me...thanks.
I'm using Visualize C200
4 REPLIES 4
Alexander M. Ermes
Honored Contributor

Re: serial port parameters

Hi there.
Check your /etc/gettydefs.
Then read the manpage, so that you can recognize the parameters in /etc/gettydefs.
Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Wade Coolidge
Occasional Contributor

Re: serial port parameters

Hello,
You will need to edit the /etc/gettydefs file.
1) make a copy of /etc/gettydefs.
2) vi /etc/gettydefs and yank the line the is for a fixed 19200 baud, then put the line.
3) change all 19200 in the line to 2400.
4) add any flags that need to be added.
5) save and exit vi.
6) run "getty -c /etc/gettydefs" to make sure the format is still good. If not copy back to saved file.

Hope this helps,
Wade
Wade Coolidge
Occasional Contributor

Re: serial port parameters

Sorry one other note.

You should change the name of the line to something like 2400UPS. Change the first 2400 and the last 2400 in the line to 2400UPS. Then use 2400UPS in /etc/inittab and your gettydef.
Thirumalai Ulaganathan
Occasional Advisor

Re: serial port parameters

Hi,

you can use the port ttyp1 and configure it through getty as desired parameters you want.