> ## 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.

# Device Parameters and Operations

## Parameter Persistence

Network parameter changes (IP address, port) are persisted to device flash automatically after `.set()` is called. No extra save step is needed — the firmware writes to flash in the background once it detects the change.

> [tab] Python
>
> ```python theme={null}
> glove.ip().set("192.168.1.200")  # send to the device and auto-persist to flash
> ```

> [tab] C
>
> ```c theme={null}
> wuji_glove_set_ip(dev, "192.168.1.100");  // auto-persist to device flash
> ```

The IP must be unique on the subnet. Avoid addresses already used by other devices or the host network adapter.

> [!NOTE]
>
> `save_params()` persists SDK-local parameters to `~/.wuji/sdk/params/`, which is a separate mechanism from the device-side flash persistence.

## Reboot

> [tab] Python
>
> ```python theme={null}
> glove.reboot()  # reboot the device
> ```

> [tab] C
>
> ```c theme={null}
> wuji_glove_reboot(dev);  // reconnect after reboot
> ```

## Calibration

Run hand model calibration when you use the glove for the first time, switch wearers, or need to swap hand profiles. See [Calibration](https://docs.wuji.tech/docs/en/wuji-glove/latest/sdk-data-reference/calibration.md) for details.

## Device Logs

Read firmware runtime logs:

```python theme={null}
# Get the log storage directory (default ~/.wuji/logs/)
log_dir = glove.get_device_log_dir()
print(f"Log directory: {log_dir}")
```

The C SDK has no equivalent device log directory API. This capability is Python-only.

## Hardware Version

Read the glove's hardware version to check compatibility and include it in fault reports. The value is read-only. Repeated queries don't change device state.

### Prerequisites

* Use the latest Wuji SDK with firmware that provides the hardware-version resource.
* Complete [Device Connection](https://docs.wuji.tech/docs/en/wuji-sdk/latest/device-connection.md) to obtain the Python glove object `glove` or the C device handle `dev`.

### Query the Hardware Version

> [tab] Python
>
> ```python theme={null}
> glove.hw_version().get()  # Query the hardware version
> ```

> [tab] C
>
> ```c theme={null}
> wuji_glove_get_hw_version(dev, &version);  // Query the hardware version
> ```

## Available Parameters

Read and modify device parameters through the SDK. For the parameter read/write API, see SDK [Device Parameters & Calibration](https://docs.wuji.tech/docs/en/wuji-sdk/latest/device-params.md).

| Parameter | API | Read | Write | Description |
| - | - | - | - | - |
| Serial number | `glove.sn()` | ✓ | x | 16-byte device serial number |
| Firmware version | `glove.version()` | ✓ | x | Current firmware version |
| Hardware version | `glove.hw_version().get()` | ✓ | x | `HwVersion`, all zeros means the hardware version is unknown |
| IP address | `glove.ip()` | ✓ | ✓ | Device network IP |
| Data port | `glove.port()` | ✓ | ✓ | Data transmission port |
| Hand side | `glove.hand_side()` | ✓ | x | Left or right hand |
| Device name | `glove.device_name` | ✓ | x | Name specified at connection time |

## Device Parameter Read / Write

Identity and network parameters:

> [tab] Python
>
> ```python theme={null}
> print(glove.sn())
> print(glove.version())
> print(glove.ip())
> print(glove.port())
> print(glove.hand_side())
> glove.ip().set("192.168.1.100")
> glove.port().set(50001)
> ```

> [tab] C
>
> ```c theme={null}
> // String typed getters use a two-call query: first probe with buf=NULL, then allocate and fill
> size_t needed = 0;
> wuji_glove_get_sn(dev, NULL, 0, &needed);
> char* sn = malloc(needed);
> wuji_glove_get_sn(dev, sn, needed, NULL);
>
> wuji_glove_get_version(dev, NULL, 0, &needed);
> char* fw = malloc(needed);
> wuji_glove_get_version(dev, fw, needed, NULL);
>
> wuji_glove_get_ip(dev, NULL, 0, &needed);
> char* ip = malloc(needed);
> wuji_glove_get_ip(dev, ip, needed, NULL);
>
> wuji_glove_get_hand_side(dev, NULL, 0, &needed);
> char* side = malloc(needed);   // "left" / "right"
> wuji_glove_get_hand_side(dev, side, needed, NULL);
>
> uint16_t port = 0;
> wuji_glove_get_port(dev, &port);
>
> // Write IP and port (requires reconnecting after the change)
> wuji_glove_set_ip(dev, "192.168.1.100");
> wuji_glove_set_port(dev, 50001);
>
> free(sn); free(fw); free(ip); free(side);
> ```

## Device Control

> [tab] Python
>
> ```python theme={null}
> glove.reboot()
> ```

> [tab] C
>
> ```c theme={null}
> // Reboot the device. The device disconnects, so wuji_connect again afterwards.
> wuji_glove_reboot(dev);
> ```


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