> For the complete documentation index, see [llms.txt](https://docs.mclimate.eu/mclimate-lorawan-devices/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-16a-dry-switch-16ads/mclimate-16ads-device-communication-protocol/communication-concepts.md).

# Communication concepts

## Communication concepts related to the device's operation

MClimate 16ADS periodically sends messages (keep-alive) to the LNS. This is a Class C device, according to the LoRaWAN 1.0.3 specification, meaning it sends regular uplinks and you can send a downlink at any time, as the device constantly listens for LoRaWAN messages.

The messages are restricted by the LoRaWAN duty cycle requirements. The 16ADS can send both confirmed/unconfirmed uplink messages depending on its configuration.

When a downlink is sent to the 16ADS, it can be either confirmed or unconfirmed. For critical messages (e.g. initial parameters setup), we recommend using confirmed downlinks, so that the LNS can take care of repetition if required and successful delivery can be verified.

{% hint style="success" %}
**Downlink fports:** 1, 2, 4-224
{% endhint %}

One downlink packet from the LNS may contain multiple commands for the 16ADS to optimize the communication efficiency. These downlinks can combine both multiple write and/or read commands. Response to the GET commands will be sent in the next uplink.

When the LNS wants to read data from the device, the corresponding command code or command codes are sent to the device and the response will be sent together with the next keep-alive message. If the combined length of the command responses and the keep-alive packet is longer than the allowed by the LoRaWAN MAC layer application payload size, the keep-alive packet will be omitted and only the command responses will be sent by the 16ADS.

{% hint style="info" %}
**When the LNS writes device configuration data with a command, the data is stored in the device non-volatile memory, so there is no need to send this command again on the next network join.**
{% endhint %}

The aforementioned communication method is also described in table below

<table data-header-hidden><thead><tr><th width="206">Payload byte index</th><th>Meaning</th></tr></thead><tbody><tr><td><strong>Payload byte index</strong></td><td><strong>Meaning</strong></td></tr><tr><td>0</td><td>Command 0 meaning</td></tr><tr><td>1</td><td>Command 0 data - optional</td></tr><tr><td>i</td><td>Command 1 meaning - optional</td></tr><tr><td>i+1</td><td>Command 1 data - optional</td></tr><tr><td>j</td><td>Command 2 meaning- optional</td></tr><tr><td>j+1</td><td>Command 2 data - optional</td></tr><tr><td>...</td><td>...</td></tr><tr><td>k</td><td>Command x meaning- optional</td></tr><tr><td>k+1</td><td>Command x data - optional</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-16a-dry-switch-16ads/mclimate-16ads-device-communication-protocol/communication-concepts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
