NetBurner 3.3.3
PDF Version
Device Discovery and Configuration

Introduction

Device discovery and configuration can be accomplished in a number of ways, including methods that are platform independent, including Windows, macOS, Linux, tablets and mobile phones.

Note
Please refer to the Production and Deployment section of this document for methods and utilities designed to program and configure devices in a production environment.

Device Discovery Methods:

  • If the device and computer have Internet access, open a web browser and go to discover.netburner.com
  • Use the localdiscover utility. This is a multi-platform utility written in Golang for windows, osx and linux. The compiled version can be distributed to your customers, but not the Golang source code.
  • The Python find utility, located in \nburn\pctools\find.
  • Use the debug/console serial port

Device Configuration methods:

  • Interactively using a web browser to access device's Configuration Server
  • Sending a JSON object and a utility such as wget (See Production and Deployment)
  • The device's serial interface to the Configuration Server

The primary configuration method is through the device's Configuration Web Server. By utilizing a web server, a device can be configured from any any platform or operating system. The underlying configuration mechanism is handled through a JavaScript Object Notation (JSON) object. This will be described in more detail later, but the important point is that it provides a simple interface that can be used by non-embedded developers (e.g. web developers) to interact and configure the device. The implementation is also designed to enable you to add any application specific information to be stored and accessed in the same manor, such as calibration values, set points, etc.

You are also able to create your own configuration web interface that will appear in place of the default interface. In this way you can organize and present data in the appropriate way for your customers, as well as add your own custom logo, images and descriptions. Examples are provided.

Configuration Procedure

  • Connect your NetBurner device to a network with Internet access.
  • Open a web browser on your host computer and go to discover.netburner.com. You will see a list of devices on your network. (If the device does not have Internet access, use the localdiscover utility instead).

All system and application settings can now be viewed and/or modified by navigating the tree structure.


Using discover.netburner.com:




Using localdiscover utility:




The "Device" link will take you to the device application web page. The "ConfigPage" link will take you to the device configuration web page, as shown below:




The JSON Object

It is not necessary to understand the underlying JSON implementation, but for those that are interested a sample JSON object is shown below. It identifies each configuration field, which can range from a string, boolean, or a selection of values. For developers, the programmers guide and examples provide the operational details.

Warning
If you do decided to use any of the JSON configuration methods, you must first download a JSON object from your specific device. Under no circumstances should you use the example below as you actual device will likely be different in some respects.

The root of the object is Config. The next levels are AppData and Sys. AppData is available for your application to store information. Sys is used for the system configuration such as IP settings.

{
"Config":{
"AppData":{},
"Sys":{
"Application":"Simple HTML Example",
"Boot":{
"Abort":"A",
"BootBaud":115200,
"BootDelay":2,
"BootQuiet":false,
"BootUart":0,
"Password":"",
"SerialConfig":{
"Choices":"DuringBoot, AlwaysEnabled, PauseAfterBoot, Disabled", "Value":"DuringBoot"
},
"User":""
},
"NetIf":{
"Ethernet0":{
"DeviceName":"",
"DhcpDiscoverSec":1,
"DiscoveryObfuscate":true,
"DiscoveryReportInterval":900,
"DiscoveryReportUrl":"discover.netburner.com/DevicePost",
"IPv4":{
"ActiveAddr":"10.1.1.73",
"ActiveDNS1":"10.1.1.1",
"ActiveDNS2":"0.0.0.0",
"ActiveGate":"10.1.1.1",
"ActiveMask":"255.255.252.0",
"AutoIPAddr":"169.254.131.245",
"AutoIPEn":true,
"Mode":{
"Choices":"DHCP,DHCP w Fallback,Static,Disabled", "Value":"DHCP"
},
"StaticAddr":"0.0.0.0",
"StaticDNS1":"0.0.0.0",
"StaticDNS2":"0.0.0.0",
"StaticGate":"0.0.0.0",
"StaticMask":"0.0.0.0"
},
"IPv6":{
"ActiveAddr":["2602:306:b8e9:c83f::14c0","2602:306:b8e9:c83f:203:f4ff:fe0b:83f5","fe80::203:f4ff:fe0b:83f5"],
"ActiveDNS":["2602:306:b8e9:c83f:208:a2ff:fe0c:b081","2602:306:b8e9:c83f:208:a2ff:fe0c:b081"],
"ActiveRoute":["fe80::1:1"],
"Mode":{
"Choices":"DHCP,DHCP w Fallback,Static,Disabled", "Value":"DHCP"
},
"StaticAddr":"::",
"StaticDNS1":"::",
"StaticDNS2":"::"
},
"MAC":"00:03:F4:0B:83:F5"
}
},
"Platform":"MODM7AE70"
},
"Version":8,
"Reboot":false
}
}



