Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

## [3.0.29] - 2026-11-19

### Fixed

- **A USB SIM stick on the same network as the home LAN** (for example a stick
that always uses 192.168.1.x, like many home routers) no longer cuts the
gateway off from the home devices. Before, traffic for the home network
could leave through the stick: device checks, LAN → Tailnet access and
subnet routing stopped working, and with the stick as the main uplink the
home router's DNS could not be reached, so names did not resolve and
Tailscale kept disconnecting and reconnecting. Home addresses now go through
Wi-Fi or Ethernet; only the stick's own addresses (and its gateway while the
stick carries the Internet traffic) go to the stick. Diagnostics → Route
lookup shows the reason.
- **With mobile data as the main uplink, name lookups use it too.** A DNS
server of the home network (learned from Wi-Fi) is replaced by the stick's
while the stick carries the Internet traffic, and comes back when Wi-Fi or
Ethernet does. A DNS server you chose outside the home network (for example
1.1.1.1) is kept.
- System → About and the update page link the RecoveryGateway repository, and
the release-notes link is shown again for its releases.

## [3.0.28] - 2026-11-19

### Changed
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ abstract: >-
optional MQTT, Home Assistant, ntfy and SNMP integration.
authors:
- alias: Mattboxx
version: 3.0.28
version: 3.0.29
date-released: 2026-11-18
license: GPL-3.0-only
repository-code: "https://github.com/Mattboxx/RecoveryGateway"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)

# PROJECT_VER lands in the esp_app_desc_t struct so the running firmware
# can report its version via the OTA APIs and the web UI's Status page.
set(PROJECT_VER "3.0.28")
set(PROJECT_VER "3.0.29")
# The migration bridge (env esp32-s3-bridge, CONFIG_TSR_MIGRATION_BRIDGE) is a
# 2.x-line release so that 2.x updaters install it like any other update.
set(TSR_BRIDGE_VER "2.1.0")
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ configuration, peers and measurements. Open an image for the full view.

[Browse the gallery](https://mattboxx.github.io/RecoveryGateway/screenshots/) for mobile, first boot, recovery, alerts, firewall and diagnostics.

## What's new in Firmware 3.0.28
## What's new in Firmware 3.0.29

- **USB SIM sticks on the home network's address range** (e.g. 192.168.1.x
on both sides) no longer cut the gateway off from the home devices.
- **Mobile data as the main uplink carries name lookups too**, so Tailscale
stays connected instead of dropping every few minutes.

### Also in 3.0.28

- **New name: RecoveryGateway** (formerly ESP32 Tailnet Gateway): same firmware,
same settings, new addresses (this repository and its website). Gateways on
Expand Down
28 changes: 25 additions & 3 deletions docs/DEVELOPMENT-ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@ PSRAM placement, cache tuning) is the base of this branch (`v3`).
Telegram/SMTP/DuckDNS/Cloudflare accounts, DNS clients, throughput).
7. Everything already planned stays planned (this roadmap, F01–F49).

## Next firmware (after 3.0.29) — owner requests to carry

