LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with SNMP

Solved!
Go to solution

I found a SNMP vi library online that someone wrote and I am struggling to get it to work. I believe that I am using them correctly because I can get some OIDs to work and others won't return anything.

OID .1.3.6.1.2.1.1.1.0 - works fine. It returns the same OID, datatype, and then the value.
OID .1.3.6.1.4.1.21796.4.1.3.1.4.1 - doesn't work, it returns a different OID and nothing in the datatype or value.

Has anyone used this library before?  All I need to do is get one value from a device. Any ideas?

Download All
0 Kudos
Message 1 of 6
(4,228 Views)

I couldn't look at your temp test VI (I have LV 8.6), but I downloaded the llb from the LAVA forums and noticed that the SNMP Get Response.vi function has two error outputs. The standard LabVIEW Error Out indicates if a UDP error occured. Try looking at the error-status, error-string and error-index output values for this function.

 

There may be a problem interpreting the SNMP response for your specific OID (1.3.6.1.4.1.21796.4.1.3.1.4.1) that would not be present in the LabVIEW Error Out cluster. You would see this only in the SNMP Get Response.vi front panel.

 

If you google 1.3.6.1.4.1.21796.4.1.3.1.4.1, the first link (today anyway Smiley Tongue) indicates that the MIB/device may not be strictly compliant. If the device returns a value that is inconsistent ( a string for an integer value ) the library may be reporting an error (see above).

 

Since the RFC-1213 required Object IDs work but the vendor specific objects don't, the best bet is to contact the supplier of the equipment and determine if you are requesting the correct object or maybe need a software update on the node you are querying.


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 6
(4,206 Views)

Thanks for the response.  I looked at those errors and they seem okay.  I looked deeper into those library vis but I don't know a whole lot about SNMP so it is hard to diagnose.  I talked with the manufacturer of my device but all they said was it is probably a problem somewhere in labview.  I will keep plugging away at it.  Any other ideas?

0 Kudos
Message 3 of 6
(4,187 Views)

I would suggest trying the 'SNMP MIB Walk.vi' example and a starting OID of 1.3.6.1.4.1.21796, leave the end OID blank.

 

 


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 4 of 6
(4,151 Views)

I tried the walk with no luck. I believe the problem lies somewhere in the SNMP Encode SubID.vi or the SNMP Build OID.vi.  I don't think that it is encoding the 21796 part of the OID correctly.  If you plug the 21796 as the SubID it will output 24 in the byte array.  I am not sure what the correct output for that number should be.  Can someone help me out here?  Thanks

Download All
0 Kudos
Message 5 of 6
(4,138 Views)
Solution
Accepted by topic author secr1973

The original poster contacted me directly and I gave him an updated version of the library that resolved his problems. To be honest I am not sure what updates are in the latest version of the library since the version he got was quite old. Anyway, here is the most recent version for anyone else that may need SNMP.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 6
(4,121 Views)