Roadmap: cellular (LTE) link for the ESCargot Express firmware #2

Open
opened 2026-11-03 03:13:50 +00:00 by Steve · 3 comments
Owner

ESCargot's ESP32 firmware (the Express boards, FSESC Express, MakerBase and others) reaches a bike over WiFi, and through the hub relay from anywhere the bike has WiFi. This tracks the work to give it its own cellular link, so a parked or moving bike can be checked, logged and configured with no WiFi nearby.

The first board is the Waveshare ESP32-S3-SIM7670G-4G (LTE Cat-1, GNSS, SD card, battery gauge), with a CAN transceiver added to reach the controller.

Done (firmware, built from source; not in a release yet)

  • Board file for the Waveshare ESP32-S3-SIM7670G (WS S3 SIM7670G). Pins are taken from Waveshare's schematic; not yet checked on hardware.
  • Modem driver for the SIM7670: power and reset, SIM and network registration, then PPP through ESP-IDF's esp_modem. The hub client runs over it unchanged. It has host-side tests against a simulated modem (98 checks), but no hardware yet.
  • Network status from the device: WiFi, the hub session, and the modem's signal and registration. It shows in ESCargot Tool's phone app as "Device Network" and on the desktop with --netStatus.
  • Position from the modem's GNSS, the SD card in 1-bit mode for ride logs, and the board's battery gauge.

Next

  • Bring the board up: SIM registration, PPP, and a hub session over LTE. Works on a Google Fi data SIM (IPv6-only).
  • CAN: an SN65HVD230 transceiver on the 38-pin header (TX IO2, RX IO42), on the bike's bus with the controller and the logger.
  • Power from the battery pack through a DC-DC converter, sized for the modem's current peaks.
  • Then a sealed enclosure, and a board designed for the job.

The board arrives this week. Progress updates will be posted here.

ESCargot's ESP32 firmware (the Express boards, FSESC Express, MakerBase and others) reaches a bike over WiFi, and through the hub relay from anywhere the bike has WiFi. This tracks the work to give it its own cellular link, so a parked or moving bike can be checked, logged and configured with no WiFi nearby. The first board is the **Waveshare ESP32-S3-SIM7670G-4G** (LTE Cat-1, GNSS, SD card, battery gauge), with a CAN transceiver added to reach the controller. ## Done (firmware, built from source; not in a release yet) - [x] Board file for the Waveshare ESP32-S3-SIM7670G (`WS S3 SIM7670G`). Pins are taken from Waveshare's schematic; not yet checked on hardware. - [x] Modem driver for the SIM7670: power and reset, SIM and network registration, then PPP through ESP-IDF's `esp_modem`. The hub client runs over it unchanged. It has host-side tests against a simulated modem (98 checks), but no hardware yet. - [x] Network status from the device: WiFi, the hub session, and the modem's signal and registration. It shows in ESCargot Tool's phone app as "Device Network" and on the desktop with `--netStatus`. - [x] Position from the modem's GNSS, the SD card in 1-bit mode for ride logs, and the board's battery gauge. ## Next - [x] Bring the board up: SIM registration, PPP, and a hub session over LTE. Works on a Google Fi data SIM (IPv6-only). - [ ] CAN: an SN65HVD230 transceiver on the 38-pin header (TX IO2, RX IO42), on the bike's bus with the controller and the logger. - [ ] Power from the battery pack through a DC-DC converter, sized for the modem's current peaks. - [ ] Then a sealed enclosure, and a board designed for the job. The board arrives this week. Progress updates will be posted here.
Author
Owner

Bench progress, 2026-11-03. The Waveshare ESP32-S3-SIM7670G-4G has arrived and runs ESCargot's Express firmware. No SIM yet, so everything below is what can be checked without one.

  • Modem: a SIMCom SIM7670G-MNGV, firmware revision V1.9.05, answering AT commands over USB.
  • Chip variant: the board's ESP32-S3 has 16 MB of flash and 8 MB of octal PSRAM, not the 2 MB quad PSRAM part the board file assumed. It is now built for that variant, and the firmware sees about 7.8 MB of free memory. A second board would show whether Waveshare ships both.
  • Connection to ESCargot Tool: the S3's own USB never appeared on the USB-C port, with SW2's USB_SET either way. A bring-up build puts the Tool's link on UART0 instead, through the board's CH343 USB-to-serial chip, and the Tool connects that way.
  • Modem driver: it powers the modem and talks to it over its UART. --netStatus reads:
WiFi: access point, not connected
Hub: no session
Modem: fault (no SIM)
Network: - , registration -1
Data: down, online 0 s, connects 0, drops 0, resets 0
GNSS: on, 0 fixes
Battery: 4.29 V, 114 %

