Re: Using udev as-is and device URI
T wrote:
Hi
I know that udev has the advantage that allowing people to write their own
rules for mounting the devices. But can I just use the udev as-is? Does
udev fully backward compatible with traditional /dev directory?
I have a Epson Stylus CX1500, which has been working fine. I used to check
the ink level with the command:
$ escputil --ink-level --new --raw-device /dev/usb/lp0
But now, having upgraded from Sarge to Etch, the command does not work any
more. Is it because of udev or the escputil itself? Now when the command is
issued, the printer reacted with some noise then tried to print something,
then stopped. The escputil just hangs there.
Hi. :-) I have an Epson Stylus C82 (also connected via USB). On my etch
system, the escputil command above works exactly as you have it without
any problems:
jose@sweety:~$ escputil --ink-level --new --raw-device /dev/usb/lp0
Escputil version 5.0.0-rc3, Copyright (C) 2000-2006 Robert Krawitz
Escputil comes with ABSOLUTELY NO WARRANTY; for details type 'escputil -l'
This is free software, and you are welcome to redistribute it
under certain conditions; type 'escputil -l' for details.
Ink color Percent remaining
Black 82
Cyan 6
Magenta 10
Yellow 26
jose@sweety:~$
Moreover, how does the device URI work?
To be specific, after upgrading from Sarge to Etch, I configured my CUPS the
Sarge way, and it works great. Then I found that there is an auto-detected
printer, so I give it a try too. However, no matter how I tweak it, it just
refuses to work. The following list is the 2 CUPS printer in my system. The
1st works, the 2nd doesn't. The only difference that I can tell now is the
device URI.
I also used the auto-detection function when configuring my printer.
Here's what CUPS (http://localhost:631) says:
*
Description:* Stylus-C82---CUPS+Gutenprint-v5.0.0-rc3
*Location:*
*Make and Model:* Epson Stylus C82 - CUPS+Gutenprint v5.0.0-rc3
*Printer State:* idle, accepting jobs, published.
*Device URI:* usb://EPSON/Stylus%20C82
What's really interesting is that though the printer has a device URI,
it can also be accessed via /dev/usb/lp0.
Please help
thanks
epson_cx1500:
Description: Epson Stylus CX1500
Location: USB Printer #1
Make and Model: Epson Stylus CX1500 - CUPS+Gutenprint v5.0.0-rc3
Printer State: idle, accepting jobs, published.
Device URI: usb://EPSON/Stylus%20CX1500
USB_Printer_1:
Description: EPSON
Location: Local Printer
Make and Model: Epson Stylus CX1500 - CUPS+Gutenprint v5.0.0-rc3
Printer State: idle, accepting jobs, published.
Device URI: epson:/dev/usb/lp0
A couple of things that I've noticed on my system that may be helpful to
you (I'm sure you probably know some of them, but anyways!): :)
1) The device files (I found one at /dev/usb/lp0 and another at
/dev/bus/usb/001/002) disappear when the printer is turned off (They
reappear when the printer is turned on, however, the one at
/dev/bus/usb/001/ reappears as a different name eg. /dev/bus/usb/001/003)
2) I've found that if a user is not in the lp group, he/she cannot
access the printer (directly through escputil or otherwise)
3) If the printer is off, the device files are not present (at least on
my system).
I'm no expert on device URI's but I've found that the hal-device-manager
command (found in the similar named package) is quite useful.
I'm sure I haven't answered your questions, but I hope some of this info
helps.
Take care.
Sincerely
Jose
Reply to: