Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile SNMP Agent Arduino #3

Open
rodriguescr opened this issue Mar 7, 2018 · 12 comments
Open

Compile SNMP Agent Arduino #3

rodriguescr opened this issue Mar 7, 2018 · 12 comments

Comments

@rodriguescr
Copy link

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?

@rexpark
Copy link
Owner

rexpark commented Mar 13, 2018

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.

@rodriguescr
Copy link
Author

Thank you @rexpark . I will try to compile this new version.

@rodriguescr
Copy link
Author

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


@Maoie86
Copy link

Maoie86 commented Nov 15, 2018

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.

@fvancan
Copy link

fvancan commented Feb 28, 2020

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.

@R1BLH
Copy link

R1BLH commented Feb 9, 2021

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.

Error.log.2.txt

Could you help solve this situation?

@a4x4kiwi
Copy link

I have the same problem as @cats-shadow .
Was anyone able to resolve this?
Thanks.

@janclod
Copy link

janclod commented Jul 5, 2021

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.

@rexpark
Copy link
Owner

rexpark commented Jul 5, 2021

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.

@janclod
Copy link

janclod commented Jul 7, 2021

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?

@rexpark
Copy link
Owner

rexpark commented Jul 7, 2021 via email

@janclod
Copy link

janclod commented Jul 13, 2021

I would like to send the value coming out from a pin (connected to a temperature sensor) to a SNMP manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants