Jump to content

help for useing SNMP in labview


Recommended Posts

I am using the SNMP SET that i created with the snmp communication library that is provided above.

The command is executed fine with the use of command prompt "snmpset -v 1 -c private 192.168.100.60 1.3.6.1.4.1.19865.1.2.1.2.0 i 1".

But no luck with LabView. I get no errors but the device does not respond to the LabView command.

What's wrong?

SNMP SET.vi

post-16673-125775665367_thumb.png

Link to comment

I am using the SNMP SET that i created with the snmp communication library that is provided above.

The command is executed fine with the use of command prompt "snmpset -v 1 -c private 192.168.100.60 1.3.6.1.4.1.19865.1.2.1.2.0 i 1".

But no luck with LabView. I get no errors but the device does not respond to the LabView command.

What's wrong?

Could you please post you code saved for version 8.6.1? I don't currently have LabVIEW 9.0 installed. Also, have you tried using a LAN analuzer to capture the communication between the devices? This would be useful in determining what is happening. These VI's were written to strictly enforce the SNMP protocol and I have seen at times that some devices don't always format the response in full compliance with the SNMP spec. This can result in a error. I have discovered a few areas where the error reporting in these VI's can be improved. However, it would be most helpful if I could see you code (saved for LabVIEW 8.6.1) to see what is happening.

Link to comment

I am using the SNMP SET that i created with the snmp communication library that is provided above.

The command is executed fine with the use of command prompt "snmpset -v 1 -c private 192.168.100.60 1.3.6.1.4.1.19865.1.2.1.2.0 i 1".

But no luck with LabView. I get no errors but the device does not respond to the LabView command.

What's wrong?

Try the attached VI. The problem that your application has is that you are using the low level VIs of the library and you aren't using the higher level VIs which provide the full implementation.

snmp communication.llb

simple_snmp_get.vi

Link to comment
  • 3 months later...

I am trying to make the last "snmp get" file from last post to work but i have no success.

The device has private OID, how can i change the community name from public to private?

In which vi do i change it?

OID 1.3.6.1.2.1.1.1 works ok

OID 1.3.6.1.4.1.32111.1.1.2.1 DOES NOT [enterprise.private] work in the same device

Thanks...

Edited by nikolakis
Link to comment

I am trying to make the last "snmp get" file from last post to work but i have no success.

The device has private OID, how can i change the community name from public to private?

In which vi do i change it?

OID 1.3.6.1.2.1.1.1 works ok

OID 1.3.6.1.4.1.32111.1.1.2.1 DOES NOT [enterprise.private] work in the same device

Thanks...

If you use the primitives in .llb file you can specify the community name. The two primitives that you will need are the "SNMP Get Request" and "SNMP Get Response". You will also need to use the "SNMP Get Random Port" and the "SNMP Close Port" VIs. If your device uses different community names for the different branches you will need to separate the requests. A single request can have only one community name.

Link to comment
  • 8 months later...

I have a similiar problem as Nikolakis using your simple SNMP get file. The community name doesn't seem to be to problem because I can change it in the device and it still doesn't work. 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.

I am not sure what to do. I am not sure why labview won't support SNMP, all I need to do is get one value from a device. Any ideas?

Edited by secr1973
Link to comment
  • 2 weeks later...
  • 4 years later...

Do you have any plans on making this library available on LabVIEW for Linux?

Have you tried using this code on Linux?  I didn't try it because I don't have access at the moment, but I see no reason why this wouldn't work on Linux it is just using the UDP primitive calls.

Link to comment
  • 9 months later...

Hi everyone,

 

i had a look at the lbb and have some questions on it. Maybe you can a provide a simple example in the lbb, as i couldnt find one.

 

I try to create an agent, which is repsonding to manager requests. Sadly i cant figure out which vi i need to use to accomplish this task.

 

I attached a simple snippet (´14)

 

post-53295-0-87581500-1459926208.png

 

Thanks much

 

cheers chris

 

 

Link to comment

Hi again,

 

guess this topic isn´t in the focus that much :),

 

I kept on working to towards creating an Labview agent, which is repsonding to a snmp manager (A monitoring software).

 

I solved the problem on receiving snmp commands from a manager. Check the snippet

 

post-53295-0-91675000-1460019499.png

SimpleSnmpExample.vi

 

Still got the problem to are beeing unable to respond to the manager. So far i can guess the lbb, mentioned in the topic, isn´t designed to create an agent.

 

Any informations, or further ideas how to respond propperly are highly appreciated. 

 

Thanks much in advance

 

cheers chris

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.