xsh Library - rigol.
Shell utilities for RIGOL DHO800/DHO900 oscilloscopes, packaged as an xsh library.
These scopes are Android (Rockchip RK3399) instruments: adb is enabled by
default on TCP 55555 and adb root needs no password, SCPI listens on a raw
socket at 5555, and Web Control is on 80. This library turns the useful
one-liners that flow from that into named, documented utilities.
About xsh and its libraries, see the xsh document.
Status:
0.x, immature. Built and used against a DHO804 on firmware00.01.04. Paths like/rigol/shell/start_rigol_app.share firmware-specific — readnet/mdns-hookbefore running it on a different firmware.
- xsh-lib/core — load before this library.
- adb (Android platform-tools) —
brew install android-platform-tools. - python3 — used by
scpi/send.
| Utility | What it does |
|---|---|
rigol/adb/connect |
adb-connect to the scope over the network and adb root; prints the serial. |
rigol/ui/panel |
Pop/dismiss an Android overlay (quick-settings, notifications, Wi-Fi settings…) — the way into Android with no Windows/Super key. |
rigol/ui/ime-install |
Side-load a soft-keyboard (IME) APK and set it default, so the touchscreen can type (stock firmware ships no IME). |
rigol/net/mdns-hook |
Make mDNS + a chosen hostname survive reboot (firmware resets them), so the scope is reachable as <name>.local. Reversible with -u. |
rigol/scpi/send |
Send SCPI command(s) over :5555 and print query replies. |
Every utility takes -H HOST (default $XSH_RIGOL_HOST = rigol.local). See
xsh help rigol/<util> for full options.
xsh load xsh-lib/core
xsh load xsh-lib/rigol
# Reach the scope (defaults to rigol.local; -H for IP)
xsh rigol/adb/connect -H 192.168.1.100
# Open Android Wi-Fi settings on the scope screen, no keyboard needed
xsh rigol/ui/panel wifi
# ...then install a soft keyboard so you can type the password on the touchscreen
xsh rigol/ui/ime-install ./simplekeyboard.apk
xsh rigol/ui/panel collapse
# Persist mDNS + hostname across reboot (firmware resets them).
# No -n keeps the scope's own hostname; add -n NAME for a custom short name.
xsh rigol/net/mdns-hook
xsh rigol/net/mdns-hook -n dho804
# Talk SCPI
xsh rigol/scpi/send '*IDN?'xsh imports links a utility as a command named by its full path with - in
place of / (its LPUC) — not a bare name — which keeps names collision-free:
xsh imports rigol/ui/panel rigol/scpi/send
rigol-ui-panel wifi
rigol-scpi-send '*IDN?'Prefer short names? Add your own shell aliases/functions, e.g. in ~/.bash_profile:
ADB=rigol.local:55555
rigol-panel() { adb connect "$ADB" >/dev/null 2>&1; adb -s "$ADB" shell cmd statusbar expand-settings; }
rigol-shell() { adb connect "$ADB" >/dev/null 2>&1; adb -s "$ADB" root >/dev/null 2>&1; adb connect "$ADB" >/dev/null 2>&1; adb -s "$ADB" shell "$@"; }| Variable | Default | Meaning |
|---|---|---|
XSH_RIGOL_HOST |
rigol.local |
Scope host/IP (any -H wins). |
XSH_RIGOL_ADB_PORT |
55555 |
adb TCP port. |
XSH_RIGOL_SCPI_PORT |
5555 |
SCPI raw-socket port. |