openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > HiLink LTE Modem

Control Huawei HiLink USB LTE modems (E3372, E8372, etc.) via REST API. Send/receive SMS, check signal strength, manage SIM PIN, query prepaid balance, and m...

通信与消息

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v1.0.0

统计:⭐ 0 · 162 · 0 current installs · 0 all-time installs

0

安装量(当前) 0

🛡 VirusTotal :可疑 · OpenClaw :可疑

Package:and0r/hilink-lte

安全扫描(ClawHub)

  • VirusTotal :可疑
  • OpenClaw :可疑

OpenClaw 评估

The skill's behavior matches a HiLink modem manager, but it performs privileged system/network changes, sources a user config file (allowing arbitrary shell execution), and does not declare required binaries — these mismatches and risks merit caution.

目的

Name/description align with the included shell script and the documented HiLink API; the actions (SMS, PIN, signal, network setup) are coherent with a modem-management tool. However, the package metadata declares no required binaries while the script clearly depends on curl, python3, ip, sudo, grep/sed/awk, and ping — a discrepancy to be aware of.

说明范围

Runtime instructions and the script direct the agent/user to modify network interfaces, create udev rules, edit /etc/network files, run sudo ip/route commands, and source ~/.config/hilink/config. Sourcing the config file executes any shell content inside it (not limited to simple variable assignments), which is a direct code-execution risk if the file is untrusted or tampered with. The skill only targets the local modem API (no external endpoi…

安装机制

There is no install spec (instruction-only plus an included script), which is low risk for arbitrary remote downloads. But because a runnable script is included and it relies on several external binaries, the omission of dependency declarations is a packaging/information gap that could surprise users at runtime.

证书

No credentials are requested by the registry metadata, which matches the local-only nature of the modem API. However, the skill reads/sources a local config (~/.config/hilink/config) that may include HILINK_PIN (SIM PIN) in plaintext — this is sensitive. More importantly, sourcing the config runs any shell code present, so the skill can effectively execute arbitrary content from a user-writable path, which is disproportionate if the intended p…

持久

The skill suggests persistent system changes (udev rule, /etc/network/interfaces.d entry) and issues privileged commands (sudo ip addr/route modification). These actions are consistent with a modem manager but require elevated privileges and will affect system networking; users should be aware and review/approve such changes explicitly before running.

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「HiLink LTE Modem」。简介:Control Huawei HiLink USB LTE modems (E3372, E8372, etc.) via REST API. Send/re…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/and0r/hilink-lte/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: hilink-lte
description: Control Huawei HiLink USB LTE modems (E3372, E8372, etc.) via REST API. Send/receive SMS, check signal strength, manage SIM PIN, query prepaid balance, and monitor connection status. Use when sending or reading SMS messages, checking LTE signal/status, entering SIM PIN, querying mobile balance (USSD), or managing a HiLink USB modem.
---

# HiLink LTE Modem

Control Huawei HiLink USB LTE modems via their local REST API.

## Setup

The modem must be in **HiLink mode** (not stick/serial mode) and accessible via HTTP.

### Config

Set gateway IP in `~/.config/hilink/config`:
```bash
HILINK_GATEWAY=192.168.200.1
```

Or pass via environment: `export HILINK_GATEWAY=192.168.200.1`

Default: `192.168.200.1`

### Network Requirements

The LTE USB interface needs an IP on the modem's subnet (e.g., 192.168.200.x). Configure as **static IP with no gateway and no DNS** to avoid routing conflicts:

```
# /etc/network/interfaces.d/lte
allow-hotplug lte0
iface lte0 inet static
    address 192.168.200.100/24
```

**Critical:** Never let the LTE interface set a default route or DNS — it will override your LAN connection. Use `nogateway` and `nohook resolv.conf` in dhcpcd, or a static config with no gateway line.

### Persistent Interface Name

USB network interfaces get random names on each boot. Create a udev rule for a stable name:

```bash
# Find MAC address
cat /sys/class/net/enx*/address

# Create udev rule
echo 'SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="xx:xx:xx:xx:xx:xx", NAME="lte0"' 
  | sudo tee /etc/udev/rules.d/70-lte-modem.rules
```

## CLI Usage

```bash
# SMS
scripts/hilink.sh sms send "+41791234567" "Hello!"
scripts/hilink.sh sms list
scripts/hilink.sh sms read 40001
scripts/hilink.sh sms delete 40001

# Status & Signal
scripts/hilink.sh status
scripts/hilink.sh signal

# SIM PIN
scripts/hilink.sh pin enter 1234
scripts/hilink.sh pin disable 1234
scripts/hilink.sh pin status

# Prepaid Balance (USSD)
scripts/hilink.sh balance

# Connection info
scripts/hilink.sh info
```

## API Overview

All HiLink API calls require a session token + CSRF token pair:

```bash
# Get tokens
curl -s http://GATEWAY/api/webserver/SesTokInfo
# Returns: <SesInfo>cookie</SesInfo><TokInfo>csrf_token</TokInfo>

# Use in requests
curl -X POST http://GATEWAY/api/endpoint 
  -H "Cookie: <SesInfo value>" 
  -H "__RequestVerificationToken: <TokInfo value>" 
  -H "Content-Type: application/xml" 
  -d '<xml request body>'
```

For detailed API endpoints, see [references/api.md](references/api.md).

## Troubleshooting

- **Error 113018 on SMS send**: SIM not registered to network. Check PIN status and signal.
- **SimState 260**: PIN required. Enter PIN first via `scripts/hilink.sh pin enter <PIN>`.
- **SignalStrength 0**: No network registration. Wait after PIN entry or check antenna.
- **DNS/routing broken**: LTE interface set a default route. Remove it: `sudo ip route del default via 192.168.200.1`
- **Interface name changed**: USB MAC randomized. Create udev rule (see Setup).