Skip to content

About

No description, website, or topics provided.

Resources

Stars

19 stars

Watchers

8 watching

Forks

Latest commit

 

History

144 Commits

Folders and files

Repository files navigation

ESPNetLink

First Image Second Image

Table of Contents

  1. Flashing the Firmware
  2. CLI Command Reference
  3. Status LED

Developers: building from source, the dev-loop flash paths (CDC OTA / HTTP OTA / UART recovery), monitoring, and on-target tests are documented in BUILDING.md.


1. Flashing the Firmware

1.1 Requirements

Download the latest release files from the Releases page. You will need these four files:

File Flash Address
bootloader.bin 0x0
partition-table.bin 0x8000
ota_data_initial.bin 0x29000
espnetlink-fw.bin (the constant name since 2026-10-19; espnetlink-fw_vXXX.bin before) 0x30000

1.2 Flashing with esptool-js (Web Browser)

  1. Open https://espressif.github.io/esptool-js/ in a Chrome-based browser.

  2. Set Baudrate to 460800.

  3. Click Connect and select your ESP32-S3 COM port.

  4. Under Flash Address, add each file with its corresponding address:

    Flash Address File
    0x0 bootloader.bin
    0x8000 partition-table.bin
    0x29000 ota_data_initial.bin
    0x30000 espnetlink-fw.bin
  5. Click Program and wait for flashing to complete.

  6. Reset the device when prompted.

1.3 Flashing with esptool (Command Line)

python esptool.py -p <PORT> -b 460800 \
  --before default_reset --after hard_reset \
  --chip esp32s3 write_flash \
  --flash_mode dio --flash_freq 80m --flash_size detect \
  0x0      bootloader/bootloader.bin \
  0x8000   partition_table/partition-table.bin \
  0x29000  ota_data_initial.bin \
  0x30000  espnetlink-fw.bin

Replace <PORT> with your serial port (e.g., COM10 on Windows, /dev/ttyUSB0 on Linux).


2. CLI Command Reference

The device exposes a USB CDC-ACM serial console. Connect at any baud rate and type commands.

2.1 General

Command Description
ver Print firmware version and ESP-IDF version
echo 0|1 Get or set device-side input echo
debug 0|1 Get or set global log output (0 = off, 1 = debug)
config list [-j] Print all configuration keys (add -j for JSON)
config get/set <KEY> [VAL] Read or persist one key (applies on next boot)
ota <size> [sha256] Firmware update over this console — see tools/cdc_ota.py

Firmware updates: python tools/cdc_ota.py streams the current build into the inactive OTA slot over this console (SHA-256 verified) and reboots — no bootloader/UART access needed after the first flash.

Since 2026-10-20 an updated image boots pending_verify and is confirmed when LTE attaches, at 120 s of uptime, or before a planned restart or deep sleep. On a bootloader flashed over USB from that date (version 2, shown by system -i) a crash before the confirm boots the previous image again, so a dev build that panics at boot silently comes back as the previous build: check system -v after flashing.

