NetBurner 3.5.6
PDF Version
About This Guide

Guide Navigation

Quick Start Path

For developers new to NetBurner, follow this learning path:

Start Here
v
┌───────────────────┐
│ 1. Introduction │
└───────────────────┘
v
┌───────────────────┐
│ 2. Web Server │
└───────────────────┘
v
┌───────────────────┐
│ 3. RTOS Basics │
└───────────────────┘
v
┌───────────────────┐
│ 4. File │
│ Descriptors │
└───────────────────┘
v
[Advanced Topics]

By Use Case

Web Application Development

  • Introduction to NetBurner Programming
  • Web Server Programming
  • HTML Processing Techniques
  • Configuration Server

Real-Time Systems

  • NetBurner RTOS
  • Interrupt Handling
  • File Descriptors

Network Programming

  • Network Protocols Guide
  • IPv4-IPv6 Dual Stack
  • SSL/TLS Security
  • SSH Protocol

Data Management

  • JSON Lexer
  • EFFS File System
  • Configuration Server

Product Deployment

  • Custom Branding Options
  • Configuration Management
  • Security Implementation

Document Descriptions

Introduction to NetBurner Programming

Focus:** Getting started with NetBurner development Key Topics:**

  • Development environment setup
  • First application creation
  • Template application structure
  • System initialization
  • Core functions and constants

    When to Read:** Start here if you are new to NetBurner

    Architecture Overview:**

    System Boot
    v
    RTOS Starts
    v
    ┌────────────────────┐
    │ UserMain() Task │
    │ - init() │
    │ - Network setup │
    │ - Application code │
    └────────────────────┘
    void init()
    System initialization. Ideally called at the beginning of all applications, since the easiest Recover...

Configuration Server

Focus:** Device configuration and settings management Key Topics:**

  • Configuration system architecture
  • Web-based configuration interface
  • Serial configuration access
  • AppData structure usage
  • System settings management

    When to Read:** When you need persistent device settings

    Configuration Hierarchy:**

    Config (Root)
    ┌───────┴───────┐
    │ │
    v v
    AppData Sys
    (Application) (System)
    │ │
    v v
    [Custom Data] [Boot/Network]

Custom Branding

Focus:** OEM customization and white-label solutions Key Topics:**

  • Logo replacement options
  • Custom web interfaces
  • Physical device labeling
  • Discovery utility customization
  • Cloud infrastructure replacement

    When to Read:** When deploying products with your brand

    Branding Layers:**

    ┌────────────────────────────┐
    │ Your Brand Identity │
    ├────────────────────────────┤
    │ Custom Web Interface │
    ├────────────────────────────┤
    │ Device Labels │
    ├────────────────────────────┤
    │ Network Discovery │
    ├────────────────────────────┤
    │ NetBurner Platform │
    └────────────────────────────┘

IPv4-IPv6 Dual Stack

Focus:** Dual-stack networking implementation Key Topics:**

  • IPADDR object changes
  • IPv6 address assignment
  • DNS resolution strategies
  • Migration from IPv4-only code
  • Platform-specific considerations

    When to Read:** When supporting both IPv4 and IPv6

    IP Address Evolution:**

    IPv4 Only Dual Stack
    (Pre-2.8.0) (2.8.0+)
    ┌──────────┐ ┌────────────┐
    │ 32 bits │ ───> │ IPADDR
    │ Integer │ │ Object │
    └──────────┘ │ - 32/128 │
    │ - IsNull() │
    └────────────┘
    Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
    Definition ipv6_addr.h:41

EFFS File System

Focus:** Embedded Flash File System operations Key Topics:**

  • File system initialization
  • File operations (open, read, write, close)
  • Directory management
  • Flash memory considerations
  • Performance optimization

    When to Read:** When using file storage in your application

    File System Stack:**

    ┌───────────────────────────┐
    │ Application File I/O │
    ├───────────────────────────┤
    │ POSIX-like API │
    ├───────────────────────────┤
    │ EFFS Implementation │
    ├───────────────────────────┤
    │ Flash Memory Hardware │
    └───────────────────────────┘

