This has got to be an FAQ, but I haven't found it... I now have two USB printers, which are not identical (one is an HP 5150, which is just a printer, and the other is an HP PSC2110 printer/scanner/copier, which needs the hpoj drivers to function). At boot (or cable insertion, etc.) time, I'd like to establish symbolic links so I can hook up the right printcap entry to the right printer (and set up hpoj) easily. To do that, I need to know what the printer's name is -- I know one is /dev/usb/lp0 and one is /dev/usb/lp1, but how do I know which is which?
I've looked at .../Documentation/usb/proc_usb_info.txt, and it doesn't look like the contents of /proc/bus/usb/BBB/DDD will help me. I've written a trivial /etc/hotplug/usb/printer that just dumps the environment variables, and it doesn't seem to be in there. I've looked at printer.c and found where it generates the lp%d string, but I can't see how it exports it. In fairness, I didn't find how it exports everything else that seems to be exported on a hotplug event either, but since this doesn't seem to be getting exported, it didn't seem to be useful to look too far. I've also looked into doing it from the devfsd end; frustratingly enough, it looks like that will give me all the information hotplug won't, but none of the information hotplug will! In other words, from the hotplug end I can figure out which printer was started, but not what its name is. From the devfsd end, I can figure out its name, but not which printer it is. So: is there any reasonable way to get this information? How do other people with multiple almost-interchangeable USB devices handle this? -- Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605 Department of Computer Science FAX -- (505) 646-1002 New Mexico State University http://www.cs.nmsu.edu/~pfeiffer Southwestern NM Regional Science and Engr Fair: http://www.nmsu.edu/~scifair ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. SourceForge.net hosts over 70,000 Open Source Projects. See the people who have HELPED US provide better services: Click here: http://sourceforge.net/supporters.php _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
