Closed fcqpl closed 3 years ago
@fcqpl said:
I'm getting ESP8266 resetting while doing snmp get with long oid. Example OID:
1.3.6.1.2.1.1.5.0.4.1.1.3.4.5.67.2.21.2.23.3.4.5.5.6.2.1222.3
I'm not using long oids in my application, but I connected LibreNMS in which I wanted to keep charts. During execution of Device Discovery, ESP8266 resets multiple times. Example OID from Librenms discovery:1.3.6.1.4.1.8072.1.3.2.3.1.2.6.100.105.115.116.114.111
Arduino_SNMP should dropping packets with long oid, but i don't know where to implement it.
I am working with the developer @0neblock on this same issue on my ESP32 and wanted to reach out to you with a suggestion that is working at the moment for me. I am using both Observium and LibreNMS on testing a solution and I noted that if I disable UCD-SNMP-MIB checking within the Observium \ device \ properties \ MIBs section (LibreNMS should have the same section) then the crash stops.
That disables the extended UCD-SNMP-MIB and then I have no issues. This is not a fix but it does get me to the next step of reliable operation so I can continue testing and building instead of endless crashing. Hope it helps in some small way.
I believe the crashes with long OIDs is caused by a fixed size buffer which only allows max of 50 characters for the OID. I believe an OID can be up to 128. I'll submit a PR for this change shortly.
@shortbloke I can confirm that making the suggested changes to the BER.h file manually has fixed the issue. Much appreciated!
Hello! I'm getting ESP8266 resetting while doing snmp get with long oid. Example OID:
1.3.6.1.2.1.1.5.0.4.1.1.3.4.5.67.2.21.2.23.3.4.5.5.6.2.1222.3
I'm not using long oids in my application, but I connected LibreNMS in which I wanted to keep charts. During execution of Device Discovery, ESP8266 resets multiple times. Example OID from Librenms discovery:1.3.6.1.4.1.8072.1.3.2.3.1.2.6.100.105.115.116.114.111
Arduino_SNMP should dropping packets with long oid, but i don't know where to implement it.
Exception (3): epc1=0x40100718 epc2=0x00000000 epc3=0x00000000 excvaddr=0x400082e1 depc=0x00000000
Best regards! Good library!