Configuration

The CANmod.temp uses a JSON file placed on the CONFIG volume for configuration (for more information on how to access the volumes via USB refer to the USB Section).

Note

The JSON format makes it easy to configure the device using custom tools, scripts, JSON editors or plain text editors. The configuration rules (min, max, …, etc.) are defined using a Rule Schema (JSON Schema). The Rule Schema serves as a guide for populating and validating the Configuration File.

A default Configuration File and the Rule Schema are automatically generated by the device and placed on the DEVICE volume.

The Default Configuration File and Rule Schema can be downloaded below:

Note

For most cases, it is convenient to use a graphical Configuration Editor for editing the configuration file. By doing so, the editor can verify if the configuration satisfies the limitations described by the Rule Schema. Visit www.csselectronics.com to access the latest Configuration Editor1.

Configuration loading sequence

The Configuration File loading sequence is illustrated below.

../_images/aafig-5d9a270395244f0f85d49c56c0e4077c9f482418.svg
  • Boot: The device mounts the CONFIG and DEVICE volumes

  • Validate: The device attempts to load the custom configuration stored in CONFIG/config-[MAJOR].[MINOR].json2.

    • Load default: No custom config found. The device loads the default configuration from the DEVICE volume

    • Load custom: A valid custom configuration is found. The device loads the custom configuration from the CONFIG volume

    • Stop: An invalid custom configuration is found3. The device stops and awaits an updated configuration4.


1

The configuration editor uses a User-Interface-Schema-File (uischema) to describe the visual layout of the configuration file. The uischema file is located on the device USB drive.

2

For more information on the volumes, refer to the USB Section.

3

The device validates the custom configuration file against the rules defined by the Rule Schema. If the configuration satisfies the rules, the configuration is loaded. If one or more rules are violated, the device rejects the custom configuration.

4

A rejected custom configuration is indicated by the device LEDs. For information, refer to the LED Section.