From 4b1eca6c0df0542999d1140bfb3d44bd4788e283 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Fri, 4 Jul 2025 14:01:06 -0500 Subject: [PATCH] fixing daemon for cam --- scripts/daemon/lesavka-core.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/scripts/daemon/lesavka-core.sh b/scripts/daemon/lesavka-core.sh index 56cc5e2..8589a43 100644 --- a/scripts/daemon/lesavka-core.sh +++ b/scripts/daemon/lesavka-core.sh @@ -132,18 +132,28 @@ echo 333333 >"$F/streaming/uncompressed/u/f1/dwDefaultFrameInterval" # 30 fp echo 333333 >"$F/streaming/uncompressed/u/f1/dwFrameInterval" # ── 3. REQUIRED HEADER LINKS ────────────────────────────────────── -# header/h MUST be a directory – NOT a symlink +# 3‑a Streaming‑interface header (directory, not symlink) mkdir -p "$F/streaming/header/h" -ln -sf ../../uncompressed/u "$F/streaming/header/h/1" # format #1 -echo 1 >"$F/streaming/header/h/bNumFormats" # how many /h/N links -echo 0 >"$F/streaming/header/h/bmInfo" # no special caps -mkdir -p "$F/control/header" -ln -sf ../../streaming/header/h "$F/control/header/h" +ln -sf ../../uncompressed/u "$F/streaming/header/h/1" # “format 1” link +echo 1 >"$F/streaming/header/h/bNumFormats" +echo 0 >"$F/streaming/header/h/bmInfo" + +# 3‑b “class” sub‑dirs for FS / HS / SS (must pre‑exist!) +for s in fs hs ss; do + mkdir -p "$F/streaming/class/$s" + ln -sf ../../header/h "$F/streaming/class/$s/h" +done + +# 3‑c Video‑control header (and class links) +mkdir -p "$F/control/header/h" +for s in fs hs ss; do + mkdir -p "$F/control/class/$s" + ln -sf ../../header/h "$F/control/class/$s/h" +done # Friendly string for the camera entity mkdir -p "$F/control/header/strings/0x409" echo "Lesavka UVC" >"$F/control/header/strings/0x409/label" -echo "Lesavka UVC" >"$F/control/header/strings/0x409/label" # ----------------------- configuration ----------------------------- mkdir -p "$G/configs/c.1/strings/0x409"