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

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    glove.ip().set("192.168.1.200")  # send to the device and auto-persist to flash
    ```
  </Tab>

  <Tab title="C">
    ```c theme={null}
    wuji_glove_set_ip(dev, "192.168.1.100");  // auto-persist to device flash
    ```
  </Tab>
</Tabs>

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

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

## Reboot

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    glove.reboot()  # reboot the device
    ```
  </Tab>

  <Tab title="C">
    ```c theme={null}
    wuji_glove_reboot(dev);  // reconnect after reboot
    ```
  </Tab>
</Tabs>

## Calibration

Run hand model calibration when you use the glove for the first time, switch wearers, or need to swap hand profiles. See [Calibration](/en/docs/wuji-glove/sdk-data-reference/calibration) 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.

## Available Parameters

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

| Parameter | API | Read | Write | Description |
| - | - | - | - | - |
| Serial number | `glove.sn()` | ✓ | x | 16-byte device serial number |
| Firmware version | `glove.version()` | ✓ | x | Current firmware version |
| 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:

<Tabs>
  <Tab title="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>

  <Tab title="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);
    ```
  </Tab>
</Tabs>

## Device Control

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    glove.reboot()
    ```
  </Tab>

  <Tab title="C">
    ```c theme={null}
    // Reboot the device. The device disconnects, so wuji_connect again afterwards.
    wuji_glove_reboot(dev);
    ```
  </Tab>
</Tabs>


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