LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in SNMP Communication

Error 1 occurred at UDP Write in SNMP Get Request.vi->Get snmp Item(s).vi->Untitled 1 Possible reason(s): LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @. ========================= NI-488: Command requires GPIB Controller to be Controller-In-Charge.

 

Prashant Soni
LabVIEW Engineer
0 Kudos
Message 1 of 19
(5,609 Views)
Where have you place the "close" for the session? Inside the while loop?  If yes place it outside. Else post a screenshot or attach your vi.
0 Kudos
Message 2 of 19
(5,594 Views)
Can you post your VI? Did you open the port before the write request? I believe you are using the library that I wrote.


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
0 Kudos
Message 3 of 19
(5,587 Views)

Yes Mark Yedinak

i am using your given library

please guide me for TRAP function and give some guidance on this

Prashant Soni
LabVIEW Engineer
0 Kudos
Message 4 of 19
(5,559 Views)

Prashant,

 

Here is a very basic Trap Monitor. The Trap VI is used to monitor the UDP port for SNMP traps. It will decode the data and return the parameters of a trap. (I should have used a cluster and if I update this library I probably will do that.) Do you have a specific question regarding the use of this VI?

 

SNMP Trap Monitor.PNG



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
0 Kudos
Message 5 of 19
(5,539 Views)

thanks Mark

but i have some doubt

i have to fetch UPS data using SNMP and also have to fetch Trap 

UPS has a particular IP address for communication. 

but in your Trap VI there is no option for IP address.

so how can i do that. IP address is required?

 

Prashant Soni
LabVIEW Engineer
0 Kudos
Message 6 of 19
(5,519 Views)
UDP is not connection based so there is no address you specify when opening a refnum. And any UDP data packet your receive also gives you the address from where it originated. So you have to filter that address and see if it matches the address you are interested in and in that case do whatever you need to do with the package.
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 7 of 19
(5,510 Views)

SNMP Traps are asynchronous events that are sent from an agent to either a specified IP address or are sent as broadcast packets. Traps are sent to UDP port 162. The example I included above creates a listener on port 162 and will receive all traps that are either broadcast or sent to the IP address of the PC. The example decodes that trap message. You will have to add code to filter out any traps that you are not interested in. The MIB definition of the UPS should specifiy which OIDs it uses for its traps. The MIB should also define what data is included in the traps.

 

Querying the device itself will require you to use the get request VIs from the library. You will need to know the IP address of the device you want to query and what OIDs you would like to retrieve. Again, the MIB for the devices you are trying to query should provide you with the deatils on the data they provide.

 

While these VIs could use some enhancements they all work quite well. I have been using them for at least 10 years.

 

What UPS are you trying to communicate with? Do you have the MIB for the device? If you post the MIB and let me know what data you are interested in I could tell you which OIDs you will need to use.



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
0 Kudos
Message 8 of 19
(5,484 Views)

UPS NAME:--> Smart-UPS RT 2000 RM XL


i need all events

and bad msg.

here is the attachment of that particular MIB. extension change MIB to xls.pls after downloading this file change it into MIB.

Can i get all traps including generic Trap.
Can u send me updated trap vi.

also can u tell me that how can i import the MIB file .

there is any Particular vi for this operation.

 

 

 

 

 

Prashant Soni
LabVIEW Engineer
0 Kudos
Message 9 of 19
(5,470 Views)

Prashant S wrote:

UPS NAME:--> Smart-UPS RT 2000 RM XL


i need all events

and bad msg.

here is the attachment of that particular MIB. extension change MIB to xls.pls after downloading this file change it into MIB.

Can i get all traps including generic Trap.
Can u send me updated trap vi.

also can u tell me that how can i import the MIB file .

there is any Particular vi for this operation.

 


Prashan! You do realize that Mark has put up his SNMP library up for free use? If this library was part of the Internet Toolkit or some other NI Toolkit it would not be free, nowadays most likely password protected at least on library level, and you could at best put in an feature request and hope it is added in a few years.

 

If I was Mark I would feel your request to him to change it to suit your specific requirements all for free to be rather rude. Read the specs, understand how network communication works and make the few modifications to his library yourself! And then post the improvements so that others can benefit too! Once you have done that you will be able to make even more changes and also have improved your knowledge to be an even better engineer.

 

 

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 10 of 19
(5,463 Views)