> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wuji.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Read and Write Parameters

> Discover, read, and write device parameters with resources, get, and set

## Discover Resources

`wuji resources` lists a device's readable/writable parameters and subscribable topics:

```bash theme={null}
wuji resources --sn <SN>
wuji resources --sn <SN> --json
```

The 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:

```bash theme={null}
$ wuji get firmware_version --sn <SN>
firmware_version = "x.y.z"

$ wuji get ip_address --sn <SN> --json
```

Use 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:

```bash theme={null}
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
```

<Warning>
  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.
</Warning>

## 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
* On Wuji Hand 2, writing `data_port` requires recent firmware. Valid ports are 10000–65535, except `50000`. An out-of-range value makes `set` fail and leaves the port unchanged. After a successful write, `wuji get data_port` returns the new port right away, and the device switches to the new port after a restart
* 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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.