This commit is contained in:
Brad Stein 2025-06-06 00:41:32 -05:00
parent bb9748b423
commit 539b27e4c9
3 changed files with 4 additions and 5 deletions

View File

@ -46,6 +46,7 @@ Type=oneshot
ExecStart=/usr/local/bin/navka-core.sh
RemainAfterExit=yes
CapabilityBoundingSet=CAP_SYS_ADMIN
MountFlags=slave
[Install]
WantedBy=multi-user.target
UNIT
@ -65,4 +66,4 @@ UNIT
sudo systemctl daemon-reload
sudo systemctl enable --now navka-core.service navka-server.service
sudo systemctl restart navka-core.service navka-server.service
echo "✅ navka-server installed and running."
echo "✅ navka-server installed and restarted..."

View File

@ -1,8 +1,8 @@
#!/usr/bin/env bash
# Proven Pi-5 configfs gadget: HID keyboard+mouse + stereo UAC2
set -euo pipefail
modprobe libcomposite
# mountpoint -q /sys/kernel/config || mount -t configfs configfs /sys/kernel/config
modprobe libcomposite || { echo "libcomposite not in kernel; abort" >&2; exit 1; }
mountpoint -q /sys/kernel/config || mount -t configfs configfs /sys/kernel/config
G=/sys/kernel/config/usb_gadget/navka
if [[ -d $G ]]; then

View File

@ -6,7 +6,6 @@ use tokio::{fs::OpenOptions, io::AsyncWriteExt};
use tokio_stream::{wrappers::ReceiverStream, Stream, StreamExt};
use tonic::{transport::Server, Request, Response, Status};
use tracing::{info, error};
use tracing_subscriber::FmtSubscriber;
use navka_common::navka::{
relay_server::{Relay, RelayServer},
@ -33,7 +32,6 @@ impl Relay for Handler {
tokio::spawn(async move {
while let Some(msg) = in_stream.next().await.transpose()? {
// 1) write to /dev/hidg0
let data = msg.data.get(..8).ok_or_else(|| Status::invalid_argument("short"))?;
{
let mut f = hid.lock().await;