Skip to content

Licensing

Activation and Deactivation

ERS requires all users to have a valid license in order to fully function, below are the steps to activate or deactivate a license. The license flow will trigger automatically when actions are performed in ERS that require a license.

Forcing activation programmatically

If you want to trigger the license activation of ERS pre-maturely as part of an installation flow you can do so programatically. Please open the section below.

Force trigger activation

You can trigger the activation flow explicitly from code using ERS_License_Activate(int activationMode). The integer corresponds to the same options shown in the interactive prompt:

  • 0 = Online (License Keys)
  • 1 = Free
  • 2 = Air gapped
#include "Ers/Api.h"

int main(int argc, char** argv)
{
    Ers::Initialize();

    // 0 = Online, 1 = Free, 2 = Air gapped
    Ers::ersAPIFunctionPointers.ERS_License_Activate(0);

    Ers::Uninitialize();
    return 0;
}
using Ers;

ERS.Initialize();

// 0 = Online, 1 = Free, 2 = Air gapped
ErsEngine.ERS_License_Activate(0);

ERS.Uninitialize();

Activating your license

You don't have a valid license, or it might be expired
if you had a local ERS license it will be deactivated
Welcome to the ERS Activation.
To activate ERS please select one of the following licensing options:
0) Online(License Keys)
1) Free
2) Air gapped
Please write down the digit and press enter:
>

You can now select which type of license you want to activate.

In case we gave you access and you received a username and password instead of a license key, see the "license management" section below.

License management

If you have been given access to our user portal, you will find all your licenses there.

Please login using the UserName and Password you have been given, please do not forget to reset the password, as we are able to see the initial password.

Overview

Now click on the menu item highlighted below.

Overview

Now use any of the license keys you see below

Enter 0 and press Enter to select the online license option:

You don't have a valid license, or it might be expired
if you had a local ERS license it will be deactivated
Welcome to the ERS Activation.
To activate ERS please select one of the following licensing options:
0) Online(License Keys)
1) Free
2) Air gapped
Please write down the digit and press enter:
> 0
Please enter the license Key

You can now enter your online license. Enter it and press Enter:

Please write down the digit and press enter:
> 0
Please enter the license Key
ABCD-1234-DEFG-5678

Enter 1 and press Enter to select the Free license option:

You don't have a valid license, or it might be expired
if you had a local ERS license it will be deactivated
Welcome to the ERS Activation.
To activate ERS please select one of the following licensing options:
0) Online(License Keys)
1) Free
2) Air gapped
Please write down the digit and press enter:
> 1
Please enter your email address

You can now enter your email address and press Enter:

In case we gave you access and you received a username and password instead of a license key, see the "license management" section below.

License management

If you have been given access to our user portal, you will find all your licenses there.

Please login using the UserName and Password you have been given, please do not forget to reset the password, as we are able to see the initial password.

Overview

Now click on the menu item highlighted below.

Overview

Now use any of the license keys you see below

Enter 2 and press Enter to select the Air-gap license option:

You don't have a valid license, or it might be expired
if you had a local ERS license it will be deactivated
Welcome to the ERS Activation.
To activate ERS please select one of the following licensing options:
0) Online(License Keys)
1) Free
2) Air gapped
Please write down the digit and press enter:
> 2
Please enter the air gapped license key
ABCD-1234-DEFG-5678

You can now enter your air gapped license key and press Enter:

Head to the air-gap portal.

Ensure that Activation Mode is selected Overview

Then click on "Initialize air-gap activation" and enter the air-gap license key again. Then click "Send" this generates an initialization code, please copy or manually enter that initialization code inside ERS and press Enter.

Your ERS terminal should look like this

Please head to the portal at https://airgap.licensing.incontrolsim.com/  and enter the license key
Please enter the initialization code
qO4938Hd1GVKzTK59WfPVoh9Zl9rCAPyg9CTNZA/F8A=

If the above goes well ERS will give you an activation code and your hardware id like shown below

Now enter the activation code in the portal:
wD2X7e3CQQnCbIyV1rNeXoCqnAkqG+jG5cGT8FgiiVD3fQM9XFCc4kLQww5mDx+ZzmMqmEcuXcQmlkPGwcSGyQ==
with the hardware id:
6545c7252e9acb18bbb4bcb8a43276fb011cefcc81a37470461a17cbd96f7f3e
After activating in the portal the server thinks the license is activated, if you have issues on the local machine, please reach out to us.
Please enter the confirmation code

On the air-gap portal please close the initialize air-gap activation pop up. Then open "Enter air-gap activation code".

And enter

  • The air-gap license key
  • The Hardware ID
  • The Activation code

Afterwards click on "Submit".

If everything is correct then you should see the following screen alt text

Important

From this point our licensing backend considers the license activated, but it is not activated on your machine yet. It is very important to not close this screen yet, otherwise the license needs to be reset in our backend.

