Configuration Server Programming Guide
Introduction
The NetBurner Configuration System provides a comprehensive solution for managing system and application settings stored in flash memory. This system enables configuration through multiple interfaces while maintaining data persistence across power cycles.
Configuration System Overview
Configuration System
│
v
┌─────────────────┼─────────────────┐
│ │ │
v v v
Web Interface Application Code Serial Interface
(Port 20034) (Direct Access) (UART Console)
│ │ │
└─────────────────┴─────────────────┘
│
v
JSON Storage
(Flash Memory)
Access Methods
The configuration data can be accessed and modified through multiple interfaces:
- System Configuration Web Server - Port 20034
- Application Code - Direct programmatic access
- Custom Web Interface - Your own web pages
- Serial Config Server - Command-line interface via UART
Key Features
- Persistent Storage - All settings saved to flash memory
- JSON Format - Configuration stored as JSON blobs
- Hierarchical Structure - Tree-based organization with leaves
- Flexible Access - Modify entire JSON or individual components
- Version Control - Automatic version tracking on updates
- Application Upload - Built-in firmware update capability
Configuration Structure
The configuration system uses a hierarchical tree structure with distinct branches for system and application data.
Configuration Tree Hierarchy
Config (Root)
│
┌────────────┼────────────┐
│ │ │
v v v
Version Reboot [Branches]
│
┌───────────────────┴───────────────────┐
│ │
v v
AppData Sys
(Application Data) (System Settings)
│ │
┌─────────┴─────────┐ ┌─────────────┴─────────────┐
│ │ │ │
v v v v
User-Defined Custom Data Boot NetIf
Variables Objects Settings (Network Interfaces)
Root Level: Config
The top-level Config object contains:
| Field | Type | Description |
Version | Integer | Automatically updated when settings saved |
Reboot | Boolean | Forces module reboot when configuration updated |
AppData | Object | User application data container |
Sys | Object | System settings container |
Example Structure:**
{
"Config": {
"Version": 15,
"Reboot": false,
"AppData": { ... },
"Sys": { ... }
}
}
Config.AppData
The AppData leaf is dedicated to user application data, providing a designated space for custom settings and parameters.
Purpose and Usage
Application Configuration
│
v
AppData
│
┌────────────┼────────────┬────────────┐
│ │ │ │
v v v v
Strings Integers Lists Custom
Objects
Available Configuration Objects
The system provides various typed configuration objects:
Example: Application Settings
namespace AppConfig
{
"Display name for this device");
"Sensor sampling rate (Hz)");
"Enable data logging");
{"Normal", "Debug", "Production"},
0, "Operating mode");
}
Boolean Configuration Variable.
Definition config_obj.h:997
Chooser Configuration Variable - Select From a List of Items.
Definition config_obj.h:2027
Signed 32-bit Integer Configuration Variable.
Definition config_obj.h:700
String Configuration Variable.
Definition config_obj.h:1127
Configuration Object Hierarchy
Config.AppData
│
┌────────────┼────────────┬────────────┐
│ │ │ │
v v v v
DeviceName SampleRate EnableLogging Mode
(string) (integer) (boolean) (chooser)
For detailed examples**, see:
BasicConfigVariable example
\examples\Configuration\BasicConfigVariable
Config.Sys - System Settings
The Sys leaf contains all device system settings including boot parameters and network configuration.
System Configuration Tree
Config.Sys
│
┌───────────┴───────────┐
│ │
v v
Boot NetIf
(Boot Settings) (Network Interfaces)
│ │
v v
[Boot Options] [Interface Settings]
Config.Sys.Boot - Boot Settings
Boot settings control system startup behavior, security, and serial configuration access.
Boot Configuration Parameters
| Parameter | Type | Description |
Abort | String | Key sequence to interrupt boot (default: "A") |
BootBaud | Integer | Baud rate for boot UART |
BootDelay | Integer | Wait time for abort sequence (seconds) |
BootQuiet | Boolean | Suppress boot output messages |
BootUart | Integer | UART number for boot output |
Password | String | Configuration/upload password |
User | String | Configuration/upload username |
SerialConfig | Enum | Serial config server mode |
Boot Process Flow
Power On / Reset
│
v
Initialize Hardware
│
v
Display Boot Banner
│
v
┌──────────┴──────────┐
│ │
BootQuiet=false BootQuiet=true
│ │
v │
Show Boot Messages │
│ │
└──────────┬──────────┘
│
v
Wait for Abort Key
(BootDelay seconds)
│
┌───────────┴───────────┐
│ │
Abort Pressed Timeout
│ │
v v
Enter Serial Config Continue Boot
Server │
│ v
v Call UserMain()
Config Shell
Available
Serial Config Server Modes
The SerialConfig parameter offers four operational modes:
SerialConfig Options
│
┌───────────────┼───────────────┬───────────────┐
│ │ │ │
v v v v
DuringBoot AlwaysEnabled PauseAfterBoot Disabled
│ │ │ │
v v v v
Available Always Pause Before Never
During Boot Active UserMain Available
Mode Descriptions
DuringBoot (Recommended)**
- Serial config available only during boot
- Use abort character sequence to enter
Safe for production use
AlwaysEnabled (Use with Caution)**
- Serial config always accessible via BootUart
- May interfere with application serial I/O
Risk of accidental config corruption
PauseAfterBoot**
- Boot pauses after
init() called
- Serial config enabled automatically
Type boot to resume application
Disabled**
- Serial config completely disabled
- No boot interruption possible
- Maximum security, no serial access
Security Configuration
Authentication Required?
│
┌──────┴──────┐
│ │
v v
User + Password No Auth
Required Required
│ │
v v
Protected Open Access
(Recommended)
When both User and Password are set:
- Required for configuration changes
- Required for application uploads
- Protects against unauthorized access
Config.Sys.NetIf - Network Interfaces
The NetIf section contains settings for all network interfaces including Ethernet and WiFi.
Network Interface Tree
Config.Sys.NetIf
│
┌────────────────┼────────────────┐
│ │ │
v v v
Ethernet0 Ethernet1 WiFi0
│ │ │
v v v
[Interface Settings] [Settings] [Settings]
Common Interface Parameters
| Parameter | Description |
DeviceName | Interface name for DDNS/NetBIOS registration |
DhcpDiscoverSec | Delay before DHCP Discover (seconds) |
DiscoveryReportInterval | Device discovery report frequency |
DiscoveryReportUrl | Discovery server URL |
MAC | Interface MAC address |
Discovery Configuration
Device Discovery
│
v
DiscoveryReportInterval
(Report Frequency Timer)
│
v
DiscoveryReportUrl
│
┌────────────┴────────────┐
│ │
v v
NetBurner Server Custom Server
(discover.netburner.com) (Your URL)
│ │
v v
Report Device Report Device
Information Information
Discovery Options:**
- Default: Reports to NetBurner's discovery server
- Custom: Set your own discovery server URL
- Disabled: Leave URL blank to disable reporting
Config.Sys.NetIf.Ethernet0.IPv4
IPv4 configuration settings for Ethernet interfaces.
IPv4 Settings Overview
IPv4 Configuration
│
┌───────────┴───────────┐
│ │
v v
Active Values Static Values
(Currently In Use) (Manual Config)
│ │
v v
┌───────┴───────┐ ┌───────┴───────┐
│ │ │ │ │ │
v v v v v v
Addr DNS Gate Addr DNS Gate
Mask Mask
IPv4 Parameters
Active Settings (Read-Only)
| Parameter | Description |
ActiveAddr | Current IPv4 address in use |
ActiveDNS1 | Current primary DNS server |
ActiveDNS2 | Current secondary DNS server |
ActiveGate | Current gateway address |
ActiveMask | Current subnet mask |
AutoIPAddr | Auto-assigned IP (if applicable) |
AutoIPEn | Auto-IP enabled status |
Static Settings (User Configurable)
| Parameter | Description |
StaticAddr | Manually configured IP address |
StaticDNS1 | Manually configured primary DNS |
StaticDNS2 | Manually configured secondary DNS |
StaticGate | Manually configured gateway |
StaticMask | Manually configured subnet mask |
IPv4 Mode Selection
The Mode parameter determines how IPv4 settings are obtained:
IPv4 Mode
│
┌───────────────┼───────────────┬─────────────┐
│ │ │ │
v v v v
│ │ │ │
v v v v
Server First Values Disabled
│ │ │
│ v │
│ ┌───────┴───────┐ │
│ │ │ │
│ v v │
│ Success Failure │
│ │ │ │
│ v v │
│ │
└────────────────┬───────────────┘
│
v
Active Values Set
DHCP Namespace.
Definition dhcpd.h:39
Mode Descriptions
DHCP**
Config.Sys.NetIf.Ethernet0.IPv6
IPv6 configuration settings for Ethernet interfaces.
IPv6 Settings Overview
IPv6 Configuration
│
┌───────────┴───────────┐
│ │
v v
Active Values Static Values
│ │
v v
┌─────┴─────┐ ┌─────┴─────┐
│ │ │ │ │ │
v v v v v v
Addr DNS Routes Addr DNS1 DNS2
IPv6 Parameters
Active Settings (Read-Only)
| Parameter | Description |
ActiveAddr | Array of active IPv6 addresses |
ActiveDNS | Array of active IPv6 DNS servers |
ActiveRoutes | Array of active IPv6 routes |
Static Settings (User Configurable)
| Parameter | Description |
StaticAddr | Manually configured IPv6 address |
StaticDNS1 | Manually configured primary IPv6 DNS |
StaticDNS2 | Manually configured secondary IPv6 DNS |
IPv6 Mode Selection
Similar to IPv4, the Mode parameter offers:
- DHCP - DHCPv6/SLAAC automatic configuration
- DHCP w/Fallback - Try auto-config, fall back to static
- Static - Use manually configured values
- Disabled - Disable IPv6 on interface
Configuration Web Interface
The configuration web server runs on port 20034 and provides a full-featured interface for viewing and modifying settings.
Accessing the Web Interface
Browser Request
│
v
http:
│
v
Configuration Web Interface
│
v
┌──────────────────────────────┐
│ │
│ ┌────────────────────────┐ │
│ │ Navigation Tree │ │
│ │ │ │
│ │ > Config │ │
│ │ > AppData │ │
│ │ > Sys │ │
│ │ > Boot │ │
│ │ > NetIf │ │
│ └────────────────────────┘ │
│ │
│ ┌────────────────────────┐ │
│ │ Value Editor │ │
│ │ │ │
│ │ [Input Fields] │ │
│ │ [Checkboxes] │ │
│ │ [Dropdowns] │ │
│ └────────────────────────┘ │
│ │
│ [Control Buttons] │
│ │
└──────────────────────────────┘
Example URL**: http://10.1.1.100:20034
Web Interface Features
Navigation Controls
Configuration Tree Controls
│
┌───────────┴───────────┐
│ │
v v
Expand All Collapse All
│ │
v v
Show All Branches Hide All Branches
Action Buttons
| Button | Function | Action |
Expand All | Expand entire tree | Shows all configuration branches |
Collapse All | Collapse entire tree | Hides all sub-branches |
Update Record | Save changes | Writes current values to flash |
Download Config | Export configuration | Downloads JSON file |
Restore Config | Import configuration | Uploads JSON file |
Raw Config Page | View raw interface | Shows unformatted JSON editor |
NB Discover | NetBurner discovery | Opens discover.netburner.com |
Discover Local | Local network scan | Finds devices without internet |
Application Update Feature
Application Update Process
│
v
┌────────┴────────┐
│ Choose File │
│ (.bin) │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Send File │
│ (Upload) │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Verify Image │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Flash to │
│ Memory │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Reboot with │
│ New App │
└─────────────────┘
Update Steps:**
- Click "Choose File" button
- Select compiled
.bin file
- Click "Send File" to upload
- Wait for verification and programming
- Device automatically reboots with new application
Serial Configuration Interface
The serial configuration interface provides command-line access to the configuration system via UART.
Accessing Serial Config
Boot Process Start
│
v
Display Boot Message:
"Type <Abort> to Abort boot..."
│
┌───────┴───────┐
│ │
Abort Pressed Timeout Expires
│ │
v v
Serial Config Continue to
Server UserMain()
│
v
┌─────────────┐
│ Prompt │
│ > │
└─────────────┘
Serial Config Prompt
When successfully entered, you'll see:
As you navigate, the prompt shows your location:
> # Root level
Config.Sys> # In Sys branch
Config.Sys.Boot> # In Boot settings
Navigation Model
The serial config operates like a file system:
Configuration Tree Navigation
│
v
Root Directory (>)
│
┌─────────┴─────────┐
│ │
v v
Type Branch Name Use Commands
│ │
v v
Enter Branch Navigate/Modify
│
v
New Prompt Level
(e.g., Config.Sys>)
Serial Config Commands
| Command | Syntax | Description |
help | help | Display all available commands |
boot | boot | Exit config server and boot application |
reboot | reboot | Restart the module |
flash | flash | Upload new application via serial |
ls | ls | List current level contents |
.. | .. | Move up one level in tree |
<var>? | Config? | Display variable contents |
<var>=<val> | Boot.Abort="B" | Set variable value |
save | save | Save changes to flash |
Command Examples
Viewing Configuration
> Config?
{
"Version": 15,
"Reboot": false,
"AppData": {...},
"Sys": {...}
}
> Config.Sys.Boot?
{
"Abort": "A",
"BootBaud": 115200,
"BootDelay": 3,
...
}
Modifying Settings
> Config.Sys.Boot
Config.Sys.Boot> Abort="B"
Config.Sys.Boot> BootDelay=5
Config.Sys.Boot> save
Configuration saved.
Config.Sys.Boot> ..
Config.Sys> boot
Continuing boot...
Navigation Example
> Config
Config> Sys
Config.Sys> NetIf
Config.Sys.NetIf> Ethernet0
Config.Sys.NetIf.Ethernet0> IPv4
Config.Sys.NetIf.Ethernet0.IPv4> ls
ActiveAddr
ActiveDNS1
ActiveDNS2
Mode
StaticAddr
...
Config.Sys.NetIf.Ethernet0.IPv4> ..
Config.Sys.NetIf.Ethernet0> ..
Config.Sys.NetIf> ..
Config.Sys> ..
Config> ..
>
Uploading Application via Serial
Serial Flash Process
│
v
┌────────┴────────┐
│ Type: flash │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Press F5 │
│ (in MTTTY) │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Select .bin │
│ File │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Transfer │
│ via YMODEM │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Verify & │
│ Program │
└────────┬────────┘
│
v
┌────────┴────────┐
│ Reboot │
└─────────────────┘
Steps:**
- Enter serial config mode
- Type
flash and press Enter
- In MTTTY: Press F5 to open file dialog
- Select your
.bin file
- Wait for transfer and programming
- Device reboots automatically
Creating a Custom Web Interface
The configuration web interface can be completely customized with your own design, branding, and functionality.
Customization Workflow
Custom Interface Creation
│
┌───────────┴───────────┐
│ │
v v
Replace ROOT.html Rebuild System
│ Libraries
v │
Your Custom HTML v
CSS, JavaScript Updated Config
Your Logo Server
│ │
└───────────┬───────────┘
│
v
Custom Web Interface
Deployed
Steps to Customize
Option 1: Replace System Interface
- Locate system file:
<NNDK Install Directory>\nbrtos\source\ROOT.html
- Create your custom ROOT.html
- Rebuild system libraries:
- Follow NBEclipse Getting Started Guide
- Rebuild system libraries section
Option 2: Replace Logo Only
- Locate logo file:
<NNDK Install Directory>\nbrtos\source\LOGO.gif
- Replace with your logo image
- Rebuild system libraries
Custom Interface Example
A complete example demonstrating the current config web interface structure is available:
Location:**
<NNDK Install Directory>\examples\Configuration\BasicWebConfig
This example shows:
- HTML structure
- JavaScript interaction
- CSS styling
- Configuration API usage
Configuration API Examples
NetBurner provides comprehensive examples demonstrating various aspects of the configuration system.
Example Projects Overview
Configuration Examples
│
┌───────────────┼───────────────┬───────────────┐
│ │ │ │
v v v v
BasicConfigVar BasicWebConfig CustomWebConfig CustomRangeLimit
│ │ │ │
v v v v
Basic Config Web-Based Advanced Web Validation &
Variables Interface (Bootstrap) Range Limits
Available Examples
1. BasicConfigVariable
Location:** <NNDK>\examples\Configuration\BasicConfigVariable
Demonstrates:**
- Basic config object usage
- Creating config variables
- Reading and writing values
Saving to flash
Key Concepts:**
config_string deviceName(
"Name",
"Device-001",
"Device identifier");
config_int sampleRate(
"Rate", 1000,
"Sample rate in Hz");
config_bool enabled(
"Enabled",
true,
"Feature enabled");
const char* name = deviceName.c_str();
int rate = sampleRate;
bool isEnabled = enabled;
deviceName = "Device-002";
sampleRate = 2000;
enabled = false;
void SaveConfigToStorage()
Save configuration to flash storage.
2. BasicWebConfig
Location:** <NNDK>\examples\Configuration\BasicWebConfig
Demonstrates:**
- Config system web interface basics
- Dynamic web page generation
- Real-time value updates
Form handling
Architecture:**
Browser NetBurner Device
│ │
v v
Web Page <─────────────> HTTP Server
│ │
v v
User Input ────────────> Config Objects
│
v
Flash Storage
3. CustomWebConfig
Location:** <NNDK>\examples\Configuration\CustomWebConfig
Demonstrates:**
- Advanced web interface design
- Bootstrap framework integration
- jQuery for dynamic updates
Professional UI/UX
Features:**
- Responsive design
- Interactive controls
- Real-time validation
- Modern web technologies
4. CustomRangeLimit
Location:** <NNDK>\examples\Configuration\CustomRangeLimit
Demonstrates:**
- Extending config objects
- Custom validation logic
- Min/max range checking
Input constraints
Example:**
{
public:
int minVal, int maxVal, const char* desc)
min(minVal), max(maxVal) {}
bool SetValue(int val) override
{
if (val < min || val > max)
return false;
return config_int::SetValue(val);
}
private:
int min, max;
};
"Temperature (0-100C)");
A config_int with minimum and/or maximum values Attempting to set a value lower than the minimum or g...
Definition config_obj.h:2274
config_int_limit(config_obj &owner, int def_val, int minv=INT_MIN, int maxv=INT_MAX, const char *name=NULL, const char *desc=NULL)
Object constructor with the parent/owner leaf parameter and limits.
Definition config_obj.h:2290
Example Selection Guide
Choose Example Based On Need
│
┌───────────┼───────────┬───────────┐
│ │ │ │
v v v v
Just Starting? Need Web? Want Advanced? Need Validation?
│ │ │ │
v v v v
BasicConfigVar BasicWebConfig CustomWebConfig CustomRangeLimit
Best Practices
Configuration Design Principles
1. Organization Strategy
Configuration Organization
│
┌───────────┴───────────┐
│ │
v v
System Settings Application Data
(Config.Sys) (Config.AppData)
│ │
v v
Don't Modify Organize Logically
(Read-only) │
┌──────────┴──────────┐
│ │
v v
By Feature By Function
Guidelines:**
- Keep application data in
Config.AppData
- Don't modify
Config.Sys unless necessary
- Group related settings together
- Use descriptive names
- Add helpful descriptions
2. Variable Naming
Good Variable Names:
deviceName Clear purpose
sampleRateHz Includes units
enableDataLogging Boolean prefix
motorSpeedRPM Descriptive + units
Poor Variable Names:
var1 Meaningless
x Too short
temp Ambiguous
d No context
3. Security Considerations
Security Best Practices
│
┌───────────┼───────────┬───────────┐
│ │ │ │
v v v v
Set User Set Strong Disable Limit
Name Password Serial Access
When Prod
Recommendations:**
- Always set User and Password for production
- Use strong passwords (8+ characters, mixed case, numbers)
- Disable serial config in deployed systems
- Limit web interface access by network
- Consider custom web interface with authentication
4. Performance Optimization
Configuration Access Patterns
│
┌───────────┴───────────┐
│ │
v v
Frequent Access Rare Access
│ │
v v
Cache Values Read Direct
in Variables from Config
│ │
v v
Update Cache on Access Only
Config Change When Needed
Tips:**
- Cache frequently accessed values
- Update cache when config changes
- Minimize flash writes
- Batch configuration updates
5. Validation and Error Handling
Input Validation Flow
│
v
Receive New Value
│
v
┌────────┴────────┐
│ Validate │
│ - Type check │
│ - Range check │
│ - Format check│
└────────┬────────┘
│
┌───────┴───────┐
│ │
v v
Valid Invalid
│ │
v v
Apply Value Reject + Error
│ Message
v
Save to Flash
Implementation:**
- Always validate user input
- Use custom config classes for complex validation
- Provide clear error messages
- Log configuration changes
Troubleshooting
Common Issues and Solutions
Issue: Cannot Access Web Interface
Symptom: Browser cannot
connect to port 20034
│
v
Troubleshooting Steps:
│
┌────┴────┬────────┬────────┐
│ │ │ │
v v v v
Check IP Check Firewall Web Server
Address Port Rules Started?
int connect(const IPADDR &ipAddress, uint16_t remotePort, uint32_t timeout)
Establish a TCP connection to a remote host.
Definition tcp.h:1547
Solutions:**
- Verify device IP address is correct
- Ensure using port 20034:
http://ip:20034
- Check firewall allows port 20034
- Verify config web server is enabled in code
Issue: Serial Config Not Accessible
Symptom: Abort sequence doesn't work
│
v
Check Configuration:
│
┌────┴────┬─────────┬──────────┐
│ │ │ │
v v v v
Abort BootDelay BootUart SerialConfig
Key? Timeout? Correct? Enabled?
Solutions:**
- Verify
Abort key is correct (default: "A")
- Send abort key during
BootDelay window
- Ensure using correct UART port
- Check
SerialConfig not set to "Disabled"
Issue: Configuration Changes Not Saved
Symptom: Settings revert after reboot
│
v
Verify Save Process:
│
┌────┴────┬─────────────┐
│ │ │
v v v
Clicked Called Save Flash
Update? Function? Write OK?
Solutions:**
- Web Interface: Click "Update Record" button
- Serial: Execute
save command
- Code: Call
SaveConfigToStorage()
- Check flash memory not full/corrupted
Issue: Custom Config Variables Not Appearing
Symptom: Variables not visible in interface
│
v
Check Registration:
│
┌────┴────┬──────────┬───────────┐
│ │ │ │
v v v v
Created Registered Correct Rebuild
Object? to Tree? Namespace? Done?
Solutions:**
- Ensure config object created globally
- Check object registered to Config.AppData
- Verify namespace/path is correct
- Rebuild project completely
Debug Checklist
Configuration Debug Process
│
v
Enable Debug Output
│
v
Check Serial Console
│
v
Verify Network Settings
│
v
Test with Examples
│
v
Review System Logs
│
v
Check Flash Memory
Debug Steps:**
- Enable serial debug output with
printf()
- Monitor boot messages on UART
- Verify network connectivity
- Test with provided examples first
- Check system logs for errors
- Verify flash memory health
Advanced Topics
Custom Configuration Objects
You can create custom configuration types by extending base classes:
{
public:
enum MyEnum { OPTION_A, OPTION_B, OPTION_C };
config_enum(const char* name, MyEnum defaultVal, const char* desc)
(int)defaultVal, desc) {}
MyEnum GetValue() const {
return (MyEnum)GetSelection();
}
};
Configuration Callbacks
Implement change notifications:
{
public:
using NotifyCallback = void (*)(int oldVal, int newVal);
config_int_notify(const char* name, int defaultVal,
const char* desc, NotifyCallback cb)
:
config_int(name, defaultVal, desc), callback(cb) {}
bool SetValue(int val) override {
int oldVal = GetValue();
if (config_int::SetValue(val)) {
if (callback) callback(oldVal, val);
return true;
}
return false;
}
private:
NotifyCallback callback;
};
void onSpeedChanged(int oldVal, int newVal) {
printf("Speed changed from %d to %d\n", oldVal, newVal);
UpdateMotorSpeed(newVal);
}
config_int_notify motorSpeed("Speed", 1000, "Motor speed",
onSpeedChanged);
Configuration Persistence
Configuration Save Process
│
v
Collect All Config Data
│
v
Convert to JSON
│
v
Calculate Checksum
│
v
Write to Flash
│
v
Verify Write
│
┌────────┴────────┐
│ │
v v
Success Failure
│ │
v v
Return true Return false
│
v
Retry Logic
API Quick Reference
Core Configuration Functions
void InitConfigSystem();
bool LoadConfigFromStorage();
void ResetConfigToDefaults();
std::string GetConfigJSON();
bool SetConfigJSON(const char* json);
Configuration Object Types
Accessing Values
const char* str = myString.c_str();
int value = myInt;
bool flag = myBool;
int selection = myChoice.GetSelection();
myString = "new value";
myInt = 42;
myBool = true;
myChoice.SetSelection(1);
Summary
The NetBurner Configuration System provides a powerful, flexible solution for managing device settings:
Key Features Recap
Configuration System Capabilities
│
┌───────────────────┼───────────────────┐
│ │ │
v v v
Multi-Interface Hierarchical Persistent
Access Structure Storage
│ │ │
v v v
Web, Serial, Tree-Based Flash
Application JSON Memory
Access Methods Summary
| Interface | Port/Method | Use Case |
| Web UI | Port 20034 | User-friendly configuration |
| Serial Config | Boot UART | Command-line access |
| Application API | Direct code | Programmatic control |
| Custom Web | Your design | Branded interface |
Configuration Hierarchy
Config (Root)
├── Version (auto-updated)
├── Reboot (force reboot flag)
├── AppData (your application data)
│ ├── Custom variables
│ ├── Settings
│ └── Parameters
└── Sys (system settings)
├── Boot (boot configuration)
│ ├── Abort key
│ ├── Serial config
│ └── Security
└── NetIf (network interfaces)
├── Ethernet0
│ ├── IPv4
│ └── IPv6
└── [Other interfaces]
Best Practices Checklist
- Organize application data in Config.AppData
- Use descriptive variable names with units
- Set User and Password for production
- Validate all user input
- Cache frequently accessed values
- Provide helpful descriptions
- Test with provided examples
- Implement error handling
- Document custom configurations
- Use version control for config schemas
Getting Started
- Learn the Basics
- Review
BasicConfigVariable example
- Understand config object types
- Practice reading/writing values
- Web Integration
- Study
BasicWebConfig example
- Create simple web interface
- Test configuration updates
- Advanced Features
- Explore
CustomWebConfig for UI
- Implement validation with
CustomRangeLimit
- Create custom config objects
- Production Deployment
- Set security credentials
- Disable unnecessary interfaces
- Implement change logging
- Test recovery procedures
The NetBurner Configuration System simplifies device management while providing the flexibility needed for complex embedded applications.