obd-poller over the K-line via the Bluetooth ELM327; gnss publisher; elm_connected
obd-poller drops its CAN socket: the Z27AG answers OBD-II only on ISO 9141-2. It holds a raw RFCOMM link to the ELM (no pairing, no root), fixes the protocol (ATSP3) so nothing probes CAN, publishes the obd_* signals, and releases the adapter after a minute of ECU silence so it can sleep. gnss: gpsd's fix as yukart/gnss/<signal>. orin-status: elm_connected from BlueZ. One native deploy script (deploy-native.sh BIN) behind the per-service ones; /etc/default/yukart-elm holds the adapter's address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
@@ -1,31 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build the obd-poller for aarch64, check it against the car's glibc, and install it
|
||||
# on an Orin as the yukart-obd-poller service.
|
||||
# Build obd-poller natively on the development Orin and install it on the car Orin as
|
||||
# yukart-obd-poller: scripts/deploy-native.sh does the work.
|
||||
#
|
||||
# usage: scripts/deploy-obd-poller.sh [host] (default: mikkeli-orin-nano)
|
||||
#
|
||||
# Cross-compiles from the workstation (the documented fallback): the development
|
||||
# Orin is the preferred native build host. Either way check-glibc.sh gates it.
|
||||
set -euo pipefail
|
||||
|
||||
HOST="${1:-mikkeli-orin-nano}"
|
||||
cd "$(dirname "$0")/.."
|
||||
TARGET=aarch64-unknown-linux-gnu
|
||||
BIN="target/$TARGET/release/obd-poller"
|
||||
|
||||
cargo build --release --target "$TARGET" --bin obd-poller
|
||||
scripts/check-glibc.sh "$BIN"
|
||||
|
||||
# Binary lives under ~/infra per the host repo's guidelines; /usr/local/bin gets a symlink.
|
||||
ssh "$HOST" 'mkdir -p ~/infra/svc-core'
|
||||
scp -q "$BIN" "$HOST:infra/svc-core/obd-poller.new"
|
||||
scp -q deploy/yukart-obd-poller.service "$HOST:infra/svc-core/yukart-obd-poller.service"
|
||||
ssh "$HOST" 'set -e
|
||||
mv ~/infra/svc-core/obd-poller.new ~/infra/svc-core/obd-poller
|
||||
sudo ln -sfn "$HOME/infra/svc-core/obd-poller" /usr/local/bin/yukart-obd-poller
|
||||
sudo install -m 0644 ~/infra/svc-core/yukart-obd-poller.service /etc/systemd/system/yukart-obd-poller.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable yukart-obd-poller.service >/dev/null
|
||||
sudo systemctl restart yukart-obd-poller.service
|
||||
sleep 1
|
||||
systemctl --no-pager --lines=5 status yukart-obd-poller.service'
|
||||
# usage: scripts/deploy-obd-poller.sh [host] (default: mikkeli-orin-nano)
|
||||
exec "$(dirname "$0")/deploy-native.sh" obd-poller "$@"
|
||||
|
||||
Reference in New Issue
Block a user