Device Configuration
Previously device configuration was accomplished with IPSetup, a windows based program. In 3.0 there are a number of ways to configure the device that are independent of the host computer type. The primary method is through the device's own configuration web server. In this way the device can be configured by a web browser on any platform. There is also a serial interface configuration method.
- Can be configured by any web browser, and applications can be programmed into the device. Note: Autoupdate and IPSetup are no longer used to download applications or configure the device. However, you can still use IPSetup to discover a device's IP address.
- Devices can be found by typing discover.netburner.com in the web browser URL field.
- 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 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.
Discover Page
- The "Device" link will take you to the device's web page. The "ConfigPage" link will take you to the device's configuration web page as shown below:
Configuration Page
A sample JSON object is shown below: {
"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
}
}
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
\ConfigDemo\BasicConfig
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
Each NetBurner device generates a default certificate and private key, which is stored in its internal flash memory, which can be used to secure the connection as a self-signed certificate. You can also use the device’s private key to create your own externally self-signed certificate, or have a certificate issued by a recognized third party. The externally signed certificate can then be installed by overwriting the device's default key.
Cautions When Using the Jumper Recover Procedure on a Device
Each device has a location to insert a shorting jumper to reset the module in the event of a catastrophic software problem, such as downloading an application image that corrupts flash memory or crashes. This recovery procedure will erase all of flash memory and download a recovery image. A new private key and certificate will then be generated. In such a case, any external self-signed or third party certificates will no longer be valid since the private key will have changed. A new certificate will have to be created from the new private key.
Application Downloads
AutoUpdate is no longer used for download application to your device.* You will notice there is an Update Application on the web page. Application are now uploaded using the web interface. Alternatively, there is a windows executable that can be run from the command line in \nburn\pcbin\nbupdate.exe
. Application images are now .bin
files, they are no longer .s19
files. If building in NBEclipse the .bin
file will be located in your workspace project's release folder. The format using nbupdate.exe
is as follows:
nbupdate <application .bin file> <device IP>
Eclipse and Development Tools Updates
Summary of new and improved features:
- Eclipse has been updated to the Oxygen version. It also takes advantage of multiple processor cores on the host computer to greatly speed up compile times. Note: if using the command line to build you can use make
-j
to use multiple cores.
- GCC has been updated to version 8.1.
- Each project now has its own NetBurner library. Now any system changes you make will be specific to the project, and each project can have its own modifications.
- The makefile implementation is now identical for NBEclipse and command line builds.
Notes on Porting From Previous Revisions
- Big endian vs. little endian. The ColdFire processors have a bin endian architecture, while ARM processors are little endian. If you have code that manipulates 16-bit or 32-bit numbers that relay on a big endian format you will need to modify for little endian.
- The typical startup sequence of function calls:
IntializeStack()
, GetDhcpIfNecessary
, EnableAutoUpdate()
, etc have been replaced with a single call: init()
which is declared in the header file init.h
. You will need to remove header files such as:
#include <startnet.h>
#include <autoupdate.h>
#include <dhcpclient.h>
#include <NetworkDebug.h>
- The real-time operating system has been modified to increase performance and capabilities. The header file
ucos.h
is now nbrtos.h
. Any RTOS function calls that had UCOS
in related names have been modified to reflect this.
UCOS_ENTER_CRITICAL
has been replaced with NBRTOS_ENTER_CRITICAL
.
- The
StartHTTP()
function is now StartHttp()
and StartHttps()
.
- Callbacks have been added to replace the MyDoGet() and MyDoPost() functions. See HTML Processing for examples on usage.
- A new function has been added to wait for an active network connection, meaning the device has link. A typical startup sequence will be:
- Types such as
WORD
, DWORD
, etc have been replaced with uint16_t
, int16_t
, uint32_t
, int32_t
, etc.
- Registering a name with a DHCP server is no longer done by assigning a string to
extern const char pDHCPOfferName
. It is now set by assigning a name to the configuration tree JSON object element: CONFIG:SYS:NETIF:Ethernet:DeviceName
.
- Runtime calls to the network interface such as
EthernetIP()
have been removed. Please refer to the ShowInterfaces example for methods to obtain runtime interface data.