Jump to content

Photo

[SOLVED] Check printer ink levels

printer ink

  • Please log in to reply
9 replies to this topic

#1 a.m.slade

a.m.slade

    Member

  • Members
  • 4 posts

Posted 03 April 2016 - 01:48 PM

I am trying to check the ink levels in my Epson XP-322 printer under bodhi 2.4 as follows:

 

sudo modprobe usblp

sudo escputil -i -r /dev/usb/lp0

 

and I receive the message:

 

Unknown printer XP-322 323 325 Series!

 

which is, perhaps, unsurprising since there is no such device as /dev/usb/lp0

although I am sure this used to work with my previous Epson 740 printer.

 

The nearest device I can find that looks like a printer is /dev/bus/usb/001/002

 

but when I type (after the 'modprobe') sudo escputil -i -r /dev/bus/usb/001/002

I receive the message:

 

Cannot write to /dev/bus/usb/001/002: Invalid argument

 

The device file's ownership and permissions are: root lp crw-rw-r--+

and I am a member of the group 'lp'.

 

I would be very grateful if anyone can help me towards a solution for this. ('mtink' doesn't work either, by the way).

 

Please forgive any etiquette faults from this new forum user (aged 95!)





A big thank you to everyone who contributes to Bodhi Linux


#2 graywizardlinux

graywizardlinux

    Bodhi Supporter

  • Members
  • 721 posts

Posted 03 April 2016 - 01:57 PM

Seriously 95!!!!!!   Welcome!!!!

 

I am deeply impressed if that is the case!!!!!

 

I have no help to offer since i am a non-techie re: linux commnad line stuff but there are a number of knowledgeable and helpful people here!



#3 a.m.slade

a.m.slade

    Member

  • Members
  • 4 posts

Posted 07 April 2016 - 10:50 AM

Yes, really 95 (though I had a little help from my nephew, a youngster of 66). Thanks for the welcome, graywizardlinux. I remain hopeful that someone may have a solution, although I have now discovered (by myself!) that the Epson XP-322 has a front panel ink level check feature buried several layers down in the menu structure.



#4 graywizardlinux

graywizardlinux

    Bodhi Supporter

  • Members
  • 721 posts

Posted 07 April 2016 - 11:41 AM

Great news! I was hoping someone would have helped you by now.  Sorry i do not have the skill set to help with such things!  :)  :)  :)



#5 ylee

ylee

    King of the Software Page

  • Moderators
  • 1476 posts
  • LocationSouth Carolina, USA

Posted 09 April 2016 - 02:50 PM

Does the printer work? Does it print in Bodhi?

 

Have you installed drivers for it? I assume you have bodhi-printing installed ...


"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#6 graywizardlinux

graywizardlinux

    Bodhi Supporter

  • Members
  • 721 posts

Posted 09 April 2016 - 03:15 PM

Thanks ylee.   wish i knew more to help him out.

 

:-))))



#7 aka jazz

aka jazz

    Member

  • Banned
  • 611 posts

Posted 13 April 2016 - 12:51 PM

ok, there are other ways to get help too, not just the forums. Go to synaptic and look up escputil; not everyone is familiar with this brand of printer or mushroom (see?), select properties, and go to installed files. It will list all the bits and pieces that came with escputil, including helpful stuff like documentation and online manuals. On a terminal , you can try man escputil.
 
For usb devices, these are set up on-the-fly, and that is why those parameters don't stay the same when the device is unplugged, then reconnected. One of the places to clue you in wth that bit is system messages, the tail end, so entering dmesg | tail on the terminal will inform you what to use with escputil so you won't have to guess, like what you're doing now. Something more realistic than /dev/bus/usb/blabla.
 
But that's a start.
 
Must apologize for the inconsistent fontstyles. I need to replace this laptop soon. Let us know how far you can take this lead. Another reason I try to stay away from forums and trackpads :angry:(or touchpads, whatever)
 
You sir, on the other hand, have the burden of proving that the saying about "old dog" and "new tricks" is the real problem that needs to be dealt with.


Edited by ylee, 13 April 2016 - 09:51 PM.
Fixed font weirdness

Screenshots of e17 at the Gallerie des shedied and here for just one only. Incidentally,why don't you try our friendly IRC channel for some help? (link up top) or watch an e-ducational clip that's 2 and a half minutes long

#8 a.m.slade

a.m.slade

    Member

  • Members
  • 4 posts

Posted 28 April 2016 - 03:04 PM

Apologies for the delay in replying. After turning on the computer (but not the printer) I ran dmesg | tail, then turned on the printer, then ran dmesg | tail -20 and received the following:

