Install License Key

How to install a license key.

This page is applicable for the latest image version mcx-rtos-v.2024.01. For other mcx-rtos-images checkout: Older versions.

Motorcortex Libraries require a license.lic ([hardwarekey].lic) file to run in a production environment. This section will explain how to acquire and install license.lic file. You can always run your Motorcortex application without a license key, but the program will exit after 30 minutes.

Acquire The License File.

For generating a license file the controller Hardware key is needed.

  1. Acquire the hardware key.

  2. Email this hardware key and list of components to

  3. You wil receive a 123456789.lic file trough E-mail, where the filename corresponds to the Hardware Key.

Installing the license file on the controller.

The license file can be stored in any location on the controller and can have any filename, as long as the “license” tag in the config.json file points to this file.

You can therefore add the license file into the configuration package so you can deploy it through the portal. The drawback is that for every controller hardware, you need to have a separate configuration package. The solution is to install the license in a differnt location than the configuration folder, so it does not get overwritten if you deploy the configuration and the license file stays with the machine.

Preferred method: install the license file in /etc/motorcortex

The license file can be stored in a location that is not affected by deploying a configuration. The license now stays with the controller regardless of the configuration that is deployed. A convenient location for the license is /etc/motorcortex/, this file directory is not overwritten when deploying a new configuration.

  1. Inside config.json change license path to: "License": "/etc/motorcortex/license.lic".

  2. copy the license to the controller via ssh scp 123456789.lic admin@ This will copy the license to the admin home folder: /home/admin/123456789.lic.

  3. Log into the controller and move the license file to /etc/motorcortex/ with following command:

sudo mv /home/admin/123456789.lic /etc/motorcortex/ 
  1. To make sure that the target name of the license file in the config.json file is a generic name, like “license.lic”, so you can deploy the configuration to any hardware without having to adjust the name of the license file every time, you can create a symbolic link with that generic name “license.lic”:
cd /etc/motorcortex
ln -s 123456789.lic license.lic
  1. Confirm if the symbolic link is created:
ls -lart

In the output you should see:

license.lic -> 123456789.lic

Now your license is bound to the controller hardware and will not be overwritten when deploying a configuration.

Installing the license in the configuration package

  1. Go to login to your account and open your project

  2. Browse to the configuration package.

  3. Place the 123456789.lic file in the configuration package (if you have to upload the file press files under the UPLOAD tab on the right).

image not found
  1. Open the config.json file.

  2. In line #10 change “licence.pem” to the name of your 123456789.lic file.

image not found
  1. Press save and exit the file.

  2. Now you can deploy the configuration to the controller and the license should be correctly installed.

Check If The License File Is Valid

A license file is valid if it matches the controllers Hardware Key and application: List of Components and List Of Features. The status of the license can be seen in the log of the motorcortex application:

mcx-lastlog | grep License

If your license check turns out invalid: check if your Hardware Key, List Of Components and List Of Features matches your application.

Older Versions