I have an HP Deskjet 1510 printer that is usb connected to an Ubuntu Server 12.04 LTS machine. In order to power on the server I use wake on lan from my smartphone. However the printer that is physically next to the server remains powered off. The printer is behaving as it's supposed to, it is designed to power off itself after a certain period of time if it's not used. The printer does have a power button on it, which I have to press if i want it to turn on.
Now since many times I wake the server just to print, having to go to the server place and power on the printer, kinda defeats the purpose of waking up the server remotely.
The printer is managed with CUPS and is working just fine when it's powered on.
Is it possible for the printer to be powered on from the usb connection? Here is what I've tried so far:
$ cupsenable HP_Deskjet_1510
This just returns (successfully I guess)
$ lpstat -v device for HP_Deskjet_1510: usb://HP/Deskjet%201510%20series?serial=CN5192F06B05XJ&interface=1 $ /usr/lib/cups/backend/usb DEBUG: list_devices DEBUG: libusb_get_device_list=6 $ usb_printerid /dev/usb/lp0 Error: No such file or directory: can't open '/dev/usb/lp0'
After each command I did 3 things:
- Check if the power led was lit on the printer, or if the printer made any sounds
- Send a page from Microsoft Word, from my main computer to print
- Check the "Printers" page in the cups web interface to see if the job was sent and registered
None of those things happened, no lit leds, no sounds, no pages been sent to cups (the job page was empty).
Since those efforts gave no results, I searched for a usb power on approach
$ lsusb Bus 002 Device 002: ID 045e:009d Microsoft Corp. Wireless Optical Desktop 3.0 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
The printer doesn't seem to be listed, only my wireless keyboard. Regardless I powered on each usb device blindly:
$ echo on > /sys/bus/usb/devices/usb1/power/level $ echo on > /sys/bus/usb/devices/usb2/power/level $ echo on > /sys/bus/usb/devices/usb3/power/level $ echo on > /sys/bus/usb/devices/usb4/power/level $ echo on > /sys/bus/usb/devices/usb5/power/level
Again the led didn't lit, and no sounds were heard. I sent a test page again and now it seems to go through cups:
$ lpstat -t scheduler is running no system default destination device for HP_Deskjet_1510: usb://HP/Deskjet%201510%20series?serial=CN5192F06B05XJ&interface=1 HP_Deskjet_1510 accepting requests since Mon 30 Nov 2015 10:51:02 PM EET printer HP_Deskjet_1510 is idle. enabled since Mon 30 Nov 2015 10:51:02 PM EET Waiting for printer to become available. HP_Deskjet_1510-122 unknown 18432 Mon 30 Nov 2015 10:55:24 PM EET
I can't correlate this with the fact that I tried usb power on, but that is the sequence I performed the steps. Through the whole procedure I randomly restarted the cups service after the steps to see if maybe that would help but it didn't
I don't think I can power it on somehow but any ideas are welcome, even the hacky ones.