---
title: "在 Quectel RM520N-GL 上安装 | Wantastic Docs"
description: "通过 ADB 在 2 分钟内于 Quectel RM520N-GL 或其他 Qualcomm SDX 5G 模组上安装 wantasticd：一条命令，扫描二维码，点击 Claim Device。"
url: "https://wantastic.app/zh/docs/install-quectel-rm520n"
category: "Install wantasticd"
reading_time: "4 分钟"
---

# 在 Quectel RM520N-GL 上安装

通过 ADB 在 2 分钟内于 Quectel RM520N-GL 或其他 Qualcomm SDX 5G 模组上安装 wantasticd：一条命令，扫描二维码，点击 Claim Device。

> **Outcome:** wantasticd 在模组上以 systemd 方式运行，将配置保存在持久化的 /usrdata 分区上，上报蜂窝网络和 GNSS 数据，并在控制台中显示为 Online。

## Before you start

- 已启用 ADB 的 Quectel RM520N-GL（或类似的 Qualcomm SDX55/SDX65 模组）。
- 一台装有 adb（Android platform-tools）并通过 USB 连接到模组的电脑。
- 模组的数据连接正常（SIM 卡已注册）。
- 一部手机或一个浏览器，用于登录 Wantastic 控制台。

## 快速安装（2 分钟）

用 adb 在模组上打开 shell，然后运行一条命令。配置保存在 /usrdata 上，因此固件更新后依然保留。无需令牌。

1. 在你的电脑上，用下方第一条命令在模组上打开 shell。
2. 将安装命令粘贴到 adb shell 中。你已经是 root。
3. 设备会打印 Claim URL 和二维码。用手机扫描二维码，或在浏览器中打开 Claim URL。
4. 登录 Wantastic 控制台。Claim Wantastic Device 窗口会打开，密钥已自动填好。点击 Claim Device。
5. 终端打印 "Device claimed"。按 Ctrl+C，然后运行下方的重启命令。
6. 在控制台中打开 Devices。设备显示为 Online。

在你的电脑上:

```bash
adb shell
```

安装并认领:

```sh
wget -qO- https://get.wantastic.app/install.sh | sh; wantasticd genkey
```

出现 "Device claimed" 后：按 Ctrl+C，然后重启服务:

```sh
systemctl restart wantasticd
```

*安装并认领: genkey 打印 Claim URL 和二维码后进入等待。你在控制台中点击 Claim Device 后，它会打印 "Device claimed"。然后按 Ctrl+C 并重启服务。*

```
$ / # wget -qO- https://get.wantastic.app/install.sh | sh; wantasticd genkey
…
Skipping login. Run 'wantasticd login' to authenticate.
…
Generated device claim key: /usrdata/wantastic/etc/device-claim-key.json
Public key: Vd3hK1oQ7mR2sT9uW4xY6zA8bC0dE2fG4hJ6kL8mN0P=
Server URL: https://console.wantastic.app
Claim URL: https://console.wantastic.app/#desktop?claim_public_key=Vd3hK1oQ…%3D&wantastic_server=https%3A%2F%2Fconsole.wantastic.app

█▀▀▀▀▀█ ▄▀▄ ▀█▄ █▀▀▀▀▀█
█ ███ █ ▀█▄▀▄█ █ ███ █
█ ▀▀▀ █ ▄▀█ ▀▄ █ ▀▀▀ █
▀▀▀▀▀▀▀ ▀ ▀ █ ▀ ▀▀▀▀▀▀▀
▀█▄▀▄▀▀█▀▄█▀▄▀▀▄█▀▄▀█▄
█▀▀▀▀▀█ █▄▀▄▀█ ▀▄█ ▄▀
▀▀▀▀▀▀▀ ▀▀ ▀▀▀ ▀▀▀ ▀▀▀

2026/10/29 09:14:03 Waiting for claim. Press Ctrl+C to stop.
2026/10/29 09:15:12 Device claimed. Configuration saved to /usrdata/wantastic/etc/config.conf
^C
$ / # systemctl restart wantasticd
```

*Console: Claim Wantastic Device。Claim URL 和二维码会自动填入密钥，你只需点击 Claim Device。*

1. Claim public key 已自动填写
2. Wantastic server 保持默认即可
3. 点击 Claim Device

> **Tip:** 手边没有手机？从终端复制 Claim URL，在任意电脑上打开即可。

