Very New to SNMP need some help from a kind soul... - SNMP

This is a discussion on Very New to SNMP need some help from a kind soul... - SNMP ; Hello, I have been working with a company on an internet printing application that prints items from a catalog in their print center. All of that is working fine, but now they want to reconcile the print jobs with the ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Very New to SNMP need some help from a kind soul...

  1. Very New to SNMP need some help from a kind soul...

    Hello,
    I have been working with a company on an internet printing application that
    prints items from a catalog in their print center. All of that is working
    fine, but now they want to reconcile the print jobs with the actual counts
    from their printers. So, I need to query the printer and get the page
    counts periodically. It looks to me like SNMP is the way to do this, but I
    have no idea how to get started.
    The Application is written in VB.Net and ASP.NET. All of the printing is
    done through a .NET web service. In the service I am using the WinAPI
    functions to do the actual printing, so I am not opposed to using other
    Win32 API calls to accommodate this. But, I do need to code this in some
    Microsoft environment, preferably VB.NET or C#. I have no problems writing
    the interops to any Win32 functionality, so if you have some examples in
    that environment, that would be great.
    So, can some kind soul point me in the right direction to get started? I'm
    trying to get the MIBs for the printers (Konica 1050 BizHub and a Canon
    CLC4000 with an EFI Fiery Controller), but when I do, I still have no idea
    what to do with them.
    Thank you very much for your time!
    Chris



  2. Re: Very New to SNMP need some help from a kind soul...

    Hello Chris,

    Chris Hastings wrote:
    [snip]
    > So, I need to query the printer and get the page
    > counts periodically. It looks to me like SNMP is the way to do this, but I
    > have no idea how to get started.

    If Your printer offers the page count via SNMP then You could query that value.
    For test purpose, You should download NetSNMP (http://www.net-snmp.org/) and
    try to read the value. This could be done with the "snmpget" commandline
    command. For example You could try to read the "sysDescr" an OID nearly all
    devices implement to have a basic idea what kind of device You have

    snmpget -v 1 -c public 192.168.0.1 .1.3.6.1.2.1.1.1.0

    "-v 1" is Version 1
    "-c public" is community public
    "192.168.0.1" the IP of Your printer
    ".1.3.6.1.2.1.1.1.0" the sysDescr OID (please notice the ".0" at the end, this
    is the instance idetifier, wich is not in the MIB file, if You forget it, You
    will faced to an error Message)
    You should see the printer Name or something else returned from the printer
    "A textual description of the entity. This value should
    include the full name and version identification of
    the system's hardware type, software operating-system,
    and networking software."

    snmpget -v 1 -c public 192.168.0.1 .1.3.6.1.2.1.1.2.0
    should return
    "The vendor's authoritative identification of the
    network management subsystem contained in the entity.
    This value is allocated within the SMI enterprises
    subtree (1.3.6.1.4.1) and provides an easy and
    unambiguous means for determining `what kind of box' is
    being managed. For example, if vendor `Flintstones,
    Inc.' was assigned the subtree 1.3.6.1.4.1.424242,
    it could assign the identifier 1.3.6.1.4.1.424242.1.1
    to its `Fred Router'."

    > The Application is written in VB.Net and ASP.NET.

    Sorry, not my World :-(
    - Maybe You could call the snmpget.exe and parse the result, or
    - there is a netsnmp.dll exporting all the api function, but this will be a
    hard work.

    > Thank you very much for your time!
    > Chris


    Good luck!
    Ekkehard

+ Reply to Thread