Agentuino agent stop responding to snmpget

I downloaded the agentuino library from the old link: https://code.google.com/p/agentuino/ It worked on Arduino IDE 1.0.1 with the following patch: https://code.google.com/p/agentuino/issues/detail?id=3

However, when I try to read from a temperature sensor, the snmpget work for few seconds maybe up to a minute then the agent stop responding even though the network shield still responding to ping commands. I tried couple of software reset, including watchdog, none of them worked I noticed the agent go back to normal after pressing the reset button on the network shield

I downloaded the latest version of the library that was provided by johnyHV on the following topic: http://forum.arduino.cc/index.php?topic=50848.60

it complies with no issues, however it fails to upload to the board (so I haven't tested the code yet).

My equipment are as follows: Arduino UNO board Arduino Network Shield with HanRun connector DHT11 temperature/humidity sensor Arduino IDE 1.6.7

I am reading from the sensor at the beginning of my loop, I started to suspect that something is wrong with either the board or the network shield OR maybe I am reading from the sensor at the wrong time in the program

Have you tried removing the DHT11 sensor read and returning a simulated value instead? And what library are you using? Cheers!

I ran the agent alone and it is more stable, till the moment it stopped again, I reviewed what I was doing when it stopped, I was sending a walk command from iReasoning (MIB browser) AND when running "The Dude" an application to monitor the status of networked devices. Putting back the DHT11 sensor, without running a walk command or the Dude, all worked fine for a longer period.

It looks like those applications are killing the agent. Need a way to figure out how to stabilize it.

but still with occasional random failure, even when nothing is connected where I need to manually reset the arduino

it Need more testing

I got the library from:

https://github.com/johnyHV/Arduino-SNMP

to compile and upload to the arduino, the question is I want to modify the "Agentuino.cpp" file at the following lines (rest of the code in unchanged) by replacing sysUpTime with the temperature reading as integer (for testing only)

I tried to read from the sensor at different locations of this code, the return value is alway 0 no matter of which type.

Any hint where to read from the sensor and put the reading into the pdu packet?

void pduReceived() { SNMP_PDU pdu;

Serial.println(locUpTime); //

ifdef DEBUG

Serial.print(F("UDP Packet Received Start.."));

endif

// api_status = Agentuino.requestPdu(&pdu); // if (pdu.type == SNMP_PDU_GET || pdu.type == SNMP_PDU_GET_NEXT || pdu.type == SNMP_PDU_SET && pdu.error == SNMP_ERR_NO_ERROR && api_status == SNMP_API_STAT_SUCCESS) { // pdu.OID.toString(oid); // //Serial << "OID: " << oid << endl; // if (strcmp_P(oid, sysDescr) == 0) { // handle sysDescr (set/get) requests if (pdu.type == SNMP_PDU_SET) { // response packet from set-request - object is read-only pdu.type = SNMP_PDU_RESPONSE; pdu.error = SNMP_ERR_READ_ONLY; } else { // response packet from get-request - locDescr status = pdu.VALUE.encode(SNMP_SYNTAX_OCTETS, locDescr); pdu.type = SNMP_PDU_RESPONSE; pdu.error = status; } //

ifdef DEBUG

Serial.print(F("sysDescr...")); Serial.print(locDescr); Serial.print(F(" ")); Serial.println(pdu.VALUE.size);

endif

} else if (strcmp_P(oid, sysUpTime) == 0) { // handle sysName (set/get) requests if (pdu.type == SNMP_PDU_SET) { // response packet from set-request - object is read-only pdu.type = SNMP_PDU_RESPONSE; pdu.error = SNMP_ERR_READ_ONLY; } else { // response packet from get-request - locUpTime status = pdu.VALUE.encode(SNMP_SYNTAX_TIME_TICKS, locUpTime); pdu.type = SNMP_PDU_RESPONSE; pdu.error = status; } //

ifdef DEBUG

Serial.print(F("sysUpTime...")); Serial.print(locUpTime); Serial.print(F(" ")); Serial.println(pdu.VALUE.size);

endif