File Descriptors

Focus:** Unified I/O abstraction layer Key Topics:**

  • File descriptor architecture
  • Standard I/O operations
  • TCP socket integration
  • Serial port access
  • Custom I/O driver creation

    When to Read:** When implementing I/O operations or custom drivers

    File Descriptor Map:**

    FD Range Purpose
    ┌──────────┐ ┌─────────────────┐
    │ 0-2 │ > │ Standard I/O │
    │ 3-4 │ > │ Serial Ports │
    │ 5-128 │ > │ TCP Sockets │
    │ 129-250 │ > │ Custom Drivers │
    └──────────┘ └─────────────────┘

HTML Processing

Focus:** Dynamic web content generation Key Topics:**

  • CPPCALL tag usage
  • VARIABLE tag implementation
  • INCLUDE tag for linking
  • Custom data type display
  • Web server integration

    When to Read:** When creating dynamic web interfaces

    Dynamic Content Flow:**

    HTML File C++ Code
    ┌───────────────┐ ┌───────────────┐
    │ <!--CPPCALL │ │ void func( │
    │ MyFunc --> │ ──> │ int sock, │
    └───────────────┘ │ PCSTR url) │
    └───────────────┘
    ┌───────────────┐ ┌───────────────┐
    │ <!--VARIABLE │ │ extern int
    │ MyVar --> │ ──> │ MyVar; │
    └───────────────┘ └───────────────┘

Interrupt Handling

Focus:** Hardware interrupt processing Key Topics:**

  • Preemptive interrupt architecture
  • ISR implementation patterns
  • Platform-specific setup
  • Interrupt priorities
  • Safe ISR practices

    When to Read:** When handling hardware events and interrupts

    Interrupt Flow:**

    Normal Execution
    v
    Interrupt Signal
    v
    ┌───────────────┐
    │ Save Context │
    └───────────────┘
    v
    ┌───────────────┐
    │ Execute ISR │
    └───────────────┘
    v
    ┌───────────────┐
    │ Restore │
    │ Context │
    └───────────────┘
    v
    Resume Execution

JSON Lexer

Focus:** JSON parsing and data access Key Topics:**

  • ParsedJsonDataSet usage
  • JsonRef navigation
  • Type conversion
  • Validation functions
  • Performance optimization

    When to Read:** When parsing JSON data from web APIs or files

    JSON Access Pattern:**

    JSON Source
    v
    v
    JsonRef Navigation
    ├───> ("name") ──> Value
    ├───> [index] ──> Array Element
    └───> IsValid() ──> Validation
    Represents a positional reference (pointer) of a location inside a ParsedJsonDataSet object.
    Definition json_lexer.h:113
    A class to create, read, and modify a JSON object.
    Definition json_lexer.h:535

NetBurner RTOS

Focus:** Real-Time Operating System concepts Key Topics:**

  • Task creation and management
  • Priority-based scheduling
  • Inter-task communication
  • Synchronization primitives
  • System configuration

    When to Read:** When implementing multi-tasking applications

    RTOS Components:**

    ┌─────────────────────────┐
    │ User Tasks │
    ├─────────────────────────┤
    │ - Semaphores │
    │ - Mailboxes │
    │ - Queues │
    │ - Flags │
    ├─────────────────────────┤
    │ Task Scheduler │
    ├─────────────────────────┤
    │ Hardware Platform │
    └─────────────────────────┘

Network Protocols

Focus:** TCP/IP stack and protocol implementation Key Topics:**

  • TCP socket programming
  • UDP communication
  • MQTT client usage
  • Protocol best practices
  • Network debugging

    When to Read:** When implementing network communication

    Network Stack:**

    ┌─────────────────────────┐
    │ Application Protocols │
    │ (HTTP, MQTT, Custom) │
    ├─────────────────────────┤
    │ Transport Layer │
    │ (TCP, UDP) │
    ├─────────────────────────┤
    │ Network Layer │
    │ (IPv4, IPv6) │
    ├─────────────────────────┤
    │ Link Layer │
    │ (Ethernet, WiFi) │
    └─────────────────────────┘
    MQTT Namespace.
    Definition mqtt.h:81

