Go Down

Topic: Agentuino example compile (Read 469 times) previous topic - next topic

vtecfo

Mar 22, 2016, 12:26 pm Last Edit: Mar 22, 2016, 12:31 pm by vtecfo
Sorry if wrong branch.
Long story short, I cant even compile example that comes with agentuino. Tried many modified versions but no luck. https://code.google.com/archive/p/agentuino https://github.com/carlosdelfino/agentuino https://github.com/1sw/Agentuino https://github.com/johnyHV/Arduino-SNMP
I'm using arduino 1.6.7 to compile and leonardo eth (but I guess it doesn't matter since I never got a chance to upload compiled file).
Any help?

vtecfo

Please if anyone is using it, share working example and libraries.


pert

From attached file:
Code: [Select]
In file included from C:\Users\B7E3~1\AppData\Local\Temp\arduino_566b1f6ef04242d37eb1e1376668f625\AgentPlus.ino:13:0:

C:\Users\User\Documents\Arduino\libraries\Flash-5/Flash.h:70:23: error: 'prog_char' does not name a type

   _FLASH_STRING(const prog_char *arr);

The problem is that the Flash-5 library is not compatible with newer versions of the Arduino IDE. To fix this issue you need to change all the lines that use prog_char. For example C:\Users\User\Documents\Arduino\libraries\Flash-5/Flash.h line 70 should be changed to:
Code: [Select]
  _FLASH_STRING(const char *arr PROGMEM);

From attached file:
Code: [Select]
C:\Users\B7E3~1\AppData\Local\Temp\arduino_566b1f6ef04242d37eb1e1376668f625\AgentPlus.ino: At global scope:

AgentPlus:32: error: variable 'sysDescr' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysDescr[] PROGMEM      = "1.3.6.1.2.1.1.1.0";  // read-only  (DisplayString)

And any like this need to have const added. For example, change AgentPlus.ino line 32 to:
Code: [Select]
static const char sysDescr[] PROGMEM      = "1.3.6.1.2.1.1.1.0";  // read-only  (DisplayString)

vtecfo

pert, many thanks! Haven't tested real snmp yet, but after replacing and also fixing included in agentuino ethernet to ethernet2 libaries it finally has compiled.

blakhawk23

Hi. I'm new with arduino (2 months). I want to make some sensors based on Mega 2560 ,w5100,  multipleDS18b20. I made it to displayin in one page several sensors and send it to a syslog server but i want to add snmp conectivity. It's now passed 3 days and i still search for a working agentuino library that can do it. I have many compiling errors. Can anyone help me or give me an idea?:
Arduino: 1.8.0 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\A\AppData\Local\Temp\arduino_modified_sketch_79934\Agent.pde:11:0:

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:50:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:55:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:60:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:65:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:80:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:89:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:100:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:123:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:134:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:158:1: warning: 'typedef' was ignored in this declaration

 };

 ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:192:2: warning: 'typedef' was ignored in this declaration

 };

  ^

C:\Users\Al\Documents\Arduino\libraries\Agentuino/Agentuino.h:488:2: warning: 'typedef' was ignored in this declaration

 };

  ^

C:\Users\A\Documents\Arduino\libraries\Agentuino/Agentuino.h:498:1: warning: 'typedef' was ignored in this declaration

 };

 ^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,

                 from sketch\Agent.pde.cpp:1:

Agent:32: error: variable 'sysDescr' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysDescr[] PROGMEM      = "1.3.6.1.2.1.1.1.0";  // read-only  (DisplayString)

                        ^

Agent:34: error: variable 'sysObjectID' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysObjectID[] PROGMEM   = "1.3.6.1.2.1.1.2.0";  // read-only  (ObjectIdentifier)

                           ^

Agent:36: error: variable 'sysUpTime' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysUpTime[] PROGMEM     = "1.3.6.1.2.1.1.3.0";  // read-only  (TimeTicks)

                         ^

Agent:38: error: variable 'sysContact' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysContact[] PROGMEM    = "1.3.6.1.2.1.1.4.0";  // read-write (DisplayString)

                          ^

Agent:40: error: variable 'sysName' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysName[] PROGMEM       = "1.3.6.1.2.1.1.5.0";  // read-write (DisplayString)

                       ^

Agent:42: error: variable 'sysLocation' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysLocation[] PROGMEM   = "1.3.6.1.2.1.1.6.0";  // read-write (DisplayString)

                           ^

Agent:44: error: variable 'sysServices' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

 static char sysServices[] PROGMEM   = "1.3.6.1.2.1.1.7.0";  // read-only  (Integer)

                           ^


exit status 1
variable 'sysDescr' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Thx in advance

pert

Add the const keyword to each of those lines that are causing errors.

blakhawk23

Add the const keyword to each of those lines that are causing errors.
Thx. This was the problem. Thank you wery much.

Go Up