Hello, the purpose of the project is to be able to monitor the DHT22 temperature sensor connected to my Arduino Mega 2560 using SNMP (Observium server), the network card I use is the ENC28j60.
The script works correctly, raises the network, responds to calls snmp (I even managed to be able to add it in the observium), etc ... the problem is that randomly (at 2 or 3 hours), the network stops working, The Arduino is still working (I checked it by watching the console), but the ethernet stops receiving requests, it remains frozen.
I changed the code so if you do not receive a snmp request every 2 minutes, reactivate the card, but neither, the network card hangs.
I have thought of modifying the code to try to reset the raspberry itself if it does not receive an SNMP request every 2 minutes (the bad thing is that watchdog has a maximum of 8 seconds, I would use another code to reset it), I also thought about buying another card Ethernet ...
I enclose the program code
Has anyone had a similiar problem or know what may be happening to me?
snmp_temperatura_v4.ino (3.5 KB)