Compile SNMP Agent Arduino
Hi,
I've tried to compile the example SNMP Agent code, it won't find the module.h included in the SNMPAgent.h file, and if i comment it out, it trows another thousand errors. What module.h file is that?
Could you please help me?
Take a look at the Example/Actual_SNMP_Agent project. I just pulled down the latest Arduino IDE and made some tweaks. It will now compile. Unfortunately I don't have an Arduino to test with right now.
Thank you @rexpark . I will try to compile this new version.
I'm still getting some errors, could you please help me?
When i try to compile, i get:
Arduino: 1.8.5 (Linux), Placa:"Arduino/Genuino Uno"
/home/gabriel/Arduino/snmp-v2/Example/Actual_SNMP_Agent/Actual_SNMP_Agent.ino:4:20: fatal error: String.h: No such file or directory
#include <String.h>
^
compilation terminated.
exit status 1
After renaming "String" to "string" the error go away, but then i get this errors:
/home/gabriel/Arduino/libraries/snmp-v2/SNMPAgent.cpp: In member function 'void SNMPAgent::process_inform_table()':
/home/gabriel/Arduino/libraries/snmp-v2/SNMPAgent.cpp:504:15: error: cannot convert 'SNMP_INFORM_TABLE_ENTRY' to 'SNMP_INFORM_TABLE_ENTRY*' in assignment
tmp_entry = inform_holding_table.get(i);
^
/home/gabriel/Arduino/libraries/snmp-v2/SNMPAgent.cpp: In member function 'boolean SNMPAgent::process_inform_response()':
/home/gabriel/Arduino/libraries/snmp-v2/SNMPAgent.cpp:530:15: error: cannot convert 'SNMP_INFORM_TABLE_ENTRY' to 'SNMP_INFORM_TABLE_ENTRY*' in assignment
tmp_entry = inform_holding_table.get(i);
^
/home/gabriel/Arduino/libraries/snmp-v2/SNMPAgent.cpp: In member function 'boolean SNMPAgent::remove_inform(uint32_t)':
/home/gabriel/Arduino/libraries/snmp-v2/SNMPAgent.cpp:546:15: error: cannot convert 'SNMP_INFORM_TABLE_ENTRY' to 'SNMP_INFORM_TABLE_ENTRY*' in assignment
tmp_entry = inform_holding_table.get(i);
^
exit status 1
Getting this error when compiling the actual agent for an uno:
Global variables use 3107 bytes (151%) of dynamic memory, leaving -1059 bytes for local variables. Maximum is 2048 bytes. Not enough memory; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing your footprint. Error compiling for board Arduino/Genuino Uno.
Hi guys! I have a issue: In file included from SNMPAgent.cpp:7:0: SNMPAgent.h:13:56: fatal error: ArduinoSNMP.h: no such file or directory. compilation terminated.
I put the ArduinoSNMP.h in the libraries, but doesn't works.
Take a look at the Example/Actual_SNMP_Agent project. I just pulled down the latest Arduino IDE and made some tweaks. It will now compile. Unfortunately I don't have an Arduino to test with right now.
I tried to compile Actual_SNMP_Agent in Arduino IDE v 1.8.13. Result is unsuccessful. There is error log in the attachment. Error.log.txt
When LinkedList.h was replaced by actual version (from https://github.com/ivanseidel/LinkedList) there were less errors, but sketch did not compiled. Please look on the second error log.
Could you help solve this situation?
I have the same problem as @cats-shadow . Was anyone able to resolve this? Thanks.
After fixing a few issues, including replacing LinkedList.h, I get the following error when compiling for an Arduino Nano:
Global variables use 3009 bytes (146%) of dynamic memory, leaving -961 bytes for local variables. Maximum is 2048 bytes. Not enough memory; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing your footprint. Error compiling for board Arduino Nano.
Just merged a couple PRs into master that should fix multiple compilation errors. I've removed LinkedList.h from the example app and added comments to the Readme stating the library needs to be installed separately now.
@janclod, you probably won't be able to get this to run on a Nano. The example app was written for convenience, not memory usage. If you remove most of the example OIDs and reduce the SNMP_MAX_VALUE_LEN to something smaller (based on whatever messages you know you'll be using) you might get it to fit.
Thanks for updating this and the tips on how to possibly run on Nano.
Does it make sense to run a SNMP agent on a Nano? Is there a more sensible approach?
What goal are you trying to accomplish with SNMP?
I would like to send the value coming out from a pin (connected to a temperature sensor) to a SNMP manager