SSL-TLS Security

Focus:** Secure communication implementation Key Topics:**

  • SSL/TLS configuration
  • Certificate management
  • Secure server setup
  • Client authentication
  • Security best practices

    When to Read:** When implementing secure communications

    Security Layers:**

    ┌─────────────────────────┐
    │ Application Data │
    ├─────────────────────────┤
    │ SSL/TLS Encryption │
    ├─────────────────────────┤
    │ TCP Transport │
    ├─────────────────────────┤
    │ IP Network │
    └─────────────────────────┘

SSH Protocol

Focus:** Secure Shell implementation Key Topics:**

  • SSH server configuration
  • Key management
  • Secure remote access
  • Authentication methods
  • Session management

    When to Read:** When providing secure remote access

    SSH Architecture:**

    SSH Client
    v
    ┌─────────────────────────┐
    │ Authentication │
    ├─────────────────────────┤
    │ Encrypted Channel │
    ├─────────────────────────┤
    │ SSH Server │
    ├─────────────────────────┤
    │ Command Execution │
    └─────────────────────────┘

Web Server

Focus:** Embedded HTTP server programming Key Topics:**

  • Web server architecture
  • Static content serving
  • Dynamic content generation
  • Form processing
  • Resource management

    When to Read:** When building web-based interfaces

    Web Server Architecture:**

    Browser Request
    v
    ┌───────────────────┐
    │ HTTP Server │
    │ - Static Files │
    │ - Dynamic Content │
    │ - Callbacks │
    └───────────────────┘
    v
    Application Logic

Development Workflow

Typical Application Development Process

1. Requirements Analysis
v
2. Architecture Design
v
┌───────────────────┐
│ Select Components │
│ - RTOS features │
│ - Network stack │
│ - Web interface
│ - File system │
└───────────────────┘
v
3. Implementation
v
┌───────────────────┐
│ Core Application │
│ - UserMain() │
│ - Task creation │
│ - Initialization │
└───────────────────┘
v
4. Integration
v
┌───────────────────┐
│ Add Features │
│ - Web interface │
│ - Configuration │
│ - Protocols │
└───────────────────┘
v
5. Testing & Debug
v
6. Deployment
v
┌───────────────────┐
│ Production │
│ - Branding │
│ - Security │
│ - Documentation │
└───────────────────┘

Common Implementation Patterns

Pattern 1: Web-Based Device Control

Components Used:**

  • Introduction (basics)
  • Web Server (interface)
  • RTOS (task management)
  • Configuration Server (settings)

    Architecture:**

    Web Browser
    v
    ┌───────────────────┐
    │ Web Interface │
    │ - Control panel │
    │ - Status display │
    └───────────────────┘
    v
    ┌───────────────────┐
    │ Application Tasks │
    │ - Sensor reading │
    │ - Device control │
    └───────────────────┘
    v
    Hardware I/O

Pattern 2: Network Data Logger

Components Used:**

  • Network Protocols (communication)
  • EFFS (data storage)
  • JSON Lexer (data format)
  • Configuration (settings)

    Architecture:**

    Network Data Source
    v
    ┌───────────────────┐
    │ Network Interface │
    │ - TCP/UDP │
    │ - MQTT
    └───────────────────┘
    v
    ┌───────────────────┐
    │ Data Processing │
    │ - JSON parsing │
    │ - Validation │
    └───────────────────┘
    v
    ┌───────────────────┐
    │ File Storage │
    │ - EFFS write
    │ - Data logging │
    └───────────────────┘
    int write(int fd, const char *buf, int nbytes)
    Write data to the stream associated with a file descriptor (fd). Can be used to write data to stdio,...

Pattern 3: Secure Remote Monitoring

