diff --git a/README.md b/README.md
index cdba7b5..c6bee35 100644
--- a/README.md
+++ b/README.md
@@ -248,3 +248,10 @@ should be -> {"ok": true, ... } -> otherwise look at the logs:
journalctl -u drive-ctl -n 80 --no-pager
+
+## Networking / AccessPoint / Captive Portal
+
+see /network/ folder for config
+
+
+
diff --git a/drive/etc/nginx/snippets/captive-portal.conf b/drive/etc/nginx/snippets/captive-portal.conf
new file mode 100644
index 0000000..0c72b8b
--- /dev/null
+++ b/drive/etc/nginx/snippets/captive-portal.conf
@@ -0,0 +1,16 @@
+# --- Captive Portal Trigger (Android/iOS/Windows) ---
+# Android / Google connectivity check
+location = /generate_204 { return 302 /; }
+location = /gen_204 { return 302 /; }
+
+# iOS/macOS captive check
+location = /hotspot-detect.html { return 200 '
SuccessOK'; add_header Content-Type text/html; }
+location = /library/test/success.html { return 302 /; }
+
+# Windows NCSI check
+location = /ncsi.txt { return 302 /; }
+location = /connecttest.txt { return 302 /; }
+
+# Optional: Android “portal” URL
+location = /captiveportal { return 302 /; }
+
diff --git a/drive/etc/nginx/snippets/drive.conf b/drive/etc/nginx/snippets/drive.conf
index 07fa354..d28c671 100644
--- a/drive/etc/nginx/snippets/drive.conf
+++ b/drive/etc/nginx/snippets/drive.conf
@@ -1,6 +1,6 @@
- location ^~ /drive/ {
- alias /opt/helva-robot/drive/var/www/drive/;
+ location ^~ /drive {
+ alias /opt/helva-robot/drive/var/www/drive;
try_files $uri $uri/ /drive/index.html;
}
diff --git a/drive/opt/drive-ctl/server.py b/drive/opt/drive-ctl/server.py
index 9f15229..1586e77 100644
--- a/drive/opt/drive-ctl/server.py
+++ b/drive/opt/drive-ctl/server.py
@@ -5,6 +5,28 @@ import serial
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.responses import HTMLResponse
+import time
+import logging
+
+log = logging.getLogger("drive")
+logging.basicConfig(level=logging.INFO)
+
+_last_send_t = None
+
+def log_send_timing(note: str = ""):
+ global _last_send_t
+ now = time.perf_counter() # monotonic + hochauflösend
+ if _last_send_t is None:
+ _last_send_t = now
+ return
+ dt_ms = (now - _last_send_t) * 1000.0
+ _last_send_t = now
+
+ # Nur loggen wenn "auffällig"
+ if dt_ms > 120:
+ log.warning("SERIAL SEND GAP %.0f ms %s", dt_ms, note)
+
+
SERIAL_PORT = "/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0" # ggf. /dev/ttyUSB0
BAUD = 115200
@@ -24,6 +46,7 @@ def send_lr(l: int, r: int):
l = clamp255(l)
r = clamp255(r)
line = f"L {l} R {r}\n".encode("ascii")
+ log_send_timing("(before write)")
ser.write(line)
@app.get("/health")
diff --git a/face/etc/nginx/sites-available/face b/face/etc/nginx/sites-available/face
index f8d47c7..d3b742c 100644
--- a/face/etc/nginx/sites-available/face
+++ b/face/etc/nginx/sites-available/face
@@ -2,6 +2,10 @@ server {
listen 80;
server_name _;
+ # captive portal to face
+ include /opt/helva-robot/drive/etc/nginx/snippets/captive-portal.conf;
+
+ # gives access to drive control
include /opt/helva-robot/drive/etc/nginx/snippets/drive.conf;
root /opt/helva-robot/face/var/www/html;
diff --git a/face/var/www/html/index.html b/face/var/www/html/index.html
index 211cfed..bacabd8 100755
--- a/face/var/www/html/index.html
+++ b/face/var/www/html/index.html
@@ -18,8 +18,10 @@
neutral
+
+ 🎮 Steuerung öffnen