Using SNMP virtual object and LUA scripting for NEWTEC device exploitation

Newtec is a hardware and software designer of satcom solution. The Professional Equipment business line offers off -the-shelf equipment for broadcasters, network operators and service providers.  Newtec’s Broadband Systems offer high-speed 2-way satellite connectivity to large numbers of remote sites.

The following document explains How To use the advanced feature of the LoriotPro Extended Edition for collecting statistics and status information from Newtec Devices by using SNMP and the virtual SNMP object concept of LoriotPro.

The concept of SNMP virtual object in LoriotPro allows the LoriotPro SNMP Manager to query SNMP objects that are not real and existing SNMP object in a device. Instead the objects are script files written with the LUA language. The script perform any kind of tasks but it is use to make one or multiple SNMP request that are real this time.  

The Newtec device SNMP functionalities and the associated MIB provide a rich set of information on the device working status and statistics.

One of the MIB table used in this example provide for one of its indexed SNMP objet (ntcdevsmod01dmmodcodstatstruct) a full set of information returned as a string. The string is a set a value separated with coma.

mib table modulator

A request to a NewTec device for this table is given below:


The string return  by the ntcdevsmod01dmmodcodstatstruct object should be decoded

Example  : 21,1,0,3089,0,1,10.08,1,10.98,1,29.76

value 1

corresponds with a modulation code , a cross reference table should be checked for this and the corresponding modcod displayed

value 2

"1"  corresponds with a frame type ,  1= normal 0= short

value 3

"0" corresponds with pilot on /off , 0=off    1=on

value 4

"30504" corresponds to " baseband frames count"

value 5

"0" corresponds to " uncorrectable baseband frames"

value 6

"1" is not used

value 7

"11.84" corresponds to channel quality estimation, this value should be displayed in a graph also , detailed as possible and logged in a database (expressed in dB)

value 8

"1"  not used for the moment

value 9

"15.43" corresponds to C/D estimation ( C/D = carrier to distortion ) this value should be displayed in a graph also , detailed as possible and logged in a database (expressed in dB)

value 10

"1" is not used for the moment

value 11

"21.54" is corresponding to Link margin estimation , this value should be displayed in a graph also , detailed as possible and logged in a database (expressed in dB)



  To be able to exploit this value and check threshold or use it in graphs it is necessary to get the full value and to extract one by one the interesting information.

This is where LUA scripting and SNMP virtual object are very useful.

The steps to performs to solve this problems consists of :

·         Creating a MIB file with all necessary virtual objects.

·         Creating for each virtual object a corresponding script file.

Lua script files are defined for each SNMP virtual object. The script name is exactly the same as the object name in the MIB file (next in the document).

Download project files


Retrieve the Basaband Frames count


Retrieve the Uncorrectable baseband frames


Retrieve the Channel Quality Estimation


Retrieve the C/D Estimation


Retrieve the Link Margin Estimation



The Script files are defined first.

They can and should be tested before using it through virtual object.

Use the Script Editor Development environment of LoriotPro for developing and testing


To test the script you should specify a valid Newtec IP address in the lp_host field and a valid index in the lp_index filed of the development environment.


The index value should be the one displayed in the ntcdevsmod01dmmodcodstatstruct table. The index is composed of three values (exemple .1.1.3 line 3 in the table)


The device should be in the directory and should be in green status else the script will not return values.

When done press the F5 key or select the Compiler menu option and the Run Script option.

Example of trace.

object setting

When all the scripts are defined and tested, you can start to write the MIB file

The MIB file is created with a simple text editor. The MIB contains the IMPORT of the Father MIB containing the father object ntcMIB. Anther object is created as a container of all the virtual snmp object that we create (NewTecLPScripts).

The ACCESS keyword must contain the reserved value lp_acccess_script. With this keyword LoriotPro will try to find a lua script file to execute with the same object name.

Variable name and oid number are in green for a better understanding of the structure.



-- Loriotpro V5

-- rev 1.0

-- Script files should be located in /bin/config/script

-- WARNING Do not use object of lp_access_script type in scripts

-- Parameters  give to the script by LoriotPro

-- lp_index index use for snmp request, example: ".1"

-- lp_oid an oid if necessary, example: "ifnumber"

