Files
wadamesh/variants/tdisplay_p4/ssl_client_stub.cpp
T
Kaj SchittecatandClaude Opus 4.8 2353c56adc p4: T-Display P4 port — web VNC/remote, time-sync hardening, brightness + sound
LilyGo T-Display P4 (ESP32-P4 + factory ESP-AT C6) reaches POC: LoRa mesh, Wi-Fi
companion (TCP:5000), GPS, SD, battery gauge, chat persistence, and now:

- Web VNC/REMOTE/terminal via a first-byte router on the single ESP-AT listener
  (HTTP verbs -> WS server, '<' frames -> phone companion; both live at once).
  C6Server gains a _begun gate so never-listening instances stay inert.
- VNC freeze fixed: bounded one-CIPSEND-chunk drains under the WS client mutex
  (a whole-band blocking write starved the main loop), fast-drop of stalled
  mirror clients, SEND-OK wait 8s->4s.
- Wi-Fi robustness: CWJAP? miss-streak tolerance, CIPSERVER liveness verify +
  re-arm (a re-association silently killed the listener until reboot).
- Time sync: HTTP-Date fallback when SNTP is blocked; ClockFloorRTC gains a
  MAX_PLAUSIBLE_EPOCH guard (all boards) after a garbage-future hardware RTC
  read (2043) latched the ratchet.
- Brightness: RM69A10 DCS 0x51 driven live (CC slider + persisted pref).
- Sound: ES8311 + NS4150B notification chimes (P4Audio, esp-bsp-derived
  register sequence on Wire1), full HAS_UI_SOUND surface + CC Screen/Sound
  sliders; ccVolumeReleaseCb's hardcoded tanBeep -> uiSoundPreview.
- tdisplay_p4/: IDF project (build.sh, c6_at AT-over-SDIO driver, sdkconfigs,
  fetch-deps.sh vendoring, .gitignore for local payloads).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 19:13:23 +02:00

32 lines
2.0 KiB
C++

// Pragmatic stub for arduino-esp32 3.3.10's ssl_client functions on the T-Display P4.
//
// On the P4 / IDF 5.5.1, arduino's NetworkClientSecure.cpp call signatures don't match
// ssl_client.cpp's definitions (an arduino-internal / toolchain ABI mismatch — e.g. the port
// param mangles `unsigned long` at the call site but `uint32_t` at the definition), so they're
// undefined at link. wadamesh doesn't use HTTPS yet (the companion link is USB/BLE/LoRa and map
// tiles are plain HTTP), so stub the referenced symbols to let the app link. Identical to the
// Tanmatsu's stub (same IDF + arduino), just guarded for this board.
//
// Symbols + signatures are taken verbatim from the linker's undefined-reference list. These are
// STRONG (not weak): a weak def in a .a doesn't get pulled to resolve an undefined ref, and there's
// no conflict because arduino's real defs mangle differently (that mismatch is why they're undefined).
// TODO: revisit for the HTTPS version-check / OTA-over-Wi-Fi (the P4's 32 MB PSRAM CAN do TLS).
#if defined(HAS_TDISPLAY_P4)
#include <IPAddress.h>
struct sslclient_context;
#define WK
WK int start_ssl_client(sslclient_context*, const IPAddress&, unsigned long, const char*, int,
const char*, bool, const char*, const char*, const char*, const char*,
bool, const char**) { return -1; }
WK void stop_ssl_socket(sslclient_context*) {}
WK int data_to_read(sslclient_context*) { return 0; }
WK int send_net_data(sslclient_context*, const unsigned char*, unsigned int) { return -1; }
WK int get_net_receive(sslclient_context*, unsigned char*, int) { return -1; }
WK int peek_net_receive(sslclient_context*, int) { return -1; }
WK int send_ssl_data(sslclient_context*, const unsigned char*, unsigned int) { return -1; }
WK int get_ssl_receive(sslclient_context*, unsigned char*, int) { return -1; }
WK void ssl_init(sslclient_context*) {}
WK int ssl_starttls_handshake(sslclient_context*) { return -1; }
#endif