"no SIM" is the modem's own answer (CME error 10). GNSS is on, with no fix indoors. The battery gauge answers; its 114 % needs a look.

  • eSIM: the modem accepts the SIM APDU commands (AT+CSIM, AT+CCHO, AT+CGLA, AT+CCHC) that an open-source profile assistant such as lpac uses, so an eSIM card in the SIM slot should be manageable through it. Not tried yet.

Next, with a SIM: set the APN, register on the network, bring up PPP, and open a hub session over LTE. --netStatus will show it: registration and the network name on the Network line, and Data "up" with time online.

**Bench progress, 2026-11-03.** The Waveshare ESP32-S3-SIM7670G-4G has arrived and runs ESCargot's Express firmware. No SIM yet, so everything below is what can be checked without one. - **Modem:** a SIMCom SIM7670G-MNGV, firmware revision V1.9.05, answering AT commands over USB. - **Chip variant:** the board's ESP32-S3 has 16 MB of flash and 8 MB of octal PSRAM, not the 2 MB quad PSRAM part the board file assumed. It is now built for that variant, and the firmware sees about 7.8 MB of free memory. A second board would show whether Waveshare ships both. - **Connection to ESCargot Tool:** the S3's own USB never appeared on the USB-C port, with SW2's USB_SET either way. A bring-up build puts the Tool's link on UART0 instead, through the board's CH343 USB-to-serial chip, and the Tool connects that way. - **Modem driver:** it powers the modem and talks to it over its UART. `--netStatus` reads: ``` WiFi: access point, not connected Hub: no session Modem: fault (no SIM) Network: - , registration -1 Data: down, online 0 s, connects 0, drops 0, resets 0 GNSS: on, 0 fixes Battery: 4.29 V, 114 % ``` "no SIM" is the modem's own answer (CME error 10). GNSS is on, with no fix indoors. The battery gauge answers; its 114 % needs a look. - **eSIM:** the modem accepts the SIM APDU commands (`AT+CSIM`, `AT+CCHO`, `AT+CGLA`, `AT+CCHC`) that an open-source profile assistant such as lpac uses, so an eSIM card in the SIM slot should be manageable through it. Not tried yet. **Next**, with a SIM: set the APN, register on the network, bring up PPP, and open a hub session over LTE. `--netStatus` will show it: registration and the network name on the Network line, and Data "up" with time online.
Author
Owner

Bench progress, 2026-11-05/06. With a SIM in, the Waveshare reaches ESCargot Tool over LTE, end to end.

  • Registration: a Google Fi data SIM (APN h2g2) registers on LTE band 66. Signal is weak indoors (RSRP −107 to −112 dBm).
  • IPv6-only network: Fi gives this APN an IPv6 address and no IPv4, even when asked for both. So PPP never came up until the firmware learned IPv6 over PPP: address autoconfiguration, plus DNS from router advertisements.
  • Hub over LTE: the hub relay now has an IPv6 address and AAAA records, and the Express tries IPv4 first, then IPv6. The Tool connects to the board through the relay with no WiFi involved.
  • TLS from scripts: script sockets connect over IPv6 too. A package's MQTT client reaches a TLS broker over LTE.
    • Pins: it can pin either the server's certificate or an intermediate CA. An intermediate pin survives certificate renewals, and the chain below it is still verified, hostname included.
    • Fix: the S3 build needed full-size (16 kB) TLS records; the C3's 1 kB buffers failed the handshake.
  • Modem silent after a reboot: solved. It was the board's DIP switch SW2 position 3 ("4G"). When it's on, it powers the modem regardless of GPIO21, so the firmware can't power-cycle the modem. Turn it off, and the modem recovers on its own after reboots and flashes.
  • Correction: the modem power pin is GPIO21 on the ESP32-S3R8 board, as the board file has it. Waveshare's older schematic shows GPIO33, but on the R8 that pin belongs to the octal PSRAM.

Built from source, not in a release yet. Next: the CAN transceiver to the controller, then power from the pack.