[  457.608053] usb 1-2: new high-speed USB device number 2 using ehci_hcd
[  457.820328] usb 1-2: New USB device found, idVendor=04b8, idProduct=08bf
[  457.820337] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  457.820341] usb 1-2: Product: EPSON XP-322 323 325 Series
[  457.820349] usb 1-2: Manufacturer: EPSON
[  457.820352] usb 1-2: SerialNumber: 554444503033363186
[  458.722880] usbcore: registered new interface driver uas
[  458.743401] usblp 1-2:1.1: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x04B8 pid 0x08BF
[  458.743742] usbcore: registered new interface driver usblp
[  458.774999] Initializing USB Mass Storage driver...
[  458.780158] scsi8 : usb-storage 1-2:1.2
[  458.781412] usbcore: registered new interface driver usb-storage
[  458.781417] USB Mass Storage support registered.
[  459.783013] scsi 8:0:0:0: Direct-Access     EPSON    Storage          1.00 PQ: 0 ANSI: 2
[  459.785911] sd 8:0:0:0: Attached scsi generic sg4 type 0
[  459.798507] sd 8:0:0:0: [sdc] Attached SCSI removable disk
[  460.582375] usblp0: removed
[  460.595584] usblp 1-2:1.1: usblp0: USB Bidirectional printer dev 2 if 1 alt 0 proto 2 vid 0x04B8 pid 0x08BF
albert@desktop-1204:~$ 

I have no idea what sdc is. I was surprised to see usblp0 removed but then it seems to be re-added. Entering ls -l /dev/u* yielded:

crw-r----- 1 root root 10, 223 Apr 28 14:51 /dev/uinput
crw-rw-rw- 1 root root  1,   9 Apr 28 14:51 /dev/urandom

/dev/usb:
total 0
crw-rw---- 1 root lp 180, 0 Apr 28 14:59 lp0

so it looks as though there really is a printer at /dev/usb/lp0. I checked the man page for escputil and it said to include the option -u for new printers (mine is) so I ran the following script:

sudo modprobe usblp
sudo escputil -i -r -u /dev/usb/lp0 -q | sed -e 's/ \{2,\}/Z/g' | awk -F "Z" '1,1{sub(/Percent remaining/,"% left")};{printf "%-14s%s%5s\n",$2,"\t",$3}' | zenity --list --title "Printer Ink Levels" --text "" --column "" --height 300 --width 250 --window-icon=info --hide-header 2>/dev/null
sudo modprobe -r usblp

I realised afterwards that the -u should not come between -r and /dev/usb/lp0, which explains the subsequent message

Cannot open -u read/write: No such file or directory

so I removed the -u and re-ran the script but this time it said

Unknown printer XP-322 323 325 Series!

 

So to check, I ran ls -l /dev/usb/lp0 and it replied with

ls: cannot access /dev/usb/lp0: No such file or directory

 

It's almost as though supplying the escputil parameters in the wrong order has removed the printer!

 

According to the man page, I think the correct order is sudo escputil -r /dev/usb/lp0 -u -i so I'll try that in the next day or so and report back.



#9 aka jazz

aka jazz

    Member

  • Banned
  • 611 posts

Posted 29 April 2016 - 12:09 AM

We will help you reduce the guesswork. I have sda, sdb, sdc, etc when it comes to usb connected devices, hard drives, secsi drives on my PC but unfortunately you ignored that part (simply because you had no idea what  it meant, or never noticed a pattern) and decided to pursue the lpn part.

 

This is where CUPs comes in. You know enough, same as some smart guys did back then, with some guys branching out to code CUPS before they pulled their hair out.

 

You can do some heavy lifting by continuing this method that hundreds have done before. Or just use cups and start printing. Wasn't that your original goal? This picture says a lot more. Time to learn from old *nix guys; time to benefit from what they have sown. It has a GUI wizard to walk you through--a mix of old AND new. Like the Bodhi team, these people have sweat through the details to shrinkwrap a little treat forr us lesser mortals.


Screenshots of e17 at the Gallerie des shedied and here for just one only. Incidentally,why don't you try our friendly IRC channel for some help? (link up top) or watch an e-ducational clip that's 2 and a half minutes long

#10 a.m.slade

a.m.slade

    Member

  • Members
  • 4 posts

Posted 29 April 2016 - 03:45 PM

As stated yesterday, I tried sudo escputil -r /dev/usb/lp0 -u -i and received the reply:

 

Unknown printer XP-322 323 325 Series!
Unknown IEEE 1284.4 error number 68.

 

On reading the man page even more closely I noticed it says: "USB-connected printers sometimes fail to identify or return ink levels." This is listed as a bug. As for the additional statement that you may have to repeat the command, at the age of 95 life is too short for this "sometimes / may have to" nonsense :) .

 

So I'll continue to use the workaround in the front panel of the printer (which, by the way, prints perfectly acceptably) and I'll close this topic. Thanks to all who have contributed.







Also tagged with one or more of these keywords: printer, ink

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users