> **Operational note:** 在显示二维码之前，安装程序可能会打印 "Skipping login" 或服务错误。这在新设备上是正常的。认领并重启后服务即可正常工作。

## 检查是否正常工作

1. 运行 wantasticd status。它会显示 Status: Connected 和一个 VPN IP。
2. 在控制台中打开 Devices。设备显示为 Online。

检查:

```sh
wantasticd status
```

*wantasticd status: Status: Connected 加上 VPN IP 表示隧道已建立。*

```
$ / # wantasticd status
Status:        Connected
Version:       v1.0.54+377f3c0
Mode:          TUN (wantastic0)
VPN IPs:       10.200.0.14/32
Public key:    q7ZkV3m1yH0dTn8pXo2bLwR4sE6uJ9cA1fG5hK8iN0M=
Server:        wg.wantastic.app:51820
Exit node:     false
Local access:  false
Auto update:   true
Traffic:       ↓ 18.4 KiB  ↑ 9.2 KiB
Peers:         2 (direct 1, relay 1)
Uptime:        4m12s
```

*Console: Devices 窗口：新设备以其名称出现，并在几秒钟内变为 Online。*

1. 按名称搜索
2. 状态显示 Online
3. 覆盖网络 IP 与 wantasticd status 一致
4. Last seen 持续更新

## 管理服务

- 在 Devices 行中打开 WUSP Device Management，查看模组的信号、SIM 卡和 GNSS 数据。
- 不要自行打开 /dev/at_mdm0 或 /dev/at_usb0。它们归厂商软件使用。
- wantasticd 会将其身份复制到 U-Boot 环境中，因此模组重新刷机后仍会保留。要关闭此功能，请为服务设置 WANTASTIC_FWENV=0。

模组上的 systemd:

```sh
systemctl restart wantasticd
systemctl stop wantasticd
journalctl -u wantasticd -f
```

## 其他安装方式

仅在自动化或特殊情况下才需要这些方式。上面的快速安装是最简单的方法。

### 使用令牌（多台设备）

当你用脚本安装大量设备，或无人能扫描二维码时，请使用令牌。在控制台中创建一次令牌即可：Account → Secrets → + New Secret → Generate。用它替换 <TOKEN>。

令牌安装:

```sh
wget -qO- https://get.wantastic.app/install.sh | sh -s -- --token <TOKEN>
```

> 像对待密码一样对待令牌。在其过期之前，任何持有它的人都能向你的账户添加设备。

### 模组 shell 中无法访问互联网

在电脑上下载 ARM 版本，用 adb 推送到 /usrdata。然后认领模组并添加服务。

在你的电脑上:

```bash
TAG=$(curl -fsSL https://get.wantastic.app/latest | cut -d+ -f1)
curl -fsSLO https://get.wantastic.app/$TAG/wantasticd-linux-arm.tar.gz
tar -xzf wantasticd-linux-arm.tar.gz
adb shell mkdir -p /usrdata/wantastic/bin
adb push wantasticd /usrdata/wantastic/bin/wantasticd
adb shell chmod 755 /usrdata/wantastic/bin/wantasticd
```

> 然后在 adb shell 中运行 /usrdata/wantastic/bin/wantasticd genkey，并按照《手动安装 tarball》指南中的 systemd 选项卡创建服务（路径使用 /usrdata/wantastic/bin/wantasticd）。

*Console: Account → Secrets → + New Secret。密钥的值就是令牌。*

1. 打开 Secrets 选项卡
2. 点击 + New Secret
3. 为其命名
4. 点击 Generate
5. 复制新密钥

## Verify the result

- /usrdata/wantastic/etc/config.conf 存在且不为空。
- wantasticd status 显示 Status: Connected。
- 模组在 Devices 中显示为 Online，断电重启后依然如此。

## Common issues

### adb 未显示任何设备。

```
error: no devices/emulators found
```

- **Where:** adb
- **Likely cause:** 模组上的 ADB 已关闭，或 USB 线只能供电。
- **Fix:** 使用厂商的 AT 命令或工具开启 ADB，换用数据线，然后再次检查。

检查:

```bash
adb devices
```

### 安装程序无法写入根文件系统。

```
Error: could not remount / read-write. Run as root or unlock the filesystem.
```

- **Where:** install.sh
- **Likely cause:** 该固件锁定了根文件系统。
- **Fix:** 使用 "No internet in the module shell"（模组 shell 中无法访问互联网）选项卡。它会将二进制文件保存在 /usrdata 上。

