Objective: Create a bash script that checks if a certain Canon printer is connected and online (connected: true/false)
How can I do this in the terminal (or via python)? I have tried lpstat -p -d but that gives "printer idle" even though it is turned off.
It is a wifi connected printer, so maybe I could ping it?
11 Answer
I tried this command cnijnetprn --search auto and it gave the following output:
network cnijnet:/18-0C-AC-2E-EF-87 "Canon iP7200 series" "Canon-iP7200-series_18-0C-AC-2E-EF-87"If the printer is not online then I don't get any output.
I think I could use that.
1