> For the complete documentation index, see [llms.txt](https://docs.dnt.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dnt.de/dnt-lw-wth/kommunikationsprotokoll/9.-datenrate-und-rejoin.md).

# 9. Datenrate und Rejoin

## 9.1 Datenrate

{% hint style="info" %}
Bei Firmwareversionen < 1.2.0 muss das IR-Bit bei den folgenden Befehlen gesetzt werden:

* SET DATA RATE: 0xF9
* GET DATA RATE: 0xF8
  {% endhint %}

{% tabs %}
{% tab title="SET DATA RATE" %}
Konfiguration der Datenrate.

**Beispiel**

```
0x79 04 = Datenrate 3 aktiv
```

**Downlink**

|     Byte     | Bit(s) |        Value        |
| :----------: | :----: | :-----------------: |
|       0      |    7   |         Res.        |
|       0      |   6:0  | `0x79` (Command ID) |
|       1      |   7:5  |         Res.        |
|       1      |   4:0  |    `ID_DATA_RATE`   |
| {% endtab %} |        |                     |

{% tab title="GET DATA RATE" %}
Abfrage der eingestellten Datenrate.

**Downlink**

| Byte | Bit(s) |        Value        |
| :--: | :----: | :-----------------: |
|   0  |    7   |         `IR`        |
|   0  |   6:0  | `0x78` (Command ID) |

**Uplink**

|      Byte     | Bit(s) |        Value        |
| :-----------: | :----: | :-----------------: |
|       0       |    7   |         Res.        |
|       0       |   6:0  | `0x78` (Command ID) |
|       1       |   7:5  |         Res.        |
|       1       |   4:0  |    `ID_DATA_RATE`   |
|  {% endtab %} |        |                     |
| {% endtabs %} |        |                     |

<details>

<summary>ID_DATA_RATE</summary>

|   Eigenschaft  |                                           Wert                                          |
| :------------: | :-------------------------------------------------------------------------------------: |
|  Beschreibung  |                            Einstellung der LoRaWAN® Datenrate                           |
|      Größe     |                                          4 Bit                                          |
|  Wertebereich  |                                           0–6                                           |
|  Standardwert  |                                            0                                            |
| Interpretation | <p><code>0 → Adaptive Datenrate aktiviert</code></p><p><code>1–6 → y = x - 1</code></p> |
|   Persistent   |                                            Ja                                           |
|     Zugriff    |                                           r/w                                           |

</details>

## 10.2 Rejoin

{% hint style="info" %}
Bei Firmwareversionen < 1.2.0 muss das IR-Bit bei den folgenden Befehlen gesetzt werden:

* GET TIME UNTIL NEXT REJOIN: 0xF7
* GET REJOIN BEHAVIOUR: 0xFA
* SET REJOIN BEHAVIOUR: 0xFB
  {% endhint %}

{% tabs %}
{% tab title="GET TIME UNTIL NEXT REJOIN" %}
Abfrage, wann der nächste Rejoin stattfindet.

Ist der Wert `0`, steht kein Rejoin aus.

**Downlink**

| Byte | Bit(s) |        Value        |
| :--: | :----: | :-----------------: |
|   0  |    7   |         `IR`        |
|   0  |   6:0  | `0x77` (Command ID) |

**Uplink**

<table><thead><tr><th width="162.9090576171875" align="center">Byte</th><th width="185.1817626953125" align="center">Bit(s)</th><th align="center">Value</th></tr></thead><tbody><tr><td align="center">0</td><td align="center">7</td><td align="center">Res.</td></tr><tr><td align="center">0</td><td align="center">6:0</td><td align="center"><code>0x77</code> (Command ID)</td></tr><tr><td align="center">1</td><td align="center">7:5</td><td align="center">Res.</td></tr><tr><td align="center">1</td><td align="center">4:0</td><td align="center"><code>ID_REMAINING_TIME_UNTIL_REJOIN [20:16]</code></td></tr><tr><td align="center">2</td><td align="center">7:0</td><td align="center"><code>ID_REMAINING_TIME_UNTIL_REJOIN [15:8]</code></td></tr><tr><td align="center">3</td><td align="center">7:0</td><td align="center"><code>ID_REMAINING_TIME_UNTIL_REJOIN [7:0]</code></td></tr></tbody></table>
{% endtab %}

{% tab title="GET REJOIN BEHAVIOR" %}
Abfrage der Rejoin-Konfiguration.

**Downlink**

| Byte | Bit(s) |        Value        |
| :--: | :----: | :-----------------: |
|   0  |    7   |         `IR`        |
|   0  |   6:0  | `0x7A` (Command ID) |

**Uplink**

|     Byte     | Bit(s) |            Value            |
| :----------: | :----: | :-------------------------: |
|       0      |    7   |             Res.            |
|       0      |   6:0  |     `0x7A` (Command ID)     |
|       1      |    7   |    `ID_SINGLE_REJOIN_EN`    |
|       1      |   6:0  | `ID_REJOIN_INTERVAL [15:8]` |
|       2      |   7:0  |  `ID_REJOIN_INTERVAL [7:0]` |
| {% endtab %} |        |                             |

{% tab title="SET REJOIN BEHAVIOR" %}
Konfiguration des Rejoin-Verhaltens.

**Beispiel**

```
0x7B 80 0C = einzelner Rejoin in 12 h
```

**Downlink**

|      Byte     | Bit(s) |            Value            |
| :-----------: | :----: | :-------------------------: |
|       0       |    7   |             Res.            |
|       0       |   6:0  |     `0x7B` (Command ID)     |
|       1       |    7   |    `ID_SINGLE_REJOIN_EN`    |
|       1       |   6:0  | `ID_REJOIN_INTERVAL [15:8]` |
|       2       |   7:0  |  `ID_REJOIN_INTERVAL [7:0]` |
|  {% endtab %} |        |                             |
| {% endtabs %} |        |                             |

<details>

<summary>ID_REMAINING_TIME_UNTIL_REJOIN</summary>

|   Eigenschaft  |               Wert              |
| :------------: | :-----------------------------: |
|  Beschreibung  | Minuten bis zum nächsten Rejoin |
|      Größe     |              21 Bit             |
|  Wertebereich  |            0–1966080            |
| Interpretation |       `y = x`, `[y] = min`      |
|   Persistent   |               Nein              |
|     Zugriff    |                r                |

</details>

<details>

<summary>ID_SINGLE_REJOIN_EN</summary>

|   Eigenschaft  |                                        Wert                                       |
| :------------: | :-------------------------------------------------------------------------------: |
|  Beschreibung  |                  Auswahl zwischen zyklischem und einzelnem Rejoin                 |
|      Größe     |                                       1 Bit                                       |
|  Wertebereich  |                                        0–1                                        |
|  Standardwert  |                                         0                                         |
| Interpretation | <p><code>0</code> → zyklischer Rejoin</p><p><code>1</code> → einzelner Rejoin</p> |
|   Persistent   |                                        Nein                                       |
|     Zugriff    |                                        r/w                                        |

</details>

<details>

<summary>ID_REJOIN_INTERVAL</summary>

|   Eigenschaft  |               Wert              |
| :------------: | :-----------------------------: |
|  Beschreibung  | Intervall des Rejoin-Verhaltens |
|      Größe     |              15 Bit             |
|  Wertebereich  |             0–32768             |
|  Standardwert  |                0                |
| Interpretation |        `y = x`, `[y] = h`       |
|   Persistent   |    Ja, bei zyklischem Rejoin    |
|     Zugriff    |               r/w               |

</details>


---

# 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.dnt.de/dnt-lw-wth/kommunikationsprotokoll/9.-datenrate-und-rejoin.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.