Now enter the confirmation code into ERS and press Enter. Now enter the policy id shown in the portal into ERS and press Enter.

You should be able to run your ERS models now.

Deactivating your license

Deactivating a license is very simple. somewhere in your ERS code call this function and run your program.

ErsEngine.ERS_License_Deactivate();
Ers::ersAPIFunctionPointers.ERS_License_Deactivate();

Deactivating a license is very simple. somewhere in your ERS code call this function and run your program.

ErsEngine.ERS_License_Deactivate();
Ers::ersAPIFunctionPointers.ERS_License_Deactivate();

Head to: air-gap portal and toggle Activation to Deactivation. You should have a screen like below Deactivation Overview

Now inside your ERS model call the following function.

ErsEngine.ERS_License_Deactivate();
Ers::ersAPIFunctionPointers.ERS_License_Deactivate();

ERS should now prompt you with the following information

[I] Thread [64212] Ers/Core/Src/Ers/Core/HelperFunctions.cpp:190 Reading initial settings file
[D] Thread [64212] Ers/Core/Src/Ers/Core/HelperFunctions.cpp:203 Starting jobsystem with 8 workers
[T] Thread [64212] [Trace] is new LogLevel!
You are about to deactivate the license for your version of ERS
Please head to the portal at https://airgap.licensing.incontrolsim.com/ then select deactivation and enter the license key
Please enter the license key into the portal
License key: HFR9-4X4L-PJDA-3FER
Please enter the initialization code

Now head back to the portal and click "Initialize air-gap deactivation". Enter the license key provided by ERS and click "Send". The portal will now generate an initialization code. Please copy or manually type this into ERS, and press Enter.

Now head back to the portal again, close the "initialization air-gap deactivation" window and open "Enter air-gap deactivation code".

Now please copy the:

  • License key
  • Hardware ID
  • Deactivation code

All of these are displayed in the ERS window. After copying click "submit" The portal will now generate the confirmation code

Important

From this point our licensing backend considers the license deactivated, but it is not deactivated on your machine yet. it is very important to not close this screen yet.

Now copy the confirmation code into ERS and press Enter.

Upon rerunning ERS it will prompt for license activation.

Troubleshooting

License file issues

If at any point something goes wrong with licensing with ERS deactivation or a license is not working correctly. There is a way to hard reset the license.

Important

Only do this if you have been asked by our support team or you(or a colleague/professor) have been added as a license manager to your license.

In order to hard remove the ERS license from your machine do the following.

Execute this in command prompt

rmdir /S /Q "%LOCALAPPDATA%\ERS\ERS" 2>nul

Execute this in the terminal

rm -rf "$HOME/.ERS/ERS"

Now there are 2 paths

  1. Please send us an email (ERSSupport@incontrolsim.com) telling us you removed the license on your local machine. And send us the license key in question or email address associated with the license.
  2. Wait for a reply, we will reset your license.

Important

You can only reset the license yourself if you have been appointed a license manager for the associated order, otherwise contact us at ERSSupport@incontrolsim.com

Navigate to the InControl Licensing portal http://licensing.incontrolsim.com/

Upon logging in, navigate to Licenses

Navigate Licenses

Now find the license in you would like to reactivate and click on it.

Reset

Now click the red reset button.

Now you can restart ERS and follow Activation again.

Force update from the remote server

Allows user to force an online license check by creating a special file in the ERS license directory.

Locate the License Directory

The license directory location varies by platform:

  • Windows: %LOCALAPPDATA%\ERS\ERS\
  • Linux: ~/.ERS/ERS/
Create the special File

Create an empty file named FORCEERSCHECK (no extension) in the license directory.

echo. > "%LOCALAPPDATA%\ERS\ERS\FORCEERSCHECK"
touch ~/.ERS/ERS/FORCEERSCHECK
Launch ERS

When ERS starts up, it will:

  1. Detect the FORCEERSCHECK file
  2. Perform an online license check
  3. Delete the FORCEERSCHECK file
  4. Log the action in the ERS logs

Log Messages

When the feature is triggered, you'll see log messages like:

FORCEERSCHECK file detected, performing forced online license check
FORCEERSCHECK file removed after successful license check

Features & Limits

If you want to if check certain features are available to you or you want to know what limits have been set for your active license.

Info

A limit-value of -1 means no limit is set, otherwise the limit value is returned.

In C++ you can Fetch information from the active license on the Ers::License struct.

namespace Ers
{
    struct License
    {
        static bool HasFeature(const char* featureCode);
        static std::string EditionName();
        static int MaxJobSystemCores();
        static int MaxComponentTypes();
    };
} // namespace Ers
namespace Ers
{
    public static class License
    {
        public static bool HasFeature(string featureCode);
        public static string EditionName();
        public static int MaxJobSystemCores();
        public static int MaxComponentTypes();
    }
}

Currently there are no exposed features that can be checked on the license, only limits. But as we will expand ERS additional features may be tied to the license.

Was this page helpful?