Components Used:**

  • SSL/TLS (security)
  • SSH (remote access)
  • Web Server (interface)
  • Interrupt Handling (events)

    Architecture:**

    Secure Connection
    v
    ┌───────────────────┐
    │ SSL/TLS Layer │
    └───────────────────┘
    v
    ┌───────────────────┐
    │ Web/SSH Interface │
    └───────────────────┘
    v
    ┌───────────────────┐
    │ Monitoring Logic │
    │ - Event handling │
    │ - Data collection │
    └───────────────────┘
    v
    Hardware Sensors

Cross-Reference Guide

By Task

Setting Up Network Communication

  1. Introduction - Basic network initialization
  2. Network Protocols - Protocol implementation
  3. IPv4-IPv6 Dual Stack - IP version support
  4. File Descriptors - Socket I/O

Creating User Interfaces

  1. Web Server - HTTP server basics
  2. HTML Processing - Dynamic content
  3. Configuration Server - Built-in UI
  4. Custom Branding - UI customization

Managing Data

  1. JSON Lexer - Data parsing
  2. EFFS File System - Storage
  3. Configuration Server - Settings persistence
  4. File Descriptors - I/O operations

Implementing Real-Time Features

  1. NetBurner RTOS - Task management
  2. Interrupt Handling - Hardware events
  3. File Descriptors - Device I/O
  4. Network Protocols - Communication

Securing Your Application

  1. SSL/TLS Security - Encrypted communication
  2. SSH Protocol - Secure access
  3. Configuration Server - Access control
  4. Custom Branding - Security customization

Quick Start Checklist

Essential Reading for New Developers

[ ] 1. Read Introduction
- Understand UserMain()
- Learn init() function
- Study example code
[ ] 2. Review RTOS Basics
- Task creation
- Basic synchronization
- System timing
[ ] 3. Explore Web Server
- Static content
- Dynamic tags
- Basic callbacks
[ ] 4. Study Configuration
- System settings
- Application data
- Web interface
[ ] 5. Understand File Descriptors
- I/O abstraction
- Network sockets
- Serial ports

Advanced Topics Preparation

[ ] Master RTOS features
- All synchronization types
- Task priorities
- System configuration
[ ] Network programming
- TCP/UDP sockets
- Protocol implementation
- IPv4/IPv6 support
[ ] Security implementation
- SSL/TLS setup
- SSH configuration
- Certificate management
[ ] Custom development
- Interrupt handlers
- Custom drivers
- Branding options

Document Conventions

Code Examples

Throughout this guide, code examples use the following conventions:

// Full working examples are marked
void ExampleFunction() {
// Code here...
}
// Tested
// Conceptual examples show patterns
void ConceptualExample() {
// Pseudocode or simplified logic
}

Platform References

Platform-specific information is clearly marked:

  • All Platforms - Universal features
  • MCF5441x - ColdFire specific
  • SAME70 - Cortex-M7 specific
  • SOMRT1061 - i.MX RT specific

Getting Help

Documentation Resources

┌───────────────────────────┐
│ Online Resources │
│ - NetBurner website │
│ - Technical support │
│ - Community forums │
└─────────────┬─────────────┘
v
┌───────────────────────────┐
│ SDK Documentation │
│ - API reference │
│ - Example projects │
│ - Release notes │
└─────────────┬─────────────┘
v
┌───────────────────────────┐
│ This Programmer's Guide │
│ - Concept explanations │
│ - Implementation patterns │
│ - Best practices │
└───────────────────────────┘

Version Information

This Programmer's Guide is maintained alongside the NetBurner Network Development Kit (NNDK). Always refer to the documentation version matching your NNDK release.

Document Organization:**

  • Each major topic has a dedicated section
  • Cross-references guide related topics
  • Examples demonstrate practical implementation

Next Steps

After reviewing this main guide:

  1. Begin with Introduction for fundamental concepts
  2. Choose topic areas based on your application needs
  3. Study example projects in the SDK
  4. Implement incrementally building on working examples
  5. Refer to API documentation for detailed function references