Custom System Config Server
A NetBurner RTOS-based embedded web application that demonstrates how to customize the device's system configuration server interface.
Overview
This application shows how to create a custom system configuration interface that runs on NetBurner's network port 20034, separate from the main application web interface on port 80. Unlike typical configuration examples that integrate configuration pages into the application's web interface, this example demonstrates how to customize the device's built-in system configuration server with custom branding, logos, and web page content.
- Note
- You can have both a custom System Configuration Page on port 20034 and a custom Web Configuration Page on port 80 active at the same time.
Features
- Dual Web Interfaces:
- Main application web server on port 80 (based on SimpleHtml)
- Custom system configuration server on port 20034
- Custom Branding: Ability to customize logos and web page content
- System Configuration: Access to device configuration through customized interface
- File Override System: Uses NetBurner's overload procedure for customization
- System Diagnostics: Integrated diagnostic capabilities for system monitoring
- Network Management: Automatic network initialization and connection handling
- Real-Time Operation: Built on NetBurner RTOS for reliable real-time performance
Hardware Requirements
- NetBurner embedded module/board
- Network connectivity (Ethernet)
- Compatible with NetBurner NNDK (NetBurner Network Development Kit)
Software Dependencies
- NetBurner RTOS
- NetBurner Network Development Kit (NNDK)
- Required NetBurner libraries:
Quick Start
- Run as Demo: The application includes a sample LOGO.gif file and can be built and run immediately to see the customization in action
- View Results:
- Browse to port 80 for the main application
- Browse to port 20034 to see the custom system configuration interface
- Add Your Customizations: Replace the sample files with your own branding elements
Application Flow
- Initialization: System and network stack initialization
- Diagnostics: Enables system diagnostic features
- HTTP Server: Starts the web server for configuration access
- Network Wait: Waits up to 5 seconds for active network connection
- Status Display: Shows application name and NNDK revision information
- Main Loop: Continuous operation with 1-second intervals
Customizable System Files
The system configuration interface can be customized by overriding these files located in \nburn\nbrtos\source:
- LOGO.gif - Logo displayed on the configuration page
- ROOT.html - JavaScript root configuration page
- RAW.html - Low-level HTML page with links to configuration and UI.html that displays the entire JSON object
- UI.html - Displays the entire JSON configuration object
Customization Process
This application uses NetBurner's overload procedure for customization:
- Create the override directory structure:
override\nbrtos\source
- Copy the files you want to customize into this directory
- Modify the files as needed
- Build the application - your custom files will be compiled into the application
Example: Custom Logo
A sample LOGO.gif file is provided in the application's src folder. To use it:
- Copy the LOGO.gif to
override\nbrtos\source\ folder
- Build and run the application
- View the custom logo on port 20034
Usage
- Build and Deploy: Build and deploy the application to your NetBurner device
- Main Application: Access the basic web page on port 80
- System Configuration: Access the custom configuration interface on port 20034
- Customization: The system configuration page will display your custom modifications
Port Configuration
- Port 80: Main application web interface (SimpleHtml-based)
- Port 20034: Custom system configuration server
Configuration
The application automatically:
- Initializes network connectivity
- Starts HTTP services on default ports
- Enables diagnostic capabilities
Development Notes
- Production Deployment: Consider removing
EnableSystemDiagnostics() for production builds
- Network Timeout: 5-second network connection timeout is configured
- Main Loop: 1-second delay in main loop for efficient resource usage
- File Compilation: Logo and HTML files are converted to .cpp files and compiled into the application
- Branding Strategy: You can combine both custom application and custom system configuration for complete product branding
- Demo Ready: The application includes a sample LOGO.gif and can be run as-is to demonstrate customization
Build Information
The application displays:
- Application name: "Custom System Config Server"
- NNDK revision information at startup