troglobit / mini-snmpd

A minimal SNMP agent implementation
https://troglobit.com/projects/mini-snmpd/
GNU General Public License v2.0
69 stars 36 forks source link

RFE: Support custom responses e.g. to emulate HP JetDirect print server #29

Open rathann opened 1 year ago

rathann commented 1 year ago

mini-snmpd is mentioned in p910nd print server guide in OpenWRT documentation: https://openwrt.org/docs/guide-user/services/print_server/p910nd.server#mini_snmpd

However, it's not useful without the patch mentioned there. Obviously, the solution documented there is printer model-specific, but it could be generalized, e.g. in form of text string specified in mini-snmpd configuration, i.e.

custom_response = { OID, response }

which could be set like below to emulate a HP JetDirect print server.

custom_response = { '0.1.3.6.1.4.1.11.2.3.9.1.1.7.0', "MFG:Hewlett-Packard;MDL:HP LaserJet 1020;CLS:PRINTER;DES:HP LaserJet 1020;SN:XXXXXXX;" }

Better yet, the response could be synthesized from USB scan, but I guess that's too specific.

References: