# Device Settings

Device settings are divided into three layers. This is enabling easier user configuration and still providing full control over the device.   &#x20;

![Device settings hiararchy](/files/-MD066J8wSbYNYJMn_L_)

## Device profile Settings

This is the highest level of device settings available to the user. Here the user can define the purpose of the tracker and all the settings for the device will be generated based on the device profile and several mail parameters. This can be done from a Web/Mobile application and then the configuration can be uploaded with a precompiled binary image when manufacturing, over the Bluetooth, when deploying, and over LoRa, remotely when the device is in the field. An example of the application user interface is in the picture below. The user can change High-Level settings of each profile by expanding the advanced configuration in the user application if it is something that does not suit its needs.

![UI of the configuration application](/files/-MDFKq0aW39m_mLI8jwN)

| Device profile           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Default tracker          | Profile with default tracking values.                                                                                                                                                                                                                                                                                                                                                                                                           |
| Lion tracker rechargable | <p>Profile for wild-life Lion tracking </p><p></p><ul><li><p>Basic settings</p><ul><li><p>Update interval precise (per hour)</p><ul><li>ublox fix interval</li><li>almanach update</li><li>...</li></ul></li><li>Update interval low-power (per hour)</li><li>Motion trigger (threshold or disabled)</li><li>Advanced only: true</li></ul></li><li><p>Advanced setting</p><ul><li>z thresholds</li><li>motion x z </li><li></li></ul></li></ul> |
| Cargo tracker            | Profile for ship container tracking                                                                                                                                                                                                                                                                                                                                                                                                             |
| Wisent tracker           | Profile for wiled-life Wisent tacking                                                                                                                                                                                                                                                                                                                                                                                                           |
| Custom profile           | One profile left for the user to customize it as preferred.                                                                                                                                                                                                                                                                                                                                                                                     |
| etc.                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

## L1: Device High-Level Settings

Shadow settings in the second level L2 are changed by the Device profile and device profile setting. Every Device profile has the same set of High-Level settings and has its own default values that are stored on the device in the separate default configuration. This config from the default configuration will be overwritten if the device shadow config has value. This layer has a maximum of 30 settings IDs.

| High-Level Settings    | ID    | Description                                                         | Min    | Max       | Default |
| ---------------------- | ----- | ------------------------------------------------------------------- | ------ | --------- | ------- |
| GPS scan period        | 0x002 | Scan period of GPS data for the tracker device.                     | 10 sec | 1 day     | 60 sec  |
| LoRaWAN send period    | 0x002 | Send period of position data and battery level over LoRaWAN network | 10 sec | 10 days   | 120 sec |
| BLE advertising period | 0x003 | Advertising period of BLE data                                      | 20 ms  | 10.24 sec | 2 sec   |
| etc                    |       |                                                                     |        |           |         |

## L2: Device Low-Level Settings

All the settings in the L2 are in relation to the physical device. Settings in the second level L2 are changed by the L1 level setting, when user change the device profile, or manually by the manufacturer of the devices.

| Low-Level Settings | ID    | Description                                 | Min  | Max    |
| ------------------ | ----- | ------------------------------------------- | ---- | ------ |
| BLE adv strength   | 0x020 | The signal strength of BLE advertising data | 8dBm | -20dBm |
| UART Baud          | 0x021 | UART baud rate speed                        | 9600 | 115200 |
| etc.               |       |                                             |      |        |

{% hint style="warning" %}
All the settings currently are just for demonstration, the real need to be determined
{% endhint %}

```javascript
{
  "version": {
    "major": 0,
    "minor": 1
  },
  "settings": {
    "setting_name_1": {
      "id": "0x001",
      "enabled": true,
      "default": 50,
      "min": 0,
      "max": 100,
      "length": 4,
      "conversion": "uint32"
    },
    "setting_name_2": {
      "id": "0x002",
      "enabled": false,
      "default": "asd-asd-asd-asd",
      "min": "0",
      "max": "1234567890123456",
      "length": 16,
      "conversion": "string"
    }
  }  
}
```

* when sending LoRa -> ID, LEN, VAL
* decoder TTN same as in the BLE app


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://irnas.gitbook.io/opencollar/-MDJCI9OmpOqWrQzjNIR/opencollar-dashboard/device-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