- **System → About, "Source":** the link already opens `Mattboxx/RecoveryGateway`
(3.0.29), but its visible text still reads
`github.com/Mattboxx/esp32-tailnet-gateway` (`main/index.html` and the
`main/i18n/*.json` entries). Show `github.com/Mattboxx/RecoveryGateway`
(owner, 2026-11-19: "ricorda nella prossima versione di aggiustare questo
nelle info del firmware").

## 3.0.26 and later — Tailnet reach (owner decision, 2026-11-18)

Owner: "procedi in tutti i punti" after the 3.0.25 review
Expand Down Expand Up @@ -305,9 +314,22 @@ record keeps its layout: 8 value bytes, so the 7-key records of 3.0.25 read
unchanged and no migration is needed. Host core/API tests and browser
scenarios pass; device check pending.

**Deferred, possible future (owner, 2026-11-19: "salvala nella roadmap di un
ipotetico futuro ma ancora non è importante"): a USB stick whose network
overlaps the Wi-Fi/Ethernet LAN.**
**Implemented in 3.0.29 (owner, 2026-11-19, after the stick on board A cut the
LAN off): a USB stick whose network overlaps the Wi-Fi/Ethernet LAN.** First
recorded as deferred ("salvala nella roadmap di un ipotetico futuro ma ancora
non è importante"). `cell_overlap_route()` in `lwip_route_hook.c` sends a
destination inside both prefixes to the LAN uplink; the stick's own address
and a source bound to it stay on the stick, and its gateway and DHCP server
only while it carries the Internet uplink. Other resolvers stay on the LAN:
lwIP's list is global and on board A it held the home router (.254) while the
stick was primary; sent to the stick, no name resolved and the control
session flapped (about 200 s up, 200 s down). Host routing tests cover both
states, the .1 ambiguity and that resolver. Owner: "ho impostato la SIM come
accesso a internet principale...dovrebbe usare quello", so `cell_dns_follow()`
(route supervisor) also swaps a LAN resolver for the stick's gateway while a
network-mode stick carries the Internet uplink (also when Wi-Fi is down) and
restores it afterwards; public/user resolvers and PPP modems are left alone.
Device check with the stick on board A pending. The original analysis follows.

- **The problem:** router-style SIM sticks (RNDIS/ECM/NCM, e.g. an Alcatel/TCL
Link Key, 1BBB:0195, whose subnet 192.168.1.0/24 cannot be changed) can use
Expand Down
1 change: 1 addition & 0 deletions docs/USB-DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,4 @@ the pins option, save and restart.
| A phone is not seen | use an OTG adapter, enable USB tethering after plugging, unlock the phone |
| About 10 Mbit/s at most | expected: the ESP32-S3 USB port is full speed (12 Mbit/s) |
| Wi-Fi speed tests through the access point slower than before | expected while USB is on: fewer Wi-Fi receive buffers (see *Wi-Fi while a USB connection is on*) |
| The stick uses the same addresses as the home network (e.g. 192.168.1.x on both) | handled from 3.0.29: home addresses go through Wi-Fi/Ethernet. While the stick carries the Internet traffic, its gateway address (often .1) means the stick, so a home device with that same address is unreachable then; change the stick's or the router's range if you can |
13 changes: 13 additions & 0 deletions docs/VALIDATION-STATUS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Validation records

3.0.29 stable (release source `6440d7a`, MicroLink `9b0a70e`; BIN b5d26ac742104987cd0931bbd0e7965da4d2cb5d9dcd51a6c743e5d720753d8c; bootloader, partition table and esptool as 3.0.28). Content:
- a USB stick network on the home LAN's prefix (board A: Wi-Fi 192.168.1.0/24, router .254; TCL stick 1BBB:0195 also 192.168.1.0/24, gateway .1): home addresses go to the LAN uplink, the stick's address and (while it carries the Internet uplink) its gateway and DHCP server to the stick;
- the resolver follows a network-mode stick that carries the Internet uplink and is restored afterwards (on 3.0.28 board A's lookups all failed and the control session flapped about 200 s up / 200 s down);
- web UI links and release-notes check for `Mattboxx/RecoveryGateway`.

- **Offline:**
- clean build, image provenance PASS on `6440d7a`, USB RAM placement PASS;
- `validate_all.py --build --browser` 168/168 PASS on `6440d7a` (built in a separate folder);
- host routing tests: overlap in both uplink states, the .1 ambiguity, the home resolver, DNS follow/restore/re-assert, public resolver kept, PPP untouched;
- packaged from the archived, board-tested image (`--repository Mattboxx/RecoveryGateway`).
- **Board A over the LAN with the SIM stick as primary uplink, 21/23:** version, tailnet, policy authority, product name; after install and after a restart: stick selected, DNS = stick gateway, names resolve, STUN public IP is the mobile one, home router routed through Wi-Fi and answering, stick gateway routed to the stick; Tailscale connected for 8 minutes with no drop; update check answered by `Mattboxx/RecoveryGateway`; web polls; RAM floors (free 48.7 KB, lowest 39.8 KB). The two failures are pings to the test PC, routed correctly through Wi-Fi but dropped by the PC's Windows firewall (inbound ICMP echo disabled on its Public Wi-Fi profile).
- **Not run:** failover with Wi-Fi switched off (the UI cannot switch Wi-Fi off; host tests only), a PPP modem, subnet routing from a remote tailnet device to a home device.

3.0.28 stable, RecoveryGateway (release source `0c41c47`, MicroLink `9b0a70e`; BIN e63ebdbe66ac1f31376f6529f24674fad7334a9c1ea11475db8de4d494a69f92; bootloader, partition table and esptool as 3.0.27). Content:
- product renamed RecoveryGateway (UI, Home Assistant device, notifications, first-boot Wi-Fi);
- updater asks `Mattboxx/RecoveryGateway` first, then the two older names on 404.
Expand Down
5 changes: 5 additions & 0 deletions main/cell_uplink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,11 @@ struct netif *cell_uplink_selected_lwip(void)
(atomic_load(&s_selected_cell) || netif_default == s_lwip) ? s_lwip : NULL;
}

struct netif *cell_uplink_lwip(void)
{
return s_lwip && atomic_load(&s_has_ip) ? s_lwip : NULL;
}

esp_netif_t *cell_uplink_preferred_netif(esp_netif_t *lan)
{
esp_netif_ip_info_t info = {0};
Expand Down
3 changes: 3 additions & 0 deletions main/cell_uplink.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,8 @@ void cell_uplink_get_status(cell_status_t *out);
* carry the Internet uplink instead of `current`, otherwise NULL. */
struct netif *cell_uplink_lwip_select(struct netif *current);
struct netif *cell_uplink_selected_lwip(void);
/* TCP/IP context only: the cellular netif while it has an address, selected
* or not (route hook: a modem network that overlaps the LAN prefix). */
struct netif *cell_uplink_lwip(void);
esp_netif_t *cell_uplink_preferred_netif(esp_netif_t *lan);
esp_err_t cell_uplink_register_http(httpd_handle_t server);
Loading
Loading