From 51f6168a76e84f2d68f4e48e4ac08cbcb85dcd7e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 12:38:51 +0000 Subject: [PATCH] fix: update PiWebServer docs for macOS and add explicit cstring include Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/3ce82582-23e0-4afe-b22f-b24f81721488 Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- src/mesh/raspihttp/PiWebServer.cpp | 26 ++++++++++++++++-------- src/platform/portduino/PortduinoGlue.cpp | 1 + 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/mesh/raspihttp/PiWebServer.cpp b/src/mesh/raspihttp/PiWebServer.cpp index 8aa357b27..d42e19cc7 100644 --- a/src/mesh/raspihttp/PiWebServer.cpp +++ b/src/mesh/raspihttp/PiWebServer.cpp @@ -1,22 +1,32 @@ /* -Adds a WebServer and WebService callbacks to meshtastic as Linux Version. The WebServer & Webservices -runs in a real linux thread beside the portdunio threading emulation. It replaces the complete ESP32 -Webserver libs including generation of SSL certifcicates, because the use ESP specific details in -the lib that can't be emulated. +Adds a WebServer and WebService callbacks to meshtastic via the Portduino/native target (Linux and +macOS). The WebServer & Webservices run in a real host thread beside the Portduino threading +emulation. It replaces the complete ESP32 Webserver libs including generation of SSL certificates, +because those libs use ESP-specific details that can't be emulated. The WebServices adapt to the two major phoneapi functions "handleAPIv1FromRadio,handleAPIv1ToRadio" -The WebServer just adds basaic support to deliver WebContent, so it can be used to -deliver the WebGui definded by the WebClient Project. +The WebServer just adds basic support to deliver WebContent, so it can be used to +deliver the WebGui defined by the WebClient Project. Steps to get it running: -1.) Add these Linux Libs to the compile and target machine: + +Linux (apt): +1.) Add these libs to the compile and target machine: sudo apt update && \ apt -y install openssl libssl-dev libopenssl libsdl2-dev \ libulfius-dev liborcania-dev +macOS (Homebrew): +1.) Install prerequisites via Homebrew: + + brew install ulfius openssl + + The PlatformIO env (native-macos) picks up compiler/linker flags automatically + via `pkg-config` for ulfius, liborcania, libyder, and openssl. + 2.) Configure the root directory of the web Content in the config.yaml file. - The followinng tags should be included and set at your needs + The following tags should be included and set at your needs Example entry in the config.yaml Webserver: diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index d79351f2f..1f59e78b5 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -37,6 +37,7 @@ // Used by getMacAddr()'s macOS fallback to read the en0 link-layer address. // `getifaddrs()` is the BSD-portable way; `` provides the // `sockaddr_dl` cast and the `LLADDR()` macro that points at the 6-byte MAC. +#include // strcmp, memcpy #include #include #include