Open ae-zero opened 2 years ago
Hi @ae-zero, Interesting find with this bug.
As you can see from the OID Encoding method here: https://github.com/0neblock/Arduino_SNMP/blob/8ace14f7c8ac380fe531f3ddfacde8ccb0469cda/src/BEREncode.cpp#L145-L181
I assume that all OID's are prefixed with .1.3
I can't remember why I did this originally, but obviously most OID's fit this format.
This can be fixed by changing the encoding to https://docs.microsoft.com/en-us/windows/win32/seccertenroll/about-object-identifier?redirectedfrom=MSDN, which I will add to my list but may not be able to do for a while.
The decoding will also have to be fixed in BERDecode.cpp
Thanks for looking into it, @0neblock! I went in and starting meddling with those two files, but ended up making it much worse :)
Thanks for putting it on your list!
Hi all,
I'm trying to make my ESP8266 respond with ".0.0" to gets for .1.3.6.1.2.1.2.2.1.22.1 (ifSpecific).
snmp.addOIDHandler(".1.3.6.1.2.1.2.2.1.22.1", ".0.0"); // ifSpecific
I have tried multiple values, such as ".0.0", "0.0", ".0".
When I do an snmpwalk or an snmpget against it, I get a general error:
The corresponding Wireshark output looks like this:
Here is Wireshark output from a box not using this library:
Thanks for your help!