Jump to content


Photo
- - - - -

help for useing SNMP in labview


  • Please log in to reply
31 replies to this topic

#21 Mark Yedinak

Mark Yedinak

    Extremely Active

  • Premium Member
  • 422 posts
  • Location:Huntley, IL
  • Version:LabVIEW 2011
  • Since:1997

Posted 01 September 2009 - 02:23 PM

Nice to meet you,sir.I'am a yang man.I'am a FPGA lover.Thank you very much.


Welcome to LAVA.
---
Mark Yedinak - Certified LabVIEW Architect and 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

#22 rolfk

rolfk

    LabVIEW Aficionado

  • Premium Member
  • 2,045 posts
  • Location:Netherlands
  • Version:LabVIEW 2011
  • Since:1992

Posted 02 September 2009 - 10:08 AM

Here it is.


Good work. A very nice library.

Rolf Kalbermatter

#23 Mark Yedinak

Mark Yedinak

    Extremely Active

  • Premium Member
  • 422 posts
  • Location:Huntley, IL
  • Version:LabVIEW 2011
  • Since:1997

Posted 02 September 2009 - 03:19 PM

Good work. A very nice library.

Rolf Kalbermatter


Thanks. There are a few things that should be fixed. At the moment if any varbind returns an error no data will be returned for the PDU. The library should parse the all varbinds and only discard those marked with errors.
---
Mark Yedinak - Certified LabVIEW Architect and 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

#24 Athin

Athin

    I've come back for more.

  • Members
  • 2 posts
  • Version:LabVIEW 2009
  • Since:2009

Posted 08 November 2009 - 07:06 AM

Hello!
I try to use these vis but it sends me an error "UDP Write in SNMP Get Request.vi"
I do the following:
1- SNMP Get Random Port.vi
2- SNMP Open Port.vi
3 - SET and GET SNMP vis

Is there a solution?

Thank you!

#25 rolfk

rolfk

    LabVIEW Aficionado

  • Premium Member
  • 2,045 posts
  • Location:Netherlands
  • Version:LabVIEW 2011
  • Since:1992

Posted 08 November 2009 - 09:53 AM

Hello!
I try to use these vis but it sends me an error "UDP Write in SNMP Get Request.vi"
I do the following:
1- SNMP Get Random Port.vi
2- SNMP Open Port.vi
3 - SET and GET SNMP vis

Is there a solution?

Thank you!


You should also give more informations as to the error number and text you receive and also a bit more background in terms of LabVIEW version etc. Also post the test VI you have been executing when you get your errors. Your description of what you are doing is rather compressed and not very clear.

#26 Athin

Athin

    I've come back for more.

  • Members
  • 2 posts
  • Version:LabVIEW 2009
  • Since:2009

Posted 09 November 2009 - 08:59 AM

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?

Attached Thumbnails

  • SNMP SET Screenshot.png

Attached Files



#27 Mark Yedinak

Mark Yedinak

    Extremely Active

  • Premium Member
  • 422 posts
  • Location:Huntley, IL
  • Version:LabVIEW 2011
  • Since:1997

Posted 09 November 2009 - 03:51 PM

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.
---
Mark Yedinak - Certified LabVIEW Architect and 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

#28 Mark Yedinak

Mark Yedinak

    Extremely Active

  • Premium Member
  • 422 posts
  • Location:Huntley, IL
  • Version:LabVIEW 2011
  • Since:1997

Posted 11 November 2009 - 05:46 AM

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.

Attached Files


---
Mark Yedinak - Certified LabVIEW Architect and 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

#29 nikolakis

nikolakis

    One hit wonder!

  • Members
  • 1 posts
  • Version:LabVIEW 2009
  • Since:2009

Posted 03 March 2010 - 04:05 PM

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, 03 March 2010 - 04:40 PM.


#30 Mark Yedinak

Mark Yedinak

    Extremely Active

  • Premium Member
  • 422 posts
  • Location:Huntley, IL
  • Version:LabVIEW 2011
  • Since:1997

Posted 03 March 2010 - 06:29 PM

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.
---
Mark Yedinak - Certified LabVIEW Architect and 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

#31 secr1973

secr1973

    One hit wonder!

  • Members
  • 1 posts
  • Version:LabVIEW 2009
  • Since:2009

Posted 19 November 2010 - 11:26 PM

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, 19 November 2010 - 11:27 PM.


#32 Mark Yedinak

Mark Yedinak

    Extremely Active

  • Premium Member
  • 422 posts
  • Location:Huntley, IL
  • Version:LabVIEW 2011
  • Since:1997

Posted 02 December 2010 - 04:59 PM

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?


There appeared to be an issue in the posted version of the library. I sent secr1973 the latest version and it is working for him.

I have attached the latest version of the library.

Attached Files


---
Mark Yedinak - Certified LabVIEW Architect and 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