Skip to content

License

Mira requires a license to run. The license validation itself does not interfere with the application, if the license is valid.

Attempting to run Mira without a valid license will cause the device to restart after a few seconds.

The Mira license API gives feedback if the license is currently being validated, and if it is valid or not.

MiraOS Example

PROCESS_THREAD(license_checker, ev, data) {
    PROCESS_BEGIN();

    /* Wait while the process is being checked */
    PROCESS_WAIT_WHILE(mira_license_is_validating());

    /* Check license validity, this works with MiraMesh too */
    if (mira_license_is_valid()) {
        /* License is valid */
    } else {
        /* License is not valid */
    }

    PROCESS_END();
}

Functions

mira_license_is_validating

mira_bool_t mira_license_is_validating(void);

Check if the license is currently under validation.

To wait until the license validation is done, use:

PROCESS_WAIT_WHILE(mira_license_is_validating());
mira_bool_t is_valid = mira_license_is_valid();

Without a valid license, the device restarts within a few seconds.

mira_license_is_valid

mira_bool_t mira_license_is_valid(void);

Return if the license is valid.

During validation, the return value is undefined.

To wait until the license validation is done, use:

PROCESS_WAIT_WHILE(mira_license_is_validating());
mira_bool_t is_valid = mira_license_is_valid();