LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SNMP implementation

Hi all, I'm new around here. I need some help, I need to communicate a  controller (as an agent) that supports NTCIP with a PC (server) using SNMP but I don't know where to start, I have gone through a lot of research about NTCIP & SNMP but I have no clue where to start neither how to create a MIB with labview. In the beginning I want to ask the controller for data objects it has stored, and later on I want to modify them. 

I already downloaded the snmp toolkit from lava forum

 

Any help you can give me will be really appreciated

 

Sincerely, Andres

0 Kudos
Message 1 of 53
(6,489 Views)

There are no NI supplied SNMP libraries that I am aware of.

 

My company uses the SNMP Toolkit for LabVIEW which works well.

 

http://www.snmptoolkit.com/

 


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 53
(6,480 Views)

I do have a SNMPv1 toolkit that I found on LAVA, but my question is that I don't know where to start my project although I already went through NTCIP and SNMP documentation I'm totally lost about creating the MIB, how to pass the objects and in the end, how to communicate with the controller using SNMP

0 Kudos
Message 3 of 53
(6,471 Views)

For creating a MIB I would look for some MIB editors. It will help you to format the MIB correctly. The LabVIEW code will not use the MIB file itself unless it has the capability to compile a MIB. If you are using the one off LAVA it is a good bet it is the one I wrote. This library will not compile the MIB.

 

SNMP it self is nothing more than a tree structure. The OIDs are the unique identifier within the tree. So, for the standard MIB definition for the sysDescr the OID would be 1.3.6.1.2.1.1.1. Most MIB browsers would show this looking something like:

1.

->3.

---->6.

-------->1.

etc.

 

If you are defining your own MIB you would need to register your enterprise. This is free but is reserves a branch in the enterprise branch for your company. This is not absolutely required provided you never connect to a network that would have devices of whatever enterprise ID you chose to use. However, it would be best to register your ID.

 

Create of the structure is up to you. How you group things, whether it is a table or a single element, etc. is all a mater of how you define your data. No one can really give you an answer on that without seeing what data you want to manage and what exactly you will be doing.

 

Accessing data is generally performed using simple messages (PDUs in SNMP parlance) using the OIDs. To read data you specify an OID and whether you want to read that exact value or the next value in the MIB tree. To set an element you have to provide the OID, type and value for the element. In SNMPv1 all data must be set individually. That is, to set a table you have to set each value using it's OID, type and value.

 

I would suggest you pick up a basic SNMP book to help you along. The protocol itself is pretty easy. Defining a good MIB is the hard part. Mind you, the mechanics of defining a MIB is easy. The hard part is determing what you want to manage and how it should be organized.



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 4 of 53
(6,466 Views)

It appears that NTCIP defines a standard protocol based on SNMP for communicating with traffic control equipment.

 

http://www.ntcip.org/info/

 

If you are communicating with a controller that is compliant, you should be able to use the information in the MIB(s) defined by NTCIP, which should be available from 

 

http://www.ntcip.org/library/MIB/

 

 


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 5 of 53
(6,449 Views)

Indeed I need it to get information stored in a traffic controller, I guess the idea is that since NTCIP is based on SNMP and UDP I would only have to open the UDP port, then use the SNMP Get Request to communicate with the controller indicating which variable I want to get (assuming that at this point I will already know what is stored in the MIB),  later use the Get Response VI to get the info back, and finally close the UDP port, is this assumption true?

0 Kudos
Message 6 of 53
(6,436 Views)

Yes, that is basically what you would need to do.



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 7 of 53
(6,429 Views)

okay, this is what I have so far, but I'm not sure what other things I would need to do in other to get the variables that I need, since it looks to small for me, considering that I'm going to work with a Peek ATC-1000 (NTCIP compliant) controller and request information from its MIB such as green time, pedestrian walk time, etc and later on I also would like to change some of its parameters although that I know that would be with SET instead of GET, but first of all I just plan to get the variables stored in the controller. Any suggestions to improve this first step that I have done here?

0 Kudos
Message 8 of 53
(6,415 Views)

Since you are using my SNMP code you should use the SNMP Open and SNMP Close VIs that are part of teh library. You will also need the correct OIDs for the data elements you want to retrieve. Make sure that you are using the correct Community Names as well. You could also try running the MIB Walk example that is part of the library to see what data you get back.



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 9 of 53
(6,411 Views)

let me see if I am getting it right, you are saying that I should use SNMP open and close instead of UDP open/close. and when you say to use the MIB walk example you're refering to the MIB Walk Vi right? or is the example in a different folder?

0 Kudos
Message 10 of 53
(6,405 Views)