Pages: [1]   Go Down
Author Topic: Arduino SNMP MIB  (Read 2388 times)
0 Members and 1 Guest are viewing this topic.
Sweden
Offline Offline
Sr. Member
****
Karma: 11
Posts: 443
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just recently started playing around with Arduino boards and software. I found some work that had been done on Ethernet and SNMP (Agentuino). There was also a registered enterprise OID for Arduino but I could not find a MIB.

Attached is a first attempt of defining a MIB for simple access of the pins together with a modification of the Agentuino SNMP agent demo to show how it could be used. I have been using this with the MIB Browser from iReasoning http://ireasoning.com/mibbrowser.shtml.

Please note that the demo does not implement all objects and the MIB is not complete.

I hope this may spawn a discussion of an extendable SNMP MIB for Arduino so that standard software for monitoring may be used for simple applications (eg temperature, on-off/open-closed state and other sensors).

Best regards, Mikael

* Arduino.mib (4.61 KB - downloaded 79 times.)
* Agent.ino (5 KB - downloaded 72 times.)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just what i am looking for. Good work, please keep it up.

Where can I get the latest agentunio  snmp agent code?

Thanks

Simon
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Had a quick look and it is definitely a very good start.

A brain dump to get you busy for some hours smiley


What is missing is the type Arduino, is it an UNO, a DUE

Code:
ArduinoType OBJECT-TYPE
    SYNTAX OCTET STRING (SIZE(10))  // UNO GUE, TEENSY, LEONARDO, ...
    ACCESS read-only
    STATUS current
    DESCRIPTION "Arduino Type"
    ::= { system x }

They can have more RAM.

Code:
sysFreeMem OBJECT-TYPE
    SYNTAX INTEGER(0..32767)
    ACCESS read-only
    STATUS current
    DESCRIPTION "Free system memory [color=red]in KB[/color]"
    ::= { system 3 }

sysClockspeed ::= { system.4 }

system.sysEEPROM ::= { arduinoMIB.xxx }


arduinoMIB.experimental ::= { arduinoMIB.xxx }   // always useful for people who want to experiment.


split OBJECT IDENTIFIER ::= { arduinoMIB 3 } in 2 :
ADC OBJECT IDENTIFIER ::= { arduinoMIB 3}
DIO  OBJECT IDENTIFIER ::= { arduinoMIB 4}
DAC OBJECT IDENTIFIER ::= { arduinoMIB 5}

Better make an Array of it (does Argentuino support arrays??)

something like this:

Code:
ADC OBJECT IDENTIFIER ::= { arduinoMIB 3 }

ADCTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF analogPin
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
        "A table of the analog pins"
    ::= { ADC 1 }

analogPin OBJECT-TYPE
    SYNTAX     analogPin
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
        ""
    INDEX  {analogPinIndex}
    ::= { analogPinTable 1 }

analogPin ::= SEQUENCE {
    analogPinIndex INTEGER,
    analogPinMaxValue INTEGER,   // or #bits ?
    analogPinCurValue INTEGER
    // register settings ...
}

Similar for digital IO - the advantage of 2 arrays is that you can number them independently

Note that the digital pins should include the analog ones.  BTW an Arduino UNO has 8 analog pins

Furthermore you can add

These are ArduinoMib.communication or so?
- serial ports (type HW/SW, pins, baudrate, )
- SPI (...)
- I2C (....)

- Timers (settings) 

arduinoMIB.sketch ::= { arduinoMIB.xxx }   // should be an array to be prepared for multitasking!
-- name
-- date installed / written whatever
-- uptime

arduinoMIB.shield ::= { arduinoMIB.xxx }   // should be an array to be prepared [don't know if possible]
-- name

</braindump>







Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: