Fry Firmware v0.1.1
Fry Firmware v0.1.1
Two fixes, both proven on an ESP32 against the live hardwareapi.
WireGuard tunnels now come up
set_wg stored the whole host:port string as the endpoint and never recorded the port
separately. esp_wireguard passes that string straight to lwIP's dns_gethostbyname, which
cannot parse a trailing :port, so even an IP literal was treated as a hostname and
resolution never completed. Every attempt returned ESP_ERR_RETRY (0x201), surfacing as
wg: connect failed err=513, and the tunnel never established.
The connect call also treated that code as fatal. ESP_ERR_RETRY is an advisory to call
again while the lookup finishes, so it is now retried up to ten times at 500 ms and only for
that code. The NTP sync result, previously discarded, is honoured as well.
Verified on hardware: wg: handshake ok, confirmed server-side by a fresh handshake with
244 B received / 92 B sent, health reporting vpn=up, and three SOCKS5 relays at HTTP 200.
OTA no longer downgrades
The manifest check compared versions with strcmp(...) != 0, treating any difference as an
update in either direction. A device running a build newer than the published manifest
overwrote itself with the older image. Versions are now compared numerically and an update
only ever moves a device forward. Deliberate rollback remains slot-based.
The text comparison was also wrong on its own terms: 0.9.0 sorts above 0.10.0 as text.
Known issues
- ESP8266 OTA over HTTPS can exhaust the heap and reset the chip. Plain HTTP completes a full
OTA cleanly. Gate on the largest free block rather than total free heap. - ESP32-family TLS still uses
setInsecure(); certificate verification is not yet enabled. - NAPT is unavailable on this build, so the tunnel is relay-only via SOCKS5.