How to run hp-levels on a cups shared printer?

Asked by Maxime

I would like to show the ink level of a CUPS shared printer (network) from a computer of that network which the printer is not plug into like: computerA > server > CUPS > printerB : how to correctly run hp-levels from computerA to see the printerB ink level ? Is it possible?

Otherwise I tried to make a php script that run on the server but I can't get it to print something correct (my php script is like <?php passthru("hp-levels -i 2>&1"); ?>). It says Failed to create /var/www/.hplip and Unable to communicate with device (code=12): hp:/usb/Deskjet_5700?serial=MY4911Z0X7046W.

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Maxime
Solved:
Last query:
Last reply:
Revision history for this message
shivani mandora (shivani1708) said :
#1

hi,

code 12 error is printer busy error . please restart printer and try again.

Revision history for this message
Maxime (mxlq) said :
#2

Installed cups was an old version.
Upgrading to the latest version solved my problem.