# Install SA1 :id=top

------

> _Doc Ver:_ 1.3  
_App Ver:_ 2.6.6.53  
_Date:_ 09/09/2026

------

This device runs **SA1 2.x** (`sa-di` + `sa-web`). It is not SA 3.x / SA2. Do not run `install_sa2.sh` or 3.x `sa_run`. SA1 and SA2 are mutually exclusive: they both listen on demodulator UDP **8190** and 7090 / 7094 / 80 / 8080 / 81. Stop `sa_daq` / `sa_web` / `sa_broker` / `sa_run` before installing or testing SA1.

## 1. Guides (LAN / Internet)

| | LAN | Internet |
|--|-----|----------|
| Install | http://192.168.3.9/sa1/install/ | http://sc.casstk.com/sa1/install/ |
| Chooser | http://192.168.3.9/sa1/install/get.html | http://sc.casstk.com/sa1/install/get.html |
| Help | http://192.168.3.9/sa1/help/ | http://sc.casstk.com/sa1/help/ |
| Ask | http://112.74.47.129:9999 | http://112.74.47.129:9999 |

## 2. Recommended: install via cspkg

cspkg is the company-wide package client. It auto-detects platform, selects source, verifies SHA256, and checks SA1/SA2 mutual exclusion. After install, upgrades, checks, and removal all use the same CLI — no need to find install scripts.

```bash
# 1. Install cspkg client
curl -fsSL http://192.168.3.9/sa2/install/cspkg | bash

# 2. Install SA1 via cspkg
sudo cspkg install sa1 -y
```

Later upgrades: `sudo cspkg upgrade sa1 -y`. Check version: `cspkg check sa1`. Docker flavor: `sudo cspkg install sa1 --flavor docker -y`. See [cspkg package client](cspkg.md).

## 3. Direct one-liner (without cspkg)

```bash
curl -fsSL http://192.168.3.9/sa1/install/install | sudo bash
```

If `/home/debian/sa1/current` already exists, the same command **upgrades**. Layout: `/home/debian/sa1` with `persist/`; `/var/sa` is a compatibility symlink.

The script picks the tarball from `uname -m`: `x86_64` → `linux_amd64`, `armv7l` → `linux_arm`.

## 3. Process manager

| Board | Init |
|-------|------|
| Debian (typical x86_64) | `sa-di.service` + `sa-web.service` + `csdfu.service` |
| BusyBox / no systemd (T113 armv7l) | `/etc/init.d/sa1` → `sa1-supervise` |

Without `CAP_NET_BIND_SERVICE`, sa-web skips port 80 and keeps **8080 / 81**. Open `http://<IP>:8080/login`.

## 4. Start after install :id=start

If `/login` does not open, start the units. Full cookbook: [Start, check, upgrade](operate.md).

**Debian / systemd:**

```bash
sudo systemctl start sa-di sa-web csdfu
sudo systemctl enable sa-di sa-web csdfu
```

**BusyBox / no systemd:** `sudo /etc/init.d/sa1 start`

Do not `killall -9`. Do not start a second `sa-di`. Browser: `http://<IP>/login` (or `:8080` / `:81`).

## 5. Check after install :id=check

```bash
sa1-upgrader status
pgrep -a sa-di
pgrep -a sa-web
printf '*IDN?\n' | nc -w 2 127.0.0.1 7090; echo
printf '*VER?\n' | nc -w 2 127.0.0.1 7090; echo
curl -sS http://127.0.0.1/api/info; echo
curl -sI http://127.0.0.1/login | head
```

Pass: `product=sa1`, four-part `2.6.x`, exactly one `sa-di` and one `sa-web`, no SA2 processes, `*IDN?` non-empty, `/login` on 80 **or** 8080 **or** 81. Details: [Start, check, upgrade](operate.md#check).

Later upgrades: `sudo sa1-upgrader upgrade -y` or [Start, check, upgrade](operate.md#upgrade).

## 6. Manage with cspkg (optional)

Besides `curl …/install | sudo bash` for a direct SA1 install, you can use the company-wide package client **cspkg** to manage SA1 (and SA2) uniformly:

```bash
curl -fsSL http://192.168.3.9/sa2/install/cspkg | bash    # install cspkg client first
sudo cspkg install sa1 -y                                  # then install SA1 via cspkg
cspkg check sa1
cspkg upgrade sa1 -y
```

cspkg auto-selects source, downloads and verifies, then delegates to `sa1-upgrader`. Supports remote SSH batch and offline `pull`/`--local`. See [cspkg package client](cspkg.md).

## 7. Ask an assistant

Open the unified helper http://112.74.47.129:9999 (SA1 handbook is ingested; say you are asking about SA1). Or send the Skill at `…/sa1/install/agent/llms.txt` to Cursor / ChatGPT. Say “follow the SA1 field Skill”. Old `ask.html` redirects there.

See also [Start, check, upgrade](operate.md), [Equipment upgrade](upgrade.md) and [Ask](ask.md).
