Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think SNMP is the correct approach. Most printers implement the <a href="http://www.oidview.com/mibs/0/Printer-MIB.html" rel="noreferrer">standard printer MIB</a> and the <a href="http://www.faqs.org/rfcs/rfc1213.html" rel="noreferrer">RFC 1213 MIB</a> so any property you can get from there is going to be model independent. For instance, if you look for the serial number your property is probably prtGeneralSerialNumber 1.3.6.1.2.1.43.5.1.1.17</p> <p>For other properties you are going to need to search in the specific MIBs, for instance in the <a href="http://www.oidview.com/mibs/11/HP-LASERJET-COMMON-MIB.html" rel="noreferrer">HP Laserjet MIB</a> you have a lot of stuff like <em>printed-media-usage, printed-media-simplex-count, printed-media-duplex-count, usage-average-toner-coverage, scanned-media-usage, total-color-page-count.....</em></p> <p>To use SNMP the most extended library is <a href="http://www.net-snmp.org/" rel="noreferrer">Net-SNMP</a> but it uses a C API and I don't recommend it if you need to use it in heavy multithreaded applications or using SNMPv3. There are other libraries like <a href="http://www.snmpsharpnet.com/" rel="noreferrer">link text</a> that look very promising, but most of the reliable libraries out there commercial and not very cheap.</p> <p>All the above is quite easy to implement if the printer is network connected, now if <strong>the printer is USB or PPI connected</strong> you need to get your hands into the HP SNMP Proxy Agent, you can find a great post <a href="http://forums.cacti.net/about28459.html&amp;highlight=" rel="noreferrer">here</a>. It says that basically it is <em>a little Windows software that piggy-backs on the standard Windows SNMP service and provides SNMP data on the default HP printer connected to a computer via USB or parallel cable</em>. I don't know if it works with any other brands but it looks like it uses the standard protocol DOT4 over USB to emulate typical TCP/IP communications. If there is any standard method to connect to all those printers this one is the most promising. Another method that I can think of is to hack the individual drivers of each model to see if they provide such information (which most certainly do) and make the respective calls to them to get it, but on this task I think that you are on your own.</p> <p><strong>EDIT</strong></p> <p>With driver hacking I mean reverse engineering probably the tools of each driver. For example, if a printer has a utility that shows the toner status try to understand how it works, I would start using <a href="http://www.dependencywalker.com/" rel="noreferrer">Depends</a> to open the executable and see which dlls it is using and what methods they publish, if you find a method like GetTonerStatus in the dll it is worth to try to use it.</p> <p><a href="http://www.dependencywalker.com/snapshot.png" rel="noreferrer">alt text http://www.dependencywalker.com/snapshot.png</a></p> <p>If the tool is written in .Net it much easier because yo can have access to the source code by decompiling it (I don't know about legal issues of this method). Use <a href="http://www.red-gate.com/products/reflector/" rel="noreferrer">reflector</a> to do it and you will see it clearly.</p> <p><a href="http://corypeters.net/wp-content/uploads/netReflector.gif" rel="noreferrer">alt text http://corypeters.net/wp-content/uploads/netReflector.gif</a></p> <p>There is a great book that covers this aspects called <a href="http://www.amazon.co.uk/Reversing-Secrets-Engineering-Eldad-Eilam/dp/0764574817/ref=wl_it_dp_o?ie=UTF8&amp;coliid=ITZSUKF71IHAM&amp;colid=1B5WTIKAWZR28" rel="noreferrer">Reversing: Secrets of Reverse Engineering</a></p> <p>As said before this is a long path but probably the only one to achieve what you want to do, you might want to reconsider the viability of project after investigating a bit the topics I mentioned.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload