Any network scenario created in NetSim GUI is converted into an XML based Configuration.netsim file. The various sections of the Configuration file is explained in Section 5.2 of NetSim User Manual. Similarly, the Configuration file can act as an input to NetSim GUI to load a saved network scenario. Any configuration that can be done in the GUI can also be done via Configuration.netsim file. As an example you could refer the following knowledge base article link which demonstrates addition of a wireless node in MANET network scenario via Configuration file:


https://tetcos.freshdesk.com/solution/articles/14000084736-how-to-add-a-new-device-to-the-manet-network-via-netsim-configuration-file-


Following is an example associated with IoT network scenario in NetSim:


  • In NetSim IoT module click and drop a sensor, LoWPAN gateway, a router and a wired node. Establish connections and configure an application. image


  • Save the network scenario to obtain a dummy configuration file to obtain the outline of the IoT Configuration file. 

image

  • Further, since the configuration file is organized into different sections each enclosed within tags, you could individually generate different sections of Configuration file via scripts and combine them to form the complete Configuration file. 


For example, 

Device Configuration:

In case of Device configuration, lets assume that all devices are initially going to have similar properties, except unique properties such as DEVICE_IDDEVICE_NAME, IP_ADDRESS, MAC_ADDRESS, X_OR_LON, Y_OR_LAT etc.

Then you could write a script which uses the general structure of the Device Configuration as shown below and writes a file which contains a number of devices as per your requirement:


"<DEVICE DEVICE_ICON_PATH=\"C:/Program Files/NetSim Standard9.0.4/Docs/Icons/SensorDrop.png\" DEVICE_ID=\""+DeviceId+"\" DEVICE_NAME=\"Sensor "+dev_name+"\" DEVICE_TYPE=\"Sensor_1\" INTERFACE_COUNT=\"1\" TYPE=\"SENSOR\">\n"

  +"<POS_3D X_OR_LON=\""+x_coord+"\" Y_OR_LAT=\""+y_coord+"\" Z=\"0\">\n"+"<MOBILITY GROUP_ID=\"1\" MODEL=\"RANDOM_WAY_POINT\" PAUSE_TIME=\"0\" VELOCITY=\"0\"/>\n"

  +"</POS_3D>\n"+"<INTERFACE ID=\""+WLNInterId+"\" INTERFACE_TYPE=\"ZIGBEE\">\n"+"<LAYER TYPE=\"NETWORK_LAYER\">\n"+"<NETWORK_PROTOCOL NAME=\"IPV4\" SETPROPERTY=\"true\">\n"+"<PROTOCOL_PROPERTY DEFAULT_GATEWAY=\"\" IP_ADDRESS=\""+IP_Addr+"\" SUBNET_MASK=\"255.255.0.0\"/>\n"+"</NETWORK_PROTOCOL>\n"+"<PROTOCOL NAME=\"ARP\" SETPROPERTY=\"true\">\n"+"<PROTOCOL_PROPERTY ARP_RETRY_INTERVAL=\"10\" ARP_RETRY_LIMIT=\"3\"/>\n"+"</PROTOCOL>\n"+"</LAYER>\n"+"<LAYER TYPE=\"DATALINK_LAYER\">\n"+"<PROTOCOL NAME=\"IEEE802.15.4\" SETPROPERTY=\"true\">\n"+"<PROTOCOL_PROPERTY ACK_REQUEST=\"Enable\" GTS_PERSISTENCE_TIME=\"4\" MAC_ADDRESS=\""+mac_Addr+"\" MAX_BE=\"5\" MAX_CSMA_BACKOFF=\"4\" MAX_FRAME_RETRIES=\"3\" MIN_BE=\"3\" MIN_CAP_LENGTH_SYMBOLS=\"440\" UNIT_BACKOFF_PERIOD_SYMBOLS=\"20\"/>\n"+"</PROTOCOL>\n"+"</LAYER>\n"+"<LAYER TYPE=\"PHYSICAL_LAYER\">\n"+"<PROTOCOL NAME=\"IEEE802.15.4\" SETPROPERTY=\"true\">\n"+"<PROTOCOL_PROPERTY CCA_MODE=\"CARRIER_SENSE_ONLY\" CHIPRATE_MCPS=\"2000\" CONNECTION_MEDIUM=\"WIRELESS\" DATARATE_KBPS=\"250\" EDTHRESHOLD_DBM=\"-95\" FREQUENCYBAND_MHZ=\"2400\" MIN_LIFS_PERIOD_SYMBOLS=\"40\" MIN_SIFS_PERIOD_SYMBOLS=\"12\" MODULATION_TECHNIQUE=\"O-QPSK\" PHY_SHRDURATION=\"3\" PHY_SYMBOLPEROCTET=\"0.4\" RECEIVER_SENSITIVITY_DBM=\"-85\" SYMBOLRATE_KSYMBOLSPS=\"62.5\" TURNAROUNDTIME_SYMBOLS=\"12\" TX_POWER=\"1\" UNIT_BACKOFFTIME_SYMBOLS=\"20\">\n"+"<POWER ENERGY_HARVESTING=\"On\" IDLEMODE_CURRENT_MA=\"3.3\" INITIAL_ENERGY_mW=\"1000\" RECEIVING_CURRENT_MA=\"9.6\" RECHARGING_CURRENT_MA=\"0.4\" SLEEPMODE_CURRENT_MA=\"0.237\" SOURCE=\"Battery\" TRANSMITTING_CURRENT_MA=\"8.8\" VOLTAGE_V=\"3.6\"/>\n<SENSOR SENSING_INTERVAL=\"1000\" SENSOR_RANGE_M=\"100\"/>\n"+"</PROTOCOL_PROPERTY>\n"+"</PROTOCOL>\n"+"</LAYER>\n"+"</INTERFACE>\n"+"<LAYER TYPE=\"APPLICATION_LAYER\"/>\n"+"<LAYER TYPE=\"TRANSPORT_LAYER\">\n"

  +"<PROTOCOL NAME=\"TCP\" SETPROPERTY=\"FALSE\">\n"+"<PROTOCOL_PROPERTY ACKNOWLEDGEMENT_TYPE=\"Undelayed\" CONGESTION_ALGORITHM=\"OLD_TAHOE\" TCP_MSS=\"1460\" WINDOW_SIZE=\"8\"/>\n"

  +"</PROTOCOL>\n"+"<PROTOCOL NAME=\"UDP\" SETPROPERTY=\"true\">\n"+"<PROTOCOL_PROPERTY SEGMENT_SIZE=\"1472\"/>\n"+"</PROTOCOL>\n"+"</LAYER>\n"

  +"<LAYER TYPE=\"NETWORK_LAYER\">\n"+"<ROUTING_PROTOCOL NAME=\"DSR\" SETPROPERTY=\"true\">\n"+"<PROTOCOL_PROPERTY ACK_TYPE=\"NETWORK_LAYER_ACK\"/>\n"+"</ROUTING_PROTOCOL>\n"+"</LAYER>\n"+"</DEVICE>\n"


