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> --json

The command output is the authoritative list. Frequently used parameters:

ParameterDescription
hand_sideHandedness
firmware_versionFirmware version
serial_numberSerial number
ip_addressDevice IP address
data_portData 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> --json

Resource paths accept both . and / as separators. When the type is unknown, the raw bytes print as hex.

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 bytes

When 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_address and data_port take effect after a device restart. Not seeing an immediate change in wuji devices is expected
  • The message virtual parameter 'X' currently has no value means the virtual parameter has no default and the stateless CLI doesn't persist writes — this is expected behavior