1844839 Members
2626 Online
110233 Solutions
New Discussion

device files

 
SOLVED
Go to solution
Charles Keyser
Frequent Advisor

device files

I have for files in the dev directory (see Below)How would a file called dfaPRN237?
crw-rw-rw- 1 root root 17 0x000004 Dec 21 21:21 dfaPRN219
crw-rw-rw- 1 root root 17 0x000003 Dec 21 21:21 dfaPRN220
crw-rw-rw- 1 root root 17 0x000005 Dec 21 21:21 dfaPRN279
crw-rw-rw- 1 root root 17 0x000002 Dec 21 21:21 dfaPRN304

Thanks
-Charlie
4 REPLIES 4
Matti_Kurkela
Honored Contributor
Solution

Re: device files

I think those are not any standard names for HP-UX device files. Does your system have any non-HP hardware installed? If so, check the manuals of that hardware - a non-HP driver might use its own naming scheme and have special tools for controlling it.

They are character devices (= type c) and the major device number is 17, so you could use this command to find out which device driver is responsible for these devices:

lsdev -c 17

The standard device drivers have man pages available in section 7 of the manpage system. A non-HP driver might follow the same convention, so try "man 7 " to see if it turns up any further clues.

The ordering of minor device numbers does not match the ordering of file names, so I guess there might be a configuration file or some other method of determining what goes where. Without seeing that, it's impossible to determine what would be the correct minor number for a new dfaPRN device.

MK
MK
Charles Keyser
Frequent Advisor

Re: device files

MK
Thanks. I did fail to mention these are assoicated with Local printers. I am trying to add a nre local Printer called PRN237 and have it match to the same as I mentioned above. I tried adding a printer using the lpadmin command, but I can not get it to create the file dfaPRN237. I know somewhere I am missing a step. We create a network printer on one server then create a local printer on the same server pointing to anothe server we call theat PRN237R then I go to the server where I pointed the PRN237R and try to create the remote printer of PRN237 and trying to get the file created as above. I know this may say strange however I came into this structure of setting the orinter up to work with our application.
Thanks
Charlie
Matti_Kurkela
Honored Contributor

Re: device files

You're definitely missing a step.

The lpadmin command does not create any device files. When configuring a local printer, it will use an already-existing device file.

I ran the lsdev command I mentioned earlier in a few different HP-UX versions. In all of them, character major device number 17 is controlled by the ptys driver, i.e. these printer devices are actually pseudo-TTYs with a custom name.

A pseudo-TTY device never communicates directly with any hardware: there is always a daemon or some other process controlling the "master" side of the pseudo-TTY, allowing other processes to use the "slave" side as though it was a real physical serial port, while the real communication happens elsewhere, often over a network. Things like SSH, rlogin/remsh, telnet and even xterm windows all use pseudo-TTYs.

The standard name for e.g. character major 17, minor 0x000004 would be /dev/pty/ttyp4 or /dev/ttyp4.

The first step to solving this would be finding out how these printers actually are connected.

I *guess* you're likely to find the printers are plugged into individual print servers, which are connected to the network.

If that's true, this HP-UX system is most likely running some software created by the print server manufacturer that establishes a network connection to those print servers and presents a custom pseudo-TTY device for the use of the print spooler subsystem.

In that case, the next step would be reading the print server documentation to find out how to configure the software that communicates with them to add one more print server. Once you do that, the software will most likely create the device file for you.

Another alternative is that the printer is connected locally, but uses some custom printing protocol. In that case, the printer manufacturer has probably released some software for HP-UX that does the necessary protocol conversion and presents the /dev/dfaPRN* interface for the print spooler system. Again, find out how to configure this software to add one more printer and it will probably create the device for you.

If you need more help, please provide some hard facts to work with:
- The make and model of the new printer?
- If the old printers are different from the new one, what's the make and model of the old ones?
- If there is a print server, what's its make and model? (Obviously it isn't a HP Jetdirect.)

MK
MK
Charles Keyser
Frequent Advisor

Re: device files

MK
Thanks again. The printer is a DATAMAX label printer and it is connected to a jet direct box. I created the network printer on the server that has the Application running. I was told that I had to create a remote printer on the same server calling it PRN237R, then go to the the server the remote was pointing to and create a local printer called PRN237, the files in the /dev directory are set up as local printers and on the other server where I created the network printer there are printers called PRN219, PRN220, PRN279, PRN304 and t hen there are printers called PRN219R, PRN220R and so on. Then if I go to the other server I have the local printers set up called PRN219 and so on and they have these /dev files and all the printers are either Intermec or DATAMAX label printers.
Thanks
-Charlie