1sw / agentuino Goto Github PK
View Code? Open in Web Editor NEWArduino Agentuino library expanded of SNMP GET-NEXT-Request.
Arduino Agentuino library expanded of SNMP GET-NEXT-Request.
An updated version of the Agentuino (http://code.google.com/p/agentuino/) SNMP library. The software now support SNMP GET-NEXT-Request Net-Snmp Get-Next-Request examples ---------------------------------- snmpgetnext -v 1 -c public 192.168.20.6 sysUpTime.0 Output: SNMPv2-MIB::sysContact.0 = STRING: Petr Domorazek snmpwalk -v 1 -c public 192.168.20.6 Output: SNMPv2-MIB::sysDescr.0 = STRING: Agentuino, a light-weight SNMP Agent. DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (53100) 0:08:51.00 SNMPv2-MIB::sysContact.0 = STRING: Petr Domorazek SNMPv2-MIB::sysName.0 = STRING: Agentuino SNMPv2-MIB::sysLocation.0 = STRING: Czech Republic SNMPv2-MIB::sysServices.0 = INTEGER: 6 End of MIB
Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.
C:\Users\Ignazio F.Finazzi>ping 192.168.1.105
Haciendo ping a 192.168.1.105 con 32 bytes de datos:
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Estadísticas de ping para 192.168.1.105:
Paquetes: enviados = 4, recibidos = 4, perdidos = 0
(0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
Mínimo = 0ms, Máximo = 0ms, Media = 0ms
C:\Users\Ignazio F.Finazzi>cd "C:\Program Files (x86)\ireasoning\mibbrowser\bin
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk -v1 -c public 192.168.
1.105
Exception in thread "main" java.lang.NumberFormatException: For input string: "-
c"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:291)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:265)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:15)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk -v1 public 192.168.1.1
05
Exception in thread "main" java.lang.NumberFormatException: For input string: "p
ublic"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:291)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:265)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:15)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk -v1 192.168.1.105
Exception in thread "main" java.lang.NumberFormatException: For input string: "1
92.168.1.105"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:291)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:265)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:15)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk -v 1 192.168.1.105
¿Desea terminar el trabajo por lotes (S/N)? s
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk 192.168.1.105
time out
C:\Program Files (x86)\ireasoning\mibbrowser\bin>ping 192.168.1.105
Haciendo ping a 192.168.1.105 con 32 bytes de datos:
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Respuesta desde 192.168.1.105: bytes=32 tiempo<1m TTL=128
Estadísticas de ping para 192.168.1.105:
Paquetes: enviados = 4, recibidos = 4, perdidos = 0
(0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
Mínimo = 0ms, Máximo = 0ms, Media = 0ms
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk -v1 -c public 192.168.
1.105
Exception in thread "main" java.lang.NumberFormatException: For input string: "-
c"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:291)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:265)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:15)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk public 192.168.1.105
java.net.UnknownHostException: public
java.net.UnknownHostException: public
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at com.ireasoning.a.a.f.open(f.java:151)
at com.ireasoning.a.a.f.open(f.java:137)
at com.ireasoning.c.g.open(g.java:195)
at com.ireasoning.c.g.(g.java:137)
at com.ireasoning.c.g.(g.java:122)
at com.ireasoning.c.g.(g.java:157)
at com.ireasoning.c.a.e.(e.java:51)
at com.ireasoning.c.a.f.(f.java:129)
at com.ireasoning.c.a.f.(f.java:96)
at com.ireasoning.app.mibbrowser.SnmpWalk.a(SnmpWalk.java:26)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:16)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk -v1 public 192.168.1.1
05
Exception in thread "main" java.lang.NumberFormatException: For input string: "p
ublic"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:291)
at com.ireasoning.app.mibbrowser.qi.parseOptions(qi.java:265)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:15)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>snmpwalk public 192.168.1.105
java.net.UnknownHostException: public
java.net.UnknownHostException: public
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at com.ireasoning.a.a.f.open(f.java:151)
at com.ireasoning.a.a.f.open(f.java:137)
at com.ireasoning.c.g.open(g.java:195)
at com.ireasoning.c.g.(g.java:137)
at com.ireasoning.c.g.(g.java:122)
at com.ireasoning.c.g.(g.java:157)
at com.ireasoning.c.a.e.(e.java:51)
at com.ireasoning.c.a.f.(f.java:129)
at com.ireasoning.c.a.f.(f.java:96)
at com.ireasoning.app.mibbrowser.SnmpWalk.a(SnmpWalk.java:26)
at com.ireasoning.app.mibbrowser.SnmpWalk.main(SnmpWalk.java:16)
C:\Program Files (x86)\ireasoning\mibbrowser\bin>nit>(g.
Acceso denegado.
C:\Program Files (x86)\ireasoning\mibbrowser\bin>
What can i do????
when I included "Ethernetserver server(80);" the walk is not working properly.
Also while for static configuration when I have included mac,ip,dns,gateway the walk is working but as soon as I added subnet to above field the snmp walk is giving No response after emitting output for first!
Snmp set function doesn't work, same in the agentuino example.
Compiling the example for an UNO R3 is working.
Compiling the same code for an UNO R4 does not throw errors, but the SNMP respose is missing the last character of octetstrings and is not responding other OIDs like uptime or any numbers.
What can go wrong on this library when running on a different platform...?
I created an OID to present an IP adress. So this OID has the type SNMP_SYNTAX_IP_ADDRESS
.
Inside my sketch the IP is stored inside an byte ip[4]={192.168.0.1}
.
Answering a SNMP-GET-request by encode(SNMP_SYNTAX_IP_ADDRESS,ip)
results in the IP address presented in reverse byte order to the SNMP management engine.
I found the reason for this might be here, where the bytes are assigned in reverse order.
Is this correct? I know an IP-address as part of an OID is in reverse order, but not as value. Looking at my switch at OID .1.3.6.1.2.1.4.20.1.1 returns the IP inside the value in correct order.
So, even though this library seams to be not maintained anymore, this info might be helpfull for anybody with the same problem.
I'm gonna change this inside my copy of the library, so my project is working, but I can't see, if this change might destroy other things. So, be warned using this library with type SNMP_SYNTAX_IP_ADDRESS.
agentuino is not working. and the updated version is not exist?
can you help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.