Metadata-Version: 2.4
Name: wiliot_certificate
Version: 4.6.0
Summary: Tools for testing and certifying Wiliot-compatible gateways and bridges
Author-email: Wiliot <support@wiliot.com>
License-Expression: MIT
Project-URL: Wiliot, https://www.wiliot.com
Project-URL: Certification, https://www.wiliot.com/product/ambient-iot-network#partner-device-certification
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: <3.14,>=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask<=3.1.2,>=3.1
Requires-Dist: plotly<=6.3.0,>=6.0.0
Requires-Dist: statsmodels<=0.14.5,>=0.14.4
Requires-Dist: pandas<=2.3.2,>=2.2.3
Requires-Dist: tabulate<=0.9.0,>=0.9.0
Requires-Dist: paho-mqtt<=2.1.0,>=2.1.0
Requires-Dist: bitstruct<=8.21.0,>=8.20.0
Requires-Dist: protobuf<=6.32.1,>=6.30.2
Requires-Dist: jsonschema<=4.25.1,>=4.23.0
Requires-Dist: pyserial<=3.5,>=3.5
Requires-Dist: jinja2<=3.1.6,>=3.1.5
Requires-Dist: werkzeug<=3.1.3,>=3.1.3
Requires-Dist: requests<=2.32.5,>=2.32.3
Requires-Dist: beautifulsoup4<=4.14.3,>=4.12.0
Dynamic: license-file

# wiliot-certificate

`wiliot-certificate` provides tools for testing and certifying gateways and bridges for compatibility with Wiliot's ecosystem.

The package installs the following commands:

- Certification Wizard (`wlt-cert`)
- Certification CLI (`wlt-cert-cli`)
- Tester Firmware Upgrade (`wlt-cert-tester-upgrade`)
- Gateway Registration Certification (`wlt-cert-reg`)
- Wiliot Board Type Management CLI (`wlt-btm`)

## Compatibility

`wiliot-certificate` 4.6.x supports:

- Firmware version 4.4.0 or later
- Bridge API versions 12 or later
- Gateway API versions 203 or later
- Python 3.12 or 3.13

## Installation

```console
pip install wiliot-certificate
```

## Commands

### Certification Wizard

```console
wlt-cert
```

This is the recommended way to configure and run a certification. The command opens a local setup wizard that guides you through selecting a device type, validation schema, tester, broker, and tests.

You need a [validation schema](https://community.wiliot.com/customers/s/article/Validation-Schema) and a [tester device](https://community.wiliot.com/customers/s/article/Wiliot-Certification). Run `wlt-cert --help` to see the available server options.

After setup, selecting **Run Certificate** opens a terminal and starts testing your device.

### Certification CLI

```console
wlt-cert-cli --dut DUT_ID --validation_schema schema.json --custom_broker broker.json
```

The required arguments are:

- `--dut`: ID of the device under test. For a combo device, use `GATEWAY_ID:BLE_MAC`.
- `--validation_schema`, `-vs`: Path to the validation schema JSON file.
- `--custom_broker`, `-cb`: Path to the custom MQTT broker configuration JSON file.

The CLI uses a serial tester by default and scans for its port when `--port` is omitted. Use `--tester GATEWAY_ID` to run with a remote gateway tester. Run `wlt-cert-cli --help` for all options.

### Tester Firmware Upgrade

```console
wlt-cert-tester-upgrade
```

Upgrades the tester device to a firmware version supported by this certification package. Use `--port PORT`, or `-p PORT`, to select a serial port explicitly; otherwise the tool scans the available ports.

### Gateway Registration Certification

```console
wlt-cert-reg --dut GATEWAY_ID --apikey API_KEY
```

Certifies the gateway registration process on the Wiliot platform. The gateway must use Wiliot's production MQTT broker and must not already be registered to an account. See [Wiliot Certification](https://community.wiliot.com/customers/s/article/Wiliot-Certification) for setup information.

### Wiliot Board Type Management

```console
wlt-btm --help
```

`wlt-btm` manages gateway and bridge firmware versions in Wiliot's Board Type Management (BTM) system.
This tool allows you to manage firmware versions for gateways and bridges.

List available board types:

```console
wlt-btm --env aws --server prod --token API_TOKEN --get_board_types
```

Get available versions:

```console
wlt-btm --env aws --server prod --token API_TOKEN --get --ifc wifi
```

Post a firmware version:

```console
wlt-btm --env aws --server prod --token API_TOKEN --post --ifc wifi --unified UNIFIED_VERSION --wifi WIFI_VERSION --ble BLE_VERSION
```

Upload firmware or validation-schema files:

```console
wlt-btm --env aws --server prod --token API_TOKEN --ifc wifi --unified UNIFIED_VERSION --put_file VALIDATION_SCHEMA.json
wlt-btm --env aws --server prod --token API_TOKEN --ifc wifi --unified UNIFIED_VERSION --put_file brg_app.bin
```

Move a version between beta and official status:

```console
wlt-btm --env aws --server prod --token API_TOKEN --ifc wifi --unified UNIFIED_VERSION --beta 0
wlt-btm --env aws --server prod --token API_TOKEN --ifc wifi --unified UNIFIED_VERSION --beta 1
```

Run `wlt-btm --help` for the complete list of operations and arguments.
