Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

  • how can I know what Data type and Set Type has a specific OID, If I can get information from with "SNMP Host Testing". I have tried with every data type and set type, without results. please i need Your support.0_1541432843390_SNMPHost Testing.png


  • Hi Jorge, welcome to the forum!

    The Data Type is the type within Mango. There are only four types available to SNMP,

    • Alphanumeric (string values, you could have any OID recorded as a string, probably)
    • Numeric (for numbers)
    • Multistate (for integers)
    • Binary (true / false)

    and the read values can be coerced to these types. Here's the function that does it:

        public DataValue variableToValue(Variable variable) {
            switch (vo.getDataTypeId()) {
            case DataTypes.BINARY:
                return new BinaryValue(StringUtils.equals(variable.toString(), vo.getBinary0Value()));
    
            case DataTypes.MULTISTATE:
                return new MultistateValue(variable.toInt());
    
            case DataTypes.NUMERIC:
                double d = 0;
                boolean parsed = false;
                if (variable instanceof OctetString) {
                    try {
                        d = Double.parseDouble(variable.toString());
                        parsed = true;
                    }
                    catch (NumberFormatException e) {
                        // no op
                    }
                }
    
                if (!parsed)
                    d = variable.toInt();
    
                d *= getVO().getMultiplicand();
                d += getVO().getAugend();
    
                return new NumericValue(d);
    
            case DataTypes.ALPHANUMERIC:
                return new AlphanumericValue(variable.toString());
    
            }
    
            throw new ShouldNeverHappenException("Unknown data type id: " + vo.getDataTypeId());
        }
    

    Where Variable is from SNMP4J.

    As for the set type, the best solution is to find a MIB file for the device, which will tell you the object types. You can also probably get this information from the device by doing an SNMP walk without a MIB file. If you have swagger enabled, check out the SNMP tools, specifically POST /rest/v2/snmp/walk/{dataSourceXid}

    Here's the location to open that in your swagger:
    /swagger-ui.html#/snmp-tools-v-2-rest-controller/beginSnmpWalkUsingPOST

    You could also probably figure it out by trial and error.


  • Thanks so much Phil,
    I check it with a Mib Browser and I got the correct Value and the result Type was Octect String,
    I set the The Set Type as octect string in the Scada but i had not results, now im changing the DataType... unfortunately till now with out good result.
    Again, Thanks so much for Your support

    Jorge G


  • Dear Phil, I found it in the MIB File..Also it say that the set Type is Octect String..
    -- 1.3.6.1.1.1
    group1BatteryNum OBJECT-TYPE
    SYNTAX OCTET STRING
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
    "Description."
    ::= { batteryNumEntry 1 }


  • Dear Phil, I found it in the MIB File..Also it say that the set Type is Octect String..

    It says that's the type of object it is, but it says that it is, ACCESS read-only so it does not have a set type, I would think.


  • let me to ask You, how I get the correct infomation for any OID with SNMP Host Testing??
    I have made all combinations with DataType and Set Type without results, but i put the OID in SNMP Host Testing and it work without problem.


  • The "Host Testing" tool is most useful for confirming the OID is resolving, because sometimes there's an extra .1 or little corrections like that, so it's a quick place to test.

    I have made all combinations with DataType and Set Type without results, but i put the OID in SNMP Host Testing and it work without problem.

    If you put it into a data point, that data point would have to be active when the data source did a poll, which is only happening every five minutes in your first image. You could also save, or disable then enable the data source to get it to poll. You can also use the refresh arrows on the /data_point_details.shtm or /ui/data-point-details/ pages to force the point's value to get updated. For the OID you had in the image, you should be able to use a Numeric data type. For testing, I would start with Alphanumeric data points, which should work for anything.


  • Hi, thanks so much for Your support, You are right with alphanumeric type i got the values... now i need to check why with another type as octetct string didnt work. I will back soon with this issue.

    thanks so much again
    Jorge G


  • Hi Jorge,

    You are right with alphanumeric type i got the values... now i need to check why with another type as octetct string didnt work.

    Octet String would only be a set type (for writing data out), and that point. The MIB you posted said it's read-only, so I'm not sure any set type would be able to set a value to it.

    I would have expected Numeric to work as a data type for the OID you posted in the original image, too.