The device also serves an HTTP settings API over USB Ethernet (http://192.168.7.1/...) and, once WiFi is enabled, on the hotspot (ESPNetLink_<id>, http://192.168.80.1/api/settings); see components/HTTP_API.md.

WiFi is off by default (since 2026-10-18), as is AGNSS. Turn the hotspot on with config set WIFI_MODE ap (or apsta, sta) and reboot, or through the web UI at http://192.168.7.1; wifi_modem -k prints the per-device AP password (with the radio off too, ap_enabled=0 then), which is generated on the first boot whatever the WiFi mode. AGNSS assistance is agnss -e (reboot to apply).

USB Ethernet class: the dongle presents RNDIS by default (what the WiCAN pairs with). A PC that has no RNDIS driver (Windows 11 24H2 dropped it; macOS and Linux bind CDC-NCM in-box) cannot reach the web UI to change it, so the console can: config set USB_CLASS ncm (or rndis), then reboot.

2.2 System

system -v                  Print firmware version string
system -i                  Print chip model, CPU cores, free heap, MAC address
system -s <unix_timestamp> Set system time (UTC); also triggers AGNSS time injection
reboot                     Cleanly stop LTE/PPP stack then reboot
factoryreset               Wipe ALL settings to factory defaults and reboot: it prints a
                           warning, then type `yes` within 60 s (scripts can use
                           `factoryreset --confirm`). Settings partition only (files on
                           /data and NVS stay); the AP password is generated anew on that
                           boot. `config reset` only restores the legacy keys listed by
                           `config list`, and needs a reboot like every setting.
yes                        Confirms a pending factoryreset; "Nothing to confirm" otherwise

2.3 Network

ping [ip] [-c count] [-i interval_ms]
    ICMP ping an IP address.
    Default target: 8.8.8.8, count: 4, interval: 1000 ms

speedtest [-d] [-u] [-b <bytes>]
    LTE throughput test via Cloudflare (speed.cloudflare.com).
    (no flags)  download + upload
    -d          download only
    -u          upload only
    -b <n>      bytes to download (default 102400); upload uses half

2.4 LTE

lte -s   Full modem status
lte -r   Signal quality (RSSI / BER)
lte -n   Network attachment state
lte -p   PPP connection status
lte -o   Operator name
lte -i   Current IP address
lte -q   Radio quality + PSM / eDRX power-saving state
lte -j   All parameters as JSON

lte -j also reports vbat_mv (the modem's supply voltage, AT+CBC) and modem_temp_c (AT+QTEMP) when the modem answers them.

2.5 GPS

gps -p [-j]    Print current fix (add -j for JSON output)
gps -s         Stream raw NMEA sentences to the console
gps -t [0|1]   Enable (1) or disable (0) NMEA passthrough mode
gps -c         Check GPS UART health
gps -V         Query the module firmware version ($PQTMVERNO)

2.6 AGNSS

Assisted GNSS speeds up time-to-first-fix by injecting cached time and position into the GPS module.

agnss -s             Show AGNSS enabled state, injection status, and cached position
agnss -v             Save current EASY navigation data to NVS
agnss -e             Enable AGNSS (takes effect on next boot)
agnss -d             Disable AGNSS (takes effect on next boot)
agnss -i             Get current cache interval (seconds)
agnss -i <seconds>   Set cache interval (minimum 10 s)

2.7 Power / Sleep

sleep 1              Light sleep: power off GPS and LTE, keep USB active.
                     Resume with the 'wake' command.

sleep 2 [secs]       Deep sleep: power off everything including USB.
                     Wake on timer (if seconds given) or reset button.

sleep 3              Deep sleep: USB mux off, wake on WAKE_GPIO pin (active-low).

sleep 4 [thresh]     Deep sleep: wake on IMU motion (Wake-on-Motion).
                     thresh = acceleration threshold in mg, 1–255 (default 50).

wake                 Wake from sleep mode 1 (reboots to re-initialise peripherals).

2.8 Production test

The device side of the production tester (tools/production/prodtest.py drives it over this console; every answer is one JSON line):

factory selftest [-w <ssid>]            Hardware self-test: identity, PSRAM, boot
                                        counters, USB mux readback, IMU (id, gravity,
                                        INT1 trace), LED, GPS (UART rx, module version,
                                        satellites), storage, LTE stage/SIM; -w adds a
                                        WiFi scan reporting that SSID's RSSI
factory button <ms>                     Wait up to <ms> for a button press and release
factory usbmux esp|ch343|bg95|off <ms>  Route the USB connector for <ms>, then back to
                                        the DIP route (the console drops meanwhile)
factory led red 0|1                     Drive the red LED on GPIO41
factory mark [<serial> [station]]       Write (or print) the factory record
                                        /data/factory.json
factory coredump [erase]                Print the stored panic summary (task, cause, PC,
                                        backtrace addresses) as JSON, or erase it
factory gpio <n>                        Dump one pin's live configuration and level
factory bootloader                      Reboot into ROM download mode (USB 303A:0009)
                                        for an esptool erase or re-flash with the
                                        DIP switch left in the run position

3. Status LED

The RGB LED is the only light visible outside the enclosure, so the firmware encodes the device state on it. The color is the uplink, the pattern is the GNSS fix. The mapping is main/main_status_led.c (the table itself is the host-tested main_status_led_policy.c).

LED Meaning
cyan, solid booting, or nothing to report (LTE disabled and no WiFi station connected). This is the idle indication: color and mode come from the led_manager settings (idle_r/g/b, idle_mode)
amber (orange) uplink connecting: the modem is starting, registering or dialing
green uplink up: PPP has an IP (with LTE disabled: the WiFi station has one)
blue uplink up and the VPN peer handshake is verified
red, slow blink link lost: PPP dropped or the network detached; the LTE supervisor is retrying by itself
red, solid SIM problem that needs you: no SIM, a PIN is required but not configured, or the configured PIN was refused
red, fast blink firmware update in progress, do not power off
magenta, solid parked at boot: BOOT held, or the USB mux DIP routes the connector away from the ESP (flash / modem passthrough position)
off sleeping (sleep 1..4)

Breathing (a slow fade in and out, about one breath every 4 s) means the GNSS has a fix; solid means it has none. This applies to amber, green and blue. The red states keep their own pattern, so a red light always means "the uplink needs attention" whatever the GNSS does.

Examples: green breathing = online with a position fix (the normal state in a car); green solid = online, no fix yet; amber breathing = fix acquired, still registering on the network; red slow blink = the link dropped and the device is reconnecting.

Notes:

  • led -c <r> <g> <b> (or PUT /api/led) overrides the status indication until led -x; led alone prints what the LED shows and at which priority. The boot log carries one line per transition: status LED: green breathe (lte connected, sta down, vpn down, gps fix).
  • The policy can be switched off with the status_led setting of the system descriptor (PUT /api/settings/system, reboot to apply); the LED then stays at the idle indication.
  • The red LED on GPIO41 (inside the enclosure) still follows the PPP link as before.
  • Amber is red 255, green 64 (STATUS_LED_AMBER_GREEN): the green die is far brighter than the red one, so equal levels read as lime and could not be told from green (bench 2026-10-23).

About

No description, website, or topics provided.

Resources

Stars

19 stars

Watchers

8 watching

Forks

Releases

Packages

Contributors

Languages