### 你已点击 Claim Device，但终端始终没有打印 "Device claimed"。

```
Claim polling not ready: claim config rejected (401): invalid signature or timestamp out of window
```

- **Where:** wantasticd genkey
- **Likely cause:** 设备时钟不准确。只有当时钟与实际时间相差在 30 秒以内时，认领才能成功。
- **Fix:** 修正时钟。genkey 会继续等待，并自行完成。

检查时间:

```sh
date
# wait for network time from the cell network, then genkey continues
```

### 服务无法启动，或反复重启。

```
Failed to load configuration: validate config: private key required
```

- **Where:** journalctl -u wantasticd
- **Likely cause:** wantasticd 已安装，但设备尚未认领，因此其配置文件为空。
- **Fix:** 认领设备，然后重启服务。

认领并重启:

```sh
wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
systemctl restart wantasticd
```

- **Verify:** wantasticd status 显示 Status: Connected。

### 出现了第二个接口（wantastic1），或日志显示端口冲突。

```
Port 51820 in use, using random port
```

- **Where:** 服务日志
- **Likely cause:** genkey 仍在终端中运行，而服务也在运行。现在有两个副本在争用。
- **Fix:** 在运行 genkey 的终端中按 Ctrl+C，然后重启服务。

重启:

```sh
systemctl restart wantasticd
```

### status 显示 Running (tunnel down)，或 peers 显示 (server) 为 HANDSHAKE never。

```
Device health check failed: …
```

- **Where:** 服务日志
- **Likely cause:** 网络阻止了到中心节点（wg.wantastic.app）的出站 UDP 51820 端口，或 DNS 不可用。
- **Fix:** 在防火墙中放行出站 UDP 51820，然后重启服务。

测试 DNS 并重启:

```sh
nslookup wg.wantastic.app
systemctl restart wantasticd
```

- **Verify:** wantasticd peers 显示 (server) 有最近的握手（例如 "8s ago"）。

### 你想把设备迁移到另一个账户，或重新进行认领。

```
Config already exists at /usrdata/wantastic/etc/config.conf — skipping login.
```

- **Where:** install.sh
- **Likely cause:** 即使重新运行安装程序，设备也会保留其配置。你必须先移除旧配置。
- **Fix:** 将旧配置移到别处，然后用新密钥重新认领设备。

从头开始:

```sh
mv "/usrdata/wantastic/etc/config.conf" "/usrdata/wantastic/etc/config.conf.bak"
wantasticd genkey --force
# after "Device claimed": press Ctrl+C, then:
systemctl restart wantasticd
```

- **Verify:** 设备出现在新账户中，wantasticd status 显示 Connected。

### 通过蜂窝网络进行大流量传输时卡住。

- **Where:** 服务日志
- **Likely cause:** 蜂窝链路的 MTU 通常较小。代理会自动降低隧道 MTU，并记录 "Tunnel MTU 1420 -> <n> to fit the <m>-byte link to the hub"。
- **Fix:** 通常无需处理。如果仍然卡住，请向运营商询问 APN 的 MTU。

## Continue with

- [Choose your install method](https://wantastic.app/zh/docs/install-overview): Find your device in one table and copy one command. Most devices install in 2 minutes: install, scan a QR code, click Claim Device.
- [WUSP device management](https://wantastic.app/zh/docs/wusp-device-management): See live data, change a setting, reboot and take snapshots of wantasticd devices.
- [wantasticd CLI reference and operations](https://wantastic.app/zh/docs/wantasticd): The most used wantasticd commands first, then every command and flag, environment variables, config and state paths per OS, log lines, local access, exit node, and the claim flow (genkey / --wait-claim).
- [Update, roll back and uninstall](https://wantastic.app/zh/docs/update-and-uninstall): Update or uninstall wantasticd with one line per OS. Also: how auto-update works, turning it off, rolling back to the previous binary, and purging all data.
- [OpenWrt and embedded device errors](https://wantastic.app/zh/docs/errors-openwrt-embedded): kmod-tun, read-only flash, procd, full flash, wrong clocks and BusyBox issues on routers and modules.
- [Manual tarball install](https://wantastic.app/zh/docs/install-manual): Install wantasticd by hand from the release archive on any Linux CPU (including ppc64, s390x and loong64), claim it with genkey, and add your own service.
