Pregunta

Want a platform independent desktop app to check the toner/Cartridge level of a network printer and notify the user of the status and give him option to request for purchase of the toner if low.

The info i got till now is that we need to fetch values for OID from MIB files of a SNMP enabled Printer. I want this app to be as generic as possible for all Brands, however need for today is specially for Brother Printers & MFPs.

Sorry for looking nube but i have searched enough and there is not much information available.

Can i use native support & Monitoring tool of the Manufacturer as brother provides its monitoring utility which can be installed on Desktop(In that case where the MIB file will be located(on the device or within installed program on the Desktop?) or need to use network monitoring tools like icanga, negios etc.

Secondly how to implement it on AIR.I am thinking to use AIR for the first time and wondering will it be helpful and do i need to know something more on this technology before proceeding.

There are some networking monitoring tools available like negios & Icinga. which can be installed even over a desktop. Can the data from these can be parsed and used. We need it for brother printer but want to implement it for Multi-Manufacturer solution as per documents format for MIB file is getting standard. We will invest time only if its universal even after a year or so as its not worth time for a single manufacturer. So following CLI's i find useful in Net-SNMP and believe that it will get me to output by calling these Applictions by External Script(AIR). convert between numerical and textual forms of MIB OIDs, and display MIB content and structure (snmptranslate). A graphical MIB browser (tkmib), using Tk/perl. A daemon application for receiving SNMP notifications (snmptrapd). Selected notifications can be logged (to syslog, the NT Event Log, or a plain text file), forwarded to another SNMP management system, or passed to an external application. An extensible agent for responding to SNMP queries for management information (snmpd). This includes built-in support for a wide range of MIB information modules, and can be extended using dynamically loaded modules, external scripts and commands, and both the SNMP multiplexing (SMUX) and Agent Extensibility (AgentX) protocols.

Are there any API to read MIB files in AIR.

Any links or some added information is highly appreciated.

¿Fue útil?

Solución

For printers without SNMP support, you'll probably have to implement a manufacturer-specific solution. If you want to write an AIR app that talks to SNMP-enabled printers, I can see the following approaches:

Implement SNMP client in ActionScript

Since SNMP is usually based on UDP, you could use flash.net.DatagramSocket to implement your own SNMP client in AIR. AFAIK, there are no ready-to-use ActionScript libraries, so you'd need expert knowledge of the SNMP protocol and a lot of development time.

Write an AIR Native Extension

With a Native Extension (ANE) you could implement the SNMP client in C/C++. This has the advantage that you could use an open source library like Net-SMTP to do the heavy lifting, but you'd still need some experience in developing and building C/C++ libraries.

Use a command-line tool

The easiest solution is probably to use one of the free SNMP command-line utilities from Net-SMTP or SnmpSoft, for example. All you have to do is to call one of these programs using flash.desktop.NativeProcess providing the correct arguments and then parse the output.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top