# Start, check, upgrade :id=top

------

> _Doc Ver:_ 1.2  
_App Ver:_ 2.6.6.53  
_Date:_ 09/18/2026

------

This page is the field cookbook for **SA1 2.x** (`sa-di` + `sa-web` + `csdfu`). SA1 and SA2 are mutually exclusive (same UDP **8190** and 7090 / 7094 / 80 / 8080 / 81). Stop `sa_daq` / `sa_web` / `sa_broker` / `sa_run` before starting or testing SA1. Do not run two `sa-di`. Do not `killall -9`. Do not use `sa_run` or `install_sa2.sh`.

More detail: [Install](install.md) · [Upgrade](upgrade.md) · [Ask](ask.md). How to raise sample rate and which settings slow demodulation: [Improve demodulator speed](improve_sa_speed.md) · [Frequency setting](frq_set.md). Idle `*rst!;` after locking the data IP: [Device reset watchdog](device-rst.md).

------

## 1. Start :id=start

Power-on should start the units by itself. If the browser cannot open `/login`, start them by hand.

### 1.1 Debian / systemd (typical x86_64)

```bash
sudo systemctl start sa-di sa-web csdfu
sudo systemctl enable sa-di sa-web csdfu
sudo systemctl restart sa-di
sudo systemctl restart sa-web
sudo systemctl restart csdfu
sudo systemctl stop csdfu sa-web sa-di
sudo systemctl status sa-di sa-web csdfu --no-pager
```

Use `restart sa-di` after an upgrade if `*VER?` still shows the old VersionN. The login page `/api/info` already reads `version.json` and can show the new dotted version before `*VER?` catches up.

### 1.2 BusyBox / no systemd (T113 armv7l)

```bash
sudo /etc/init.d/sa1 start
sudo /etc/init.d/sa1 stop
sudo /etc/init.d/sa1 restart
sudo /etc/init.d/sa1 status
```

That script calls `sa1-supervise`. It is **not** 3.x `sa_run`.

### 1.3 Browser after start

Open `http://<device-IP>/login`. If port 80 is not bound (no `CAP_NET_BIND_SERVICE`), use `http://<device-IP>:8080/login` or `:81`. Factory Web users live in `/var/sa/conf/web-users.json` (`admin` / `temppwd` is common on field boxes; change it).

Phones and SA2's online-device page learn that port from the UDP 7000 discovery packet. `sa1-supervise` that is not root advertises **8080**. See [LAN discovery](discovery.md).

Layout: `/home/debian/sa1/current` is the running tree. `/var/sa` is a compatibility symlink. Processes read `/var/sa/{web,conf,data}`, not the Git checkout.

------

## 2. Check :id=check

Preferred on the device:

```bash
sa-doctor
sa-doctor --json
```

From a laptop: `sa-doctor --url http://<device-IP> --user admin --password …` (HTTP only; not 7090). Full page: [sa-doctor](sa-doctor.md). CLI / MCP: [sa-cli](sa-cli.md) · [sa-mcp](sa-mcp.md) · [hub](ops.md). Own help: `sa-doctor --help`, `sa-cli --help`, `sa-mcp --help`.

On older packages without `sa-doctor`, run these on the **device** (SSH as `debian`, or `root` on BusyBox boards that have no `debian` user).

```bash
sa1-upgrader status
pgrep -a sa-di
pgrep -a sa-web
pgrep -a sa_daq || true
pgrep -a sa_web || true
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
curl -sI http://127.0.0.1:8080/login | head
curl -sI http://127.0.0.1:81/login | head
```

BusyBox may also use `/etc/init.d/sa1 status`.

**Pass when all of these are true:**

| Check | Want |
|-------|------|
| `sa-doctor` | `ok=true` (or `--json` `"worst"` is not `fail`) |
| `sa1-upgrader status` | `product=sa1`, four-part `version=2.6.x`, `init=systemd` or `init=sysv` / `supervise` |
| Processes | Exactly **one** `sa-di` and **one** `sa-web` |
| Mutex | No `sa_daq` / `sa_web` / `sa_broker` / `sa_run` |
| `*IDN?` | Non-empty (field IDN, e.g. `FT-16`) |
| `*VER?` | Integer VersionN of the running `version.json` (e.g. `2.6.6.20` → `26620`) |
| `/api/info` | Dotted `version` matches `VERSION` / `version.json` |
| `/login` | HTTP 200 on **80 or 8080 or 81** |
| Modbus (optional) | Factory does **not** listen on 1502. Enable path and register map: [Modbus TCP slave](modbus_tcp_slave.md). Blade-root My/η sparse `0=201…14=208` is filled from `bladeload.php`, which does not turn the slave on. |

If a check fails, do **not** start a second `sa-di` “to try again”. Read `journalctl -u sa-di -u sa-web -n 80 --no-pager` (systemd) or `/home/debian/sa1/persist/log/` and `persist/log/sa1-upgrader.log`.

------

## 3. Upgrade :id=upgrade

Use **`sa1-upgrader`**. The same `install` one-liner upgrades when `/home/debian/sa1/current` already exists. **No default reboot.** Failed health check rolls back. Do not `--reset-conf` on a field box unless you intend to wipe persist conf back to factory (IDN/SN are kept).

### 3.1 Management UI

1. Menu > **Help** > **Upgrade**
2. **Upgrade** keeps `persist/conf`. **Reset / Reinstall** is `--reset-conf`.
3. Offline: upload `sa1-v2.6.*-linux_amd64.tar.gz` (or `linux_arm` on armv7l). Do not upload an SA2 pack.
4. When `/login` is back, refresh the browser. Then run [§2 Check](#check). Restart `sa-di` if `*VER?` is still the old integer.

### 3.2 Online SSH

```bash
curl -fsSL http://192.168.3.9/sa1/install/upgrade | bash
# or
sudo sa1-upgrader upgrade -y
```

Online pulls public **`casstk/sa1`** (no token). Do not point `SA1_REGISTRY` at private `sa1/sa1`.

Internet host: `sc.casstk.com`. Chooser: http://192.168.3.9/sa1/install/get.html

Pin a version:

```bash
sa1-upgrader status
sa1-upgrader check
sudo sa1-upgrader upgrade --version 2.6.6.24 -y
```

### 3.3 Offline SSH

```bash
sudo sa1-upgrader inspect --local ~/sa1-v2.6.6.24-linux_amd64.tar.gz
sudo sa1-upgrader upgrade --local ~/sa1-v2.6.6.24-linux_amd64.tar.gz -y
```

armv7l: use `sa1-v2.6.6.24-linux_arm.tar.gz`.

### 3.4 Rollback

```bash
sudo sa1-upgrader rollback -y
```

Automatic if the post-upgrade health check fails.

Guides: http://192.168.3.9/sa1/install/ · http://sc.casstk.com/sa1/install/

------

## Change log :id=changelog

|Version|Date|Description|
|:--:|----|----------|
|1.2|09/13/2026|Optional Modbus 1502 on the check table.|
|1.1|09/08/2026|Links to Improve demodulator speed and Frequency setting.|
|1.0|09/07/2026|Start, check, and upgrade in one field page.|
