You are not logged in.

#1 2013-04-10 22:08:49

luuuciano
Member
Registered: 2007-01-27
Posts: 305

Archlinux hijacked my usb printer -> No way to know ink levels

Ok, I want to use escputil to know the ink level of an epson usb printer...
But now... there is no /dev/usblpX

Using lsusb I see it listed:
Bus 005 Device 002: ID 04b8:0820 Seiko Epson Corp. Stylus CX4100/CX4200/DX4200

But... how to know its path?
Or... what to use to know the ink levels in archlinux??


I arch, you arch, he arch, she arch, we arch, they arch...

Offline

#2 2013-04-10 23:52:27

progandy
Member
Registered: 2012-05-17
Posts: 2,146

Re: Archlinux hijacked my usb printer -> No way to know ink levels

Run "udevadm monitor" in a shell, then connect your printer. This will show you the paths udev will add to your /sys tree.

Offline

#3 2013-04-11 00:15:41

luuuciano
Member
Registered: 2007-01-27
Posts: 305

Re: Archlinux hijacked my usb printer -> No way to know ink levels

Ohhh, thanks!

The udevadm monitor output was:
KERNEL[4341.771537] add      /devices/pci0000:00/0000:00:1d.7/usb3/3-4 (usb)
KERNEL[4341.773866] add      /devices/pci0000:00/0000:00:1d.7/usb3/3-4/3-4:1.0 (usb)
KERNEL[4341.775073] add      /devices/pci0000:00/0000:00:1d.7/usb3/3-4/3-4:1.1 (usb)
UDEV  [4341.827449] add      /devices/pci0000:00/0000:00:1d.7/usb3/3-4 (usb)
UDEV  [4341.833013] add      /devices/pci0000:00/0000:00:1d.7/usb3/3-4/3-4:1.0 (usb)
UDEV  [4341.836223] add      /devices/pci0000:00/0000:00:1d.7/usb3/3-4/3-4:1.1 (usb)


Then I tried:
# escputil -u -r /sys/devices/pci0000\:00/0000\:00\:1d.7/usb3/3-4/3-4\:1.1 -i

and it shows an error:
Cannot open /sys/devices/pci0000:00/0000:00:1d.7/usb3/3-4/3-4:1.1 read/write: Is a directory

mmmmmm


I arch, you arch, he arch, she arch, we arch, they arch...

Offline

#4 2013-04-11 04:24:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 12,430

Re: Archlinux hijacked my usb printer -> No way to know ink levels

Anything interesting in the output of dmesg  ??   How about the journal?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
----
How to Ask Questions the Smart Way

Offline

#5 2013-04-11 04:43:55

brebs
Member
Registered: 2007-04-03
Posts: 3,408

Re: Archlinux hijacked my usb printer -> No way to know ink levels

luuuciano wrote:

But now... there is no /dev/usblpX

Write a udev rule to create a symlink, e.g.:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0820", SYMLINK+="epson"

You'll probably want to change "lp" to whatever's relevant in Arch.

Notice that the vendor and product are as you stated:

Bus 005 Device 002: ID 04b8:0820

Also, check the permissions on the /dev/ "file" that the symlink points to.

Edit: Improved rule, after checking howto.

Last edited by brebs (2013-04-11 12:09:02)

Offline

#6 2013-04-11 07:30:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Archlinux hijacked my usb printer -> No way to know ink levels

Offline

#7 2013-04-11 10:31:56

luuuciano
Member
Registered: 2007-01-27
Posts: 305

Re: Archlinux hijacked my usb printer -> No way to know ink levels

That was before all the udev changes I think... it was easier, yep? eheheheh


Thanks a lot brebs and ewaller! will try that as soon as I can...

Last edited by luuuciano (2013-04-11 10:32:44)


I arch, you arch, he arch, she arch, we arch, they arch...

Offline

#8 2013-04-11 11:54:52

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Archlinux hijacked my usb printer -> No way to know ink levels

Maybe /dev/bus/usb/005/002?

Offline

Board footer

Powered by FluxBB