Printer OID does not work on every printer - snmp

Hello I was asked to write a program to ask every printer in the network for there, name, location, and CMYK toners(how much percentage are left). I serched for the OID'a and everything was working. Now that i have the program that gets the data from all printers at some printers i does not work and the program shuts itself down. Why is that ?
Thanks in advance.
Yours sincerely Scarlet

The problem is that there is no common MIB to monitor all printers. So it is very vendor specific. There are several most commonly used MIBs to monitor printer devices:
PARALLEL-MIB - MIB module for Parallel-printer-like hardware devices.
PRINTER-MIB - MIB module for management of printers.
IANA-PRINTER-MIB - IANA basic SNMP definitions for printer devices.
HP-LASERJET-COMMON-MIB - Hewlett-Packard definitions for LaserJet series devices.

Related

How to install Zebra ZXP 3 Printer in Windows without printer

While investigating customer problem with Zebra ZXP Series 3 Card printers, I tried to install the printer in Windows. I do not have the actual device at hand, but it is also not needed because the problem we are chasing is some kind of spooler resource exhaustion when the application sends jobs to paused printer.
The OS is Windows 7 x64 and I got the drivers from ZXP Series 3 product page
I succeeded installing the drivers in system but while trying to Add Local Printer, either "Zebra ZXP Series 3 Network Card Printer" or "Zebra ZXP Series 3 USB Card Printer" I get error "Unable to install printer. Operation could
not be completed (error 0x0000000d)." There is nothing extra in the Event Log.
I have tried different port types, like FILE:, network etc. I guess the printer driver wants to have some kind of bi-directional communication with the device during setup and when that fails, the setup does not continue? Is there a way to circumvent such problem or should I conclude that the driver is simply temperamental and I need to go looking for a physical device?

Writing a UMDF virtual device driver (or software device) like Virtual DVD

I have an "off the shelf" commercial software using an ANT USB dongle to communicate with a cycling trainer.
My trainer is not compatible with the software because the protocol is slightly different (not a lot).
My goal is to write a protocol translator. The only thing I can think of is to write a UMDF virtual device driver (like Magic ISO Virtual DVD) looking like an ANT USB Device in the device manager (same PID\VID) while connecting itself to the physical ANT device. The virtual device driver will perform the protocol translation.
I looked at several examples from Microsoft here https://github.com/Microsoft/Windows-driver-samples but I was unable to find anything relevant. I thought this example would be a good start https://github.com/Microsoft/Windows-driver-samples-master/Sensors/CustomSensors but it is impossible to load the driver using the given procedure from the inf file.
BTW I am familiar with the content of INF files and the basics of KMDF & UMDF device drivers programming. My problem is to write something that will load in the device manager and present itself as a real USB device even if it is not enumerated by the USB bus subsystem.
Can anybody with driver development experience point me to some relevant code sample or documentation?
Best regards !
I am currently developing a UMDF CCID (smartcard reader) driver. This project helped me at the beginning because it compiles out of the box and creates virtual device nodes (smartcard readers) visible in the device manager.

Identify Windows USB Sounddevice by physical USB port connection

When I connect several USB audio devices using the default drivers I usually end up with some kind of friendly device description like "nn- USB Audio codec" or something else, so I have currently no unique property which refers to a specific hardware the e.g. manufacturer ID. I would like to ensure that in case of re-enumerating or replugging the hardware to a different port that my software will automatically identify the changed windows audio device which maps to this hardware. I there a possibility to gather further windows audio device information which can be used to determine the physical hardware ?
Maybe a little clarification is needed:
I have two or more USB audio devices, not necessarily same product or manufacturer. The audio connections have different purposes, so I want to ensure that I my software uses constantly the same physical audio devices for different tasks. This sometimes fails when a re-enumeration occurs ( sometimes without changing the physical USB port connections, it's a windows thing...)
Ideally I would distinguish them by an individual serial number, which usually is only available with storage devices. But what I can retrieve is the "physical" USB topology when I'm looking at the device with a tool such as USBDeview from Nir Sofer. There I have a property like "Hub 3, Port1". If I could map this to a sound device I get from audio audio api like "nn- USB Audio codec" as seen in the sound control panel I would be perfectly happy.
Edit2:
May be this[1] post helps here, but I still have to figure out how to get a USB Port <-> Windwos Sounddevice mapping.
[1]: Can the physical USB port be identified programatically for a device in Windows? "

SNMP OID for CPU core temperature of Windows computer

I am developing an Android app to retrieve some information from computer using SNMP. Is it possible to get the CPU temperature (or any temperature within device) by SNMP? If it is possible, what is the OID to access the info? Thanks.
It is depending on HW and OS. For Linux servers you can use lm-sensors. lm-sensors supports temperature and fan speed on the motherboard. There is a MIB for lm-sensors. I have only used lm-sensors on SLES and there you have to download and install support for it.
I don't know if there is any support for lm-sensors on Windows. Maybe you can pick up something via WMI...?
If it is for a "real server" the vendor (HP etc) may have an SNMP agent and MIB already supporting this. Then it will probably work for both Linux and Windows.
See also How to get the temperature of motherboard of a PC (and other hardware statistics)?

Direct access to USB Printer ports listed in the Windows Spooler

In the world of printers, particularly the POS ones, there are two common approaches, OPOS and Windows print queues. And there's also the work-around like the virtual serial port. But there seems to be another approach out there too ... the driver is installed but the software seems to be writing directly to the port rather than using the windows spooler.
If you look at the spooler ports when an Epson USB printer is installed for example, there is a ESDPRT001 ... could it be that the POS app is writing to the port directly and bypassing the whole spooler?
According to Epson's product description of OmniLink no driver is required. It is quite possible that the spooler has been outsourced to the powerful onboard computer, which is operating at ~400Mhz. Just a guess.
You don't need a driver for Epson's OmniLink. If your spoolsv.exe isn't working, look into this though.

Resources