NetBurner 3.5.8
PDF Version
Wifi Basic

Example Path: examples/Wifi/ESP32/WifiBasic

ESP32-C5 WiFi – Basic Connect Example

Overview

This is the simplest ESP32-C5 WiFi integration for NetBurner. It brings WiFi up on a NetBurner module that uses an attached ESP32-C5 radio as a network co-processor, then lets the ESP32-C5 library serve its built-in provisioning web page so a user can enter network credentials – no firmware rebuild required.

The whole integration is three pieces of application code:

  1. Define the WiFi facade object: ESP32C5 g_wifi;
  2. Bring it up from the init hook: AddNonEthernetInterfaces() calls g_wifi.Init()
  3. Start the web server: StartHttp() in UserMain()

Once the ESP32 reports its MAC, the library registers two network interfaces: a station (STA) that joins your WiFi network, and an access point (AP) used for provisioning.

This example does NOT embed an ESP32 firmware image and cannot push OTA updates – see the OTA-capable variants under "Related Examples" below.

Provisioning

  • Web UI: http://<device-ip>/wifi (served by the ESP32-C5 library)
  • Default provisioning AP SSID: NetBurnerC5Wifi (5 GHz)
  • If no STA credentials are stored, the device falls back to the provisioning AP.
  • On SOMRT1061, holding the IRQ button (pin 30 low) at boot forces the AP on, so you can always reach /wifi even with bad stored credentials.

Serial Console Commands

The application prints a menu on the serial debug port (115200 baud):

Key Function
N Start a WiFi scan
R Show last scan results
I Show interface info (STA/AP state, IPs, ESP32 firmware version)
W Push the current config to the ESP32
A Turn AP mode on
a Turn AP mode off
P Show the ARP cache

Press any other key to reprint the menu.

Web Page

The example serves a single landing page (html/index.html) styled with the shared NetBurner SDK example look – a self-contained stylesheet, no framework or CDN. It links to the /wifi provisioning page. The provisioning UI itself is served by the ESP32-C5 library, not from this example's html/ folder.

Supported Platforms

  • SOMRT1061

Adding a new host platform is a small port – see platform/esp32_c5_wifi_mod/Porting_To_New_Platforms.md.

Related Examples

  • Wifi Web UI – build your own WiFi setup web UI on the public ESP32C5 API instead of using the library's /wifi page.
  • Wifi OTA Auto – recommended OTA path: auto-updates the ESP32-C5 to the NNDK-bundled firmware version at boot.
  • Wifi OTA Upload – push a new ESP32-C5 firmware image to the radio via a browser upload.