Licensing

Mongoose OS is highly modular. It consists of the core and a large number of libraries. The core, and most of the libraries, are open source and released under the Apache 2.0 license as Mongoose OS Community Edition.

Some of the libraries are closed-source, and have certain restrictions. Those restrictions can be removed by purchasing a Mongoose OS Enterprise Edition license.

Mongoose OS Enterprise Edition Licensing process

  • Make sure that rpc-service-ota library is used by your app
  • Login to the Mongoose License Manager
  • Buy any number of licenses you need. IMPORTANT: choose "mongoose-os" license type
  • If your device is connected to your workstation over USB, run:
    mos license
    
  • Or, if your device is accessible remotely, run:
    mos --port DEVICE_ADDRESS license
    

Licenses are bound to devices, and they are permanent.

The mos license command creates a unique license string specific for a device, and updates device.license configuration parameter, which "unlocks" the device and removes restrictions. The License Manager decreases the number of available licenses and saves a unique license string. The next time mos license is run for the same device, an old license string is returned by the License Manager but the number of available licenses is not decreased. Thus a device, once licensed, is licensed permanently.

API

  • You'll need your secret key from the portal
  • At a high level, send a POST request to https://license.mongoose-os.com/api/v1/license with your secret key and a JSON formatted object containing the device information
  • You can obtain the device information from a Sys.GetUID RPC call to the device
  • 'pid' maps to 'type', 'uid' maps to 'device_id', 'app' stays the same
  • Sample CURL call:
curl --location --request POST 'https://license.mongoose-os.com/api/v1/license' \
--header 'Authorization: Bearer xxxxxxe2977b746c753e40b4599555' \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "mos",
  "device_id": "0fxxxxxxxxa6a555",
  "app": "myappsname"
}'

Libraries with restrictions

Below is the list of closed-source libraries and their restrictions.

Library Restriction
ota-common OTA only from mDash
ota-http-client OTA only from mDash
ota-http-server No restrictions
ota-shadow OTA only from mDash
cron 3 cron tasks max
crontab 3 crontab entries max
edit this doc