NetBurner Configuration System - Boot Parameter Modification
Overview
This application demonstrates how to view and modify system boot configuration parameters on NetBurner embedded devices. The program provides an interactive command-line interface for managing persistent system settings such as baud rates, boot delays, authentication credentials, and other boot-related parameters.
Application Name
SystemParamsModifyBoot
Purpose
The NetBurner config system stores both system-defined boot and interface information (like default baud rates and current IP settings) as well as user-defined persistent variables. This example specifically focuses on accessing and modifying the "Boot" configuration record through a menu-driven interface.
Key Features
- Interactive Menu System: Command-line interface with single-character commands
- Real-time Configuration Updates: Changes are immediately saved to persistent storage
- Web Interface Integration: Configuration changes can be viewed via web browser
- Multiple Data Types: Supports string, integer, and boolean configuration parameters
- Network Information Display: Shows current IP configuration on startup
Supported Configuration Parameters
Boot Configuration Options
- Abort Command (A): Set the command string used to abort boot process
- Baud Rate (B): Configure serial communication baud rate
- Boot Delay (D): Set delay time before boot process begins
- User Credentials (P): Set system username and password
- Quiet Boot (Q): Enable/disable quiet boot mode (boolean)
System Information
- Config Tree (C): Display the complete configuration tree structure
- Help (?): Show available commands
Technical Implementation
Core Components
- Configuration Data Types:
- Key Functions:
UpdateConfigString()
: Handle string parameter updates
UpdateConfigInt()
: Handle integer parameter updates
UpdateConfigBool()
: Handle boolean parameter updates
ShowTree()
: Display configuration tree structure
SaveConfigToStorage()
: Persist changes to storage
- External Dependencies:
MonitorRecord monitor_config
: Global variable exposing boot config values
- NetBurner system libraries for networking, serial communication, and configuration management
Usage Instructions
Getting Started
- Build and Deploy: Compile the application and deploy it to your NetBurner device
- Serial Connection: Connect to the device via serial port (default: 115200 baud)
- Network Setup: Ensure the device is connected to the network (5-second timeout for network initialization)
Interactive Commands
Once the application starts, you'll see network information and a command prompt. Enter any of the following single characters:
A
- Modify abort boot command string
B
- Change baud rate setting
C
- Display configuration tree
D
- Set boot delay value
P
- Update username and password
Q
- Toggle quiet boot mode
?
- Show command list
Web Interface
The application also provides a web interface for viewing configuration changes:
- Navigate to
http://[device-ip]:20034
in your web browser
- Refresh the page to see updated values after making changes via the command line
Configuration Flow
- Display Current Value: Shows the existing configuration value
- User Input: Prompts for new value entry
- Validation and Assignment: Processes and assigns the new value
- Automatic Save: Calls
SaveConfigToStorage()
to persist changes
- Confirmation: Displays the updated value
Network Information Display
On startup, the application displays:
- Current IP Address
- Auto-assigned IP Address
- Gateway Address
Build Information
The application displays build timestamp information showing when it was compiled, helping with version tracking and debugging.
Important Notes
- Serial Port Management: The application closes and reopens the serial port to ensure proper communication
- System Diagnostics: Includes diagnostic capabilities (should be disabled for production)
- Persistent Storage: All configuration changes are immediately saved to non-volatile storage
- Network Dependency: Waits up to 5 seconds for network activation before proceeding
Error Handling
The application includes basic input validation and handles:
- String input with automatic null termination
- Integer conversion from string input
- Boolean parsing (accepts 'T'/'t' for true, anything else for false)