![]() |
NetBurner 3.3.8a
PDF Version |
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.
\nburn\pctools\find
.The primary configuration method is through the device's Configuration Web Server. By utilizing a web server, a device can be configured from 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.
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:
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.
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.
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.
\Configuration\Web\BasicWebConfig
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:
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:
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 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:
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.