Read and Write Parameters
Discover Resources
wuji resources lists a device's readable/writable parameters and subscribable topics:
wuji resources --sn <SN>
wuji resources --sn <SN> --jsonThe command output is the authoritative list. Frequently used parameters:
| Parameter | Description |
|---|---|
hand_side | Handedness |
firmware_version | Firmware version |
serial_number | Serial number |
ip_address | Device IP address |
data_port | Data port |
Read a Parameter
wuji get <path> reads a parameter and decodes it into a typed JSON value automatically:
$ wuji get firmware_version --sn <SN>
firmware_version = "x.y.z"
$ wuji get ip_address --sn <SN> --jsonUse resource paths exactly as wuji resources prints them. Reading a path that doesn't exist fails with exit code 1, and the error message points to wuji resources for valid paths. When the type is unknown, the default output shows the value as <unrecognized value>, and --json omits the value key.
Write a Parameter
wuji set <path> <value> writes a parameter. The value is JSON, or raw hex bytes with a 0x prefix:
wuji set data_port 50002 --sn <SN> # JSON number
wuji set some_param '[1,2]' --sn <SN> # JSON array
wuji set some_param 0x01ff --sn <SN> # raw hex bytesWhen a host application occupies the device, the CLI runs in read-only access and set is rejected. Release the occupying direct connection and retry.
Notes
- Network parameters such as
ip_addressanddata_porttake effect after a device restart. Not seeing an immediate change inwuji devicesis expected - The message
virtual parameter 'X' currently has no valuemeans the virtual parameter has no default and the stateless CLI doesn't persist writes — this is expected behavior