05-25-2012 03:06 PM
I can't help you with the timeouts. That is the device, not the LabVIEW code. Again, a network trace would verify this very quickly.
05-25-2012 04:06 PM
Trying with your MIB walk I get some strange results. Sometimes I get up to 6 objects within the same OID branch, some other times, with the same OID I get just 1 or 2. I put a flat sequence structure with a wait inside it, separating the Get Next VI from the Get Response VI but this is isn't helping, I also changed some timeouts.
05-25-2012 04:19 PM - edited 05-25-2012 04:23 PM
@smit9741 wrote:
Trying with your MIB walk I get some strange results. Sometimes I get up to 6 objects within the same OID branch, some other times, with the same OID I get just 1 or 2. I put a flat sequence structure with a wait inside it, separating the Get Next VI from the Get Response VI but this is isn't helping, I also changed some timeouts.
From everything you are descibing the issues are with the device itself, not the LabVIEW code. The code has no control over what or how the device responds to its requests. Get a copy of Wireshark and do a trace. If you want post the trace here and I can look at it. But I suspect the device does not have a very robust or high performance SNMP stack. I have used this code for years and get excellent results with the devices I communicate with. When I have encountered issues it was the devices, not the LabVIEW code.
The only possible case might be if the device is responding with SNMP errors. My packet parsing stops as soon as it encounters an SNMP error and therefore you may not get all of the data. I have been meaning to change it so it parses all of the error free data. However, this only applies to a reposne that has multiple OIDs in it. A MIB walk will always have a single OID in the response packet.
BTW, a delay between the GET-NEXT and the GET-RESPONSE is completely unnecessary. The GET-RESPONSE will wait on the data until it receives the packet or the timeout occur. There is no need to delay before waiting for the data.
05-30-2012 04:40 PM
okay this is what I got running wireshark, what are my options?
Thanks
06-05-2012 01:42 PM
Sorry, I didn't see this thread was updated. It would be much more helpful if you atached the actual traces. Looking at a screen capture of them is pretty useless.
06-15-2012 04:51 PM
I have a question regarding the community name in the Snmp library for labview. Now I´m trying to write to an object that has read/write access according to the objects definitions but with your Set VI I just get SNMP error 5. So I have tried many things without any success and I was thinking that it may be a community name issue I know it should be case sensitive but I have only used the public name so far. In your VI: is it written as Private or PRIVATE? I already discarded private, and I know there´s no problem with the OID since it works fine with the get VI(with other OID´S I had the opportunity to write on objects with the public name)
All the help you can give me trying to solve the problem will be very appreciated,
Thanks
06-15-2012 05:09 PM
Error 5 is a general error. It is not very specific. Are you using the correct type for the data? Is there something specific to the way your are formatting it? Can you post the MIB definition of what you are trying to set and what you are passing the SET VI?
06-15-2012 11:14 PM
I'm pretty sure I'm typing the data correctly, the object I want to reach is an integer and I'm using the format OID/Type/Value. Let me put the relevant parts of the MIB so you can take a look at it, but I'm following the rules, I mean I created the OID using the tree and I know the OID exists since it recognizes the get VI, the problem is with the set that I don't know why it generate that error with those kind of variables that are used to enable/disable functions. Any help you can give me will be great! thanks again
06-18-2012 09:53 AM
Please post the OID, type and value that you are using. Attach a screen shot of your set VI. Also, you do realize that the item yo are setting is a bitfield. Have you used the correct value for what you want to configure?
06-18-2012 04:00 PM
This is one of the OIDs that is bitfield although arccording to the MIB is INTEGER type 1.3.6.1.4.1.1206.4.2.1.1.2.1.21.14 and I was trying to set a value let's say 19 (once it is converted from binary to decimal) I'm not sure if the community name could be the problem, but anyway let me show you a screenshot of my VI. There are 3 pics since it is quite wide. Are there additional requirements for those OIDs that are bitfield? All I did was make a simple conversion from a Boolean to binary 1-0 variable and made my summation over mod2 and then applied the conversion from binary to decimal integer to get the third column of the OID/TYPE/VALUE format. Up to here it seems to work fine, but the Set Request is not recognizing the format or so it seems, that's why I think its a community name problem unless there is a special treatment with bitfield objects