Device Parameters and Operations
SDK Reference
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.
Python
C
glove.ip().set("192.168.1.200") # send to the device and auto-persist to flashwuji_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.
save_params() persists SDK-local parameters to ~/.wuji/sdk/params/, which is a separate mechanism from the device-side flash persistence.
Reboot
Python
C
glove.reboot() # reboot the devicewuji_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 for details.
Device Logs
Read firmware runtime logs:
# 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 to obtain the Python glove object
gloveor the C device handledev.
Query the Hardware Version
Python
C
glove.hw_version().get() # Query the hardware versionwuji_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.
| 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:
Python
C
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)// 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
Python
C
glove.reboot()// Reboot the device. The device disconnects, so wuji_connect again afterwards.
wuji_glove_reboot(dev);
Documentation