Developer Notes

If you were writing a web interface and need only the data under Ethernet in the tree, it can be accessed by: http://10.1.1.71:20034/UI.html?CONFIG/SYS/NETIF/Ethernet

To obtain just the IP address: http://10.1.1.71:20034/UI.html?CONFIG/SYS/NETIF/Ethernet/IPv4/ActiveAddr


Recommended Examples: The following examples are recommended to begin evaluating the platform. They are located in the \nburn\examples directory.

  • ShowInterfaces
  • \Configuration\Web\BasicWebConfig



Configuration Security

One of the features of NetBurner 3.0 is that each device is configured though its own configuration web interface. Data sent and received through the network interface has three options for security:

  • Open: No security, plain text
  • Obfuscated: Encrypted, but without TLS and a secure certificate and private key
  • Secure: Encrypted with TLS and a certificate and private key



Serial Port Configuration

If enabled, the Configuration Server can be accessed through the device serial port. The configuration tree is exactly the same as what you see on the web interface and in the JSON object. For example, the Ethernet0 settings are located at Config > Sys > NetIf > Ethernet0.

The serial port interface is located on UART0 by default. It can be modified and enabled/disabled in the Config > Sys > Boot level of the Configuration Server.


To access the serial port configuration:

  • Connect a cable to the serial port selected as the BootUart
  • Run a serial terminal program such as MTTTY
  • Reset the device, and type a 'A' when prompted to Abort the boot sequence


You are now in the serial configuration mode as indicated by the '>' character. Typing "help" will display the help menu.


If we type the "ls" command we can see the next level of the tree is Config, since we are at the root level. In this example we will set the Static IP values. Note that to change from DHCP to static, we must also change the Mode option from DHCP to Static. To navigate to the next level you type type in the name of that level. For example, to go to the Config level:


The prompt will show the current location, in this case Config>. In the same manor to navigate to the IPv4 settings the level names are typed into the terminal. Note that tabbed auto-completion is also available.


At any level, typing a "?" will display the current values of that level and all levels beneath in the JSON object format. For example:


In this example we are interested in the static IP settings. There are two choices to set them: from the IPv4 level by including the name of the next level and the value, or by going down to each level individually and entering just the value. In this case we will stay at the IPv4 level and include the name of the static item we want to set. To set the StaticAddr type: StaticAddr="10.1.1.99". We will also type a "?" to see the changed value:


In the same manor we will set the Mask, Gateway and DNS. To set the Mode we will need to either include the Mode level in the setting string or go to the Mode level, since the setting is a Choices selection and not a simple string like the static IP settings. To accomplish this from the IPv4 level type: Mode.Choices="Static". If you navigate the to Mode level, the command would be: Choices="Static". At this point the unsaved settings are:


Warning
From the settings display you can see that the Mode selector control has two settings: Choices and Value. The Choices are values that appear in the web page selector control and you do not want to modify them. Only modify the Value to one of the Choices values.

To store the modified values in the Configuration Record in Flash memory, type #save. This will store the values, but the IP settings will not take effect until the device is rebooted.