Operating System - HP-UX
1836770 Members
2183 Online
110109 Solutions
New Discussion

Re: Creating device ttyd0p0

 
Wong_13
New Member

Creating device ttyd0p0

Hi,

I cannot seemed to create device file ttyd0p0. When i use sam to create a new modem, I get ttyd2p0. There is only a console in the device listing under sam and I don't understand why system only allows me to create using Port 2 or 4.
6 REPLIES 6
Stephen Keane
Honored Contributor

Re: Creating device ttyd0p0

When you create /dev/tty0p0 you need to specicify a major number of 1, SAM will use the tty major number of 17. You should be able to manually create the special file using mknod

as root,

cd /dev
mknod tty0p0 c 1 0

Wong_13
New Member

Re: Creating device ttyd0p0

Even though I am able to create the device, the problem is still not solved.

Actually I am trying to get the communication link up between the HP server and the MGE UPS. I am connecting the UPS to the HP server through the 3-head cable from HP on the UPS serial port.

The MGE UPS default configuration is using tty0p0 but somehow it keeps failing me saying communication lost. Anyone has similiar encounter?
Stephen Keane
Honored Contributor

Re: Creating device ttyd0p0

Do you have a getty process running for tty0p0?

# ps -ef | grep tty0p0

should give you something like

root 2338 1 0 Jan 11 tty0p0 0:00 /usr/sbin/getty -h tty0p0 9600

this example shows that the port is operating at 9600 baud. If you do have a getty running, check the rate you UPS is expecting.
Darren Prior
Honored Contributor

Re: Creating device ttyd0p0

I'd suggest that once you're happy with the device file that you stop any processes from connecting to the port within inittab, then use Kermit or cu to connect to the UPS to check that you can communicate with it.

regards,

Darren.
Calm down. It's only ones and zeros...
Wong_13
New Member

Re: Creating device ttyd0p0

I do not know how to use cu or kermit to communicate with the UPS. Any example or help will be appreciate. Thanks in advance!
Darren Prior
Honored Contributor

Re: Creating device ttyd0p0

The basics of using kermit are:

1) type kermit
2) at the prompt type: set line /dev/tty0p0
3) set speed
4) connect
5) now type ups commands, check the manual to find out what you can use.
6) when finished use Ctrl \C to get back to the kermit prompt
7) type exit

regards,

Darren.
Calm down. It's only ones and zeros...