-- lp_host the host ip address for the request ""


    ntcMIB           FROM NEWTEC-MAIN-MIB;  

ntcLPScripts     OBJECT IDENTIFIER ::= { ntcMIB 1000}  

ntcDevsMod01DmModCodStatStructBasebandFramesCount OBJECT-TYPE

    SYNTAX      Integer32

    ACCESS      lp_access_script

    STATUS      current


                "Baseband Frames Count from ntcDevsMod01DmModCodStatStruct, object number 4 in returned string"

    ::= { ntcLPScripts 134 }  

ntcDevsMod01DmModCodStatStructUncorrectableBasebandFrames OBJECT-TYPE

    SYNTAX      Integer32

    ACCESS      lp_access_script

    STATUS      current


                "Uncorrectable Baseband Frames from ntcDevsMod01DmModCodStatStruct, object number 5 in returned string, expressed in DB"

    ::= { ntcLPScripts 135 }


ntcDevsMod01DmModCodStatStructChannelQualityEstimation OBJECT-TYPE

    SYNTAX      Integer32

    ACCESS      lp_access_script

    STATUS      current


                "Channel Quality Estimation from ntcDevsMod01DmModCodStatStruct, object number 7 in returned string, expressed in DB"

    ::= { ntcLPScripts 137 }  

ntcDevsMod01DmModCodStatStructCDEstimation OBJECT-TYPE

    SYNTAX      Integer32

    ACCESS      lp_access_script

    STATUS      current


                "CD estimation from from ntcDevsMod01DmModCodStatStruct, object number 9 in returned string, expressed in DB"

    ::= { ntcLPScripts 139 }  

ntcDevsMod01DmModCodStatStructLinkMarginEstimation OBJECT-TYPE

    SYNTAX      Integer32

    ACCESS      lp_access_script

    STATUS      current


                "Link Margin Estimation from ntcDevsMod01DmModCodStatStruct, object number 11 in returned string, expressed in DB"

    ::= { ntcLPScripts 1311 }

  When the MIB is finished it is necessary to compile it and the other required MIB file required for the project.  


Quit the compiler, but do a Database->Save To Startup Database in the main menu of the Compiler


When done you should ckeck that all the entries are present in the MIB tree.  

To find the entry of Newtec object open the search Tool Bar  and type  


The object below can be used in LoriotPro in other module now.  







We will use them to do a linear graph  

Select the device in the directory and do an Insert Task Linear Graph.  

Enter the ntcDevsMod01DmModCodStatStructChannelQualityEstimation and add the required index (.1.1.1 and .1.1.2 in the example below)

Select gauge in the graph type



Can also be used the virtual object in an Active View  

A matrix of vu-meter is used to display the first 3 index of in the table.  


For each Vu-meter the properties are define as defined below (Vu-meter object Channel Quality .1.1.1)  


The background of the vu-meter color is defined by comparing the returned value to a threshold.

The same threshold can be use to trigger an Event to LoriotPro event receiver.  


Using script in the RRD collector graph solution  

The script defined before can also be used in the RRD Collector.  

They should be slightly modified and place in the directory /bin/config/script/RRDscript  

The modification consist of the two lines below that should be added at the beginning of the script  

--<SCRIPT_NAME>Channel Quality Estimation</SCRIPT_NAME>

--<SCRIPT_DESCRIPTION>NewTec Demodulator Channel Quality Estimation</SCRIPT_DESCRIPTION>  

This lines are for the ntcDevsMod01DmModCodStatStructChannelQualityEstimation.lua script  

In the RRD collector we use the LUA script tab in the configuration.

If you press insert you will see the script in the list. Choose the line Channel Quality estimation by double click.  


 You should specify the ip address and the SNMP index as in our example.

You should change the description, to identify the entry (channel) here because this one will become the legend of the graph entry

Example : Channel 1 Quality estimation

The current description is initialized with a default value declare in the script file.

You can do a run to check that values are returned.

Proceed for each graph entry you need for each index. You should get a list of entries.

Initialize the database when all your entries are defined.


After a while you should see your graph.

You need to click on View Report

And either should a report (web page) or a graph image file.


A click on the Report display  WEB page with the report


End of document