The Device properties can then be copied to the dummy configuration file.


Application Configuration:

Similarly, in case of application configuration, lets assume a case where the APPLICATION_TYPE, PACKET_SIZE, INTER_ARRIVAL_TIME etc constant, with either or both SOURCE_ID and DESTINATION_ID varying for each application, then you could write a script which uses the general structure of the application type as shown below and writes a file which contains a number of applications as per your requirement:


"<APPLICATION APPLICATION_METHOD=\"UNICAST\" APPLICATION_TYPE=\"SENSOR_APP\" DESTINATION_COUNT=\"1\" DESTINATION_ID=\""+dev_id2+"\" ENCRYPTION=\"NONE\" END_TIME=\"100000\" ID=\""+appid+"\" NAME=\"" +app_name+"\" PRIORITY=\"LOW\" QOS=\"BE\" RANDOM_STARTUP=\"FALSE\" SHOW_LINE=\"SHOW LINE\" SOURCE_COUNT=\"1\" SOURCE_ID=\""+dev_id1+"\" START_TIME=\"0\">\n"

      +"<PACKET_SIZE DISTRIBUTION=\"CONSTANT\" VALUE=\"50\"/>\n"

      +"<INTER_ARRIVAL_TIME DISTRIBUTION=\"CONSTANT\" VALUE=\"1000000\"/>\n"

       +"</APPLICATION>\n";


The application properties can then be copied to the dummy configuration file.


After performing changes to Device and application configuration and suitably editing the other sections such as DEVICE_COUNT, CONNECTION link properties, COUNT of applications etc you can open the Configuration in NetSim GUI using Open Network option in the NetSim Home Screen.

image