**Bench progress, 2026-11-05/06.** With a SIM in, the Waveshare reaches ESCargot Tool over LTE, end to end. - **Registration:** a Google Fi data SIM (APN `h2g2`) registers on LTE band 66. Signal is weak indoors (RSRP −107 to −112 dBm). - **IPv6-only network:** Fi gives this APN an IPv6 address and no IPv4, even when asked for both. So PPP never came up until the firmware learned IPv6 over PPP: address autoconfiguration, plus DNS from router advertisements. - **Hub over LTE:** the hub relay now has an IPv6 address and AAAA records, and the Express tries IPv4 first, then IPv6. The Tool connects to the board through the relay with no WiFi involved. - **TLS from scripts:** script sockets connect over IPv6 too. A package's MQTT client reaches a TLS broker over LTE. - Pins: it can pin either the server's certificate or an intermediate CA. An intermediate pin survives certificate renewals, and the chain below it is still verified, hostname included. - Fix: the S3 build needed full-size (16 kB) TLS records; the C3's 1 kB buffers failed the handshake. - **Modem silent after a reboot: solved.** It was the board's DIP switch SW2 position 3 ("4G"). When it's on, it powers the modem regardless of GPIO21, so the firmware can't power-cycle the modem. Turn it off, and the modem recovers on its own after reboots and flashes. - **Correction:** the modem power pin is GPIO21 on the ESP32-S3R8 board, as the board file has it. Waveshare's older schematic shows GPIO33, but on the R8 that pin belongs to the octal PSRAM. Built from source, not in a release yet. **Next:** the CAN transceiver to the controller, then power from the pack.
Author
Owner

Bench progress, 2026-11-07/08. The Waveshare is now a working LTE hotspot and CAN node, and releases ship firmware for it.

  • Hotspot over an IPv6-only network: Fi gives no IPv4, so the board runs a CLAT, the client half of 464XLAT: hotspot clients' IPv4 goes out as IPv6 through T-Mobile's NAT64. A phone on the hotspot loads IPv4-only sites and Android marks the network as having internet.
  • What made it usable: the modem's UART now runs at 921600 rather than 115200. At 115200 the link carried about 6 kB/s each way, and a phone saw 4–5 s pings. After an LTE reconnect, the previous session's IPv6 address is dropped, so the board's own connections and the CLAT follow the new one.
  • Hub TLS: handshakes failed with "insufficient memory" because mbedTLS allocated only from internal RAM. It now uses the board's 8 MB PSRAM.
  • CAN bridge: with can_bridge on, the board acts as a node on a CAN bus it isn't wired to, through an Express on that bus running the can_bridge package, over WiFi. Telemetry only: a filter decides what may reach the real bus, and setpoints never do. On the bench the Tool read a controller's firmware through it.
  • BLE link to a controller: with no Express on the vehicle, the board can connect to a controller's built-in BLE module for values, Home Assistant and the Tool through the hub. Full CAN-node mode over BLE is experimental: nRF51 modules are too slow.
  • Camera: the OV5640 works from LispBM, Lua and the terminal, and as a Home Assistant camera. A rear-view widget in the app's Simple dash runs at about 3 frames a second locally.
  • Battery: it runs on an 18650. After fitting a cell, plug in USB-C once to wake the protection chip. The battery gauge's percentage still reads high (106–114 %) until it settles, so go by the voltage for now.
  • Releases now ship firmware for this board (WS S3 SIM7670G).
**Bench progress, 2026-11-07/08.** The Waveshare is now a working LTE hotspot and CAN node, and releases ship firmware for it. - **Hotspot over an IPv6-only network:** Fi gives no IPv4, so the board runs a CLAT, the client half of 464XLAT: hotspot clients' IPv4 goes out as IPv6 through T-Mobile's NAT64. A phone on the hotspot loads IPv4-only sites and Android marks the network as having internet. - **What made it usable:** the modem's UART now runs at 921600 rather than 115200. At 115200 the link carried about 6 kB/s each way, and a phone saw 4–5 s pings. After an LTE reconnect, the previous session's IPv6 address is dropped, so the board's own connections and the CLAT follow the new one. - **Hub TLS:** handshakes failed with "insufficient memory" because mbedTLS allocated only from internal RAM. It now uses the board's 8 MB PSRAM. - **CAN bridge:** with `can_bridge on`, the board acts as a node on a CAN bus it isn't wired to, through an Express on that bus running the `can_bridge` package, over WiFi. Telemetry only: a filter decides what may reach the real bus, and setpoints never do. On the bench the Tool read a controller's firmware through it. - **BLE link to a controller:** with no Express on the vehicle, the board can connect to a controller's built-in BLE module for values, Home Assistant and the Tool through the hub. Full CAN-node mode over BLE is experimental: nRF51 modules are too slow. - **Camera:** the OV5640 works from LispBM, Lua and the terminal, and as a Home Assistant camera. A rear-view widget in the app's Simple dash runs at about 3 frames a second locally. - **Battery:** it runs on an 18650. After fitting a cell, plug in USB-C once to wake the protection chip. The battery gauge's percentage still reads high (106–114 %) until it settles, so go by the voltage for now. - **Releases** now ship firmware for this board (WS S3 SIM7670G).
Sign in to join this conversation.
No description provided.