Skip to content

Commit 7926395

Browse files
authored
lwm2m_coap_update_dock (#2408)
1 parent bacd73a commit 7926395

31 files changed

+210
-41
lines changed

_data/pages_info.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4332,6 +4332,12 @@
43324332
"/docs/trendz/install/kubernetes/":
43334333
url: "/docs/trendz/install/kubernetes/"
43344334
redirect_from: []
4335+
"/docs/trendz/install/python-executor-configuration-linux/":
4336+
url: "/docs/trendz/install/python-executor-configuration-linux/"
4337+
redirect_from: []
4338+
"/docs/trendz/install/python-executor-configuration-windows/":
4339+
url: "/docs/trendz/install/python-executor-configuration-windows/"
4340+
redirect_from: []
43354341
"/docs/trendz/install/rhel/":
43364342
url: "/docs/trendz/install/rhel/"
43374343
redirect_from: []

_includes/docs/edge/user-guide/install/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,7 +3485,7 @@
34853485
<td>LWM2M_DTLS_CONNECTION_ID_LENGTH</td>
34863486
<td></td>
34873487
<td> CoAP DTLS connection ID length for LWM2M. RFC 9146, Connection Identifier for DTLS 1.2
3488-
Default: off
3488+
Default: 8
34893489
Control usage of DTLS connection ID length (CID).
34903490
- 'off' to deactivate it.
34913491
- 'on' to activate Connection ID support (same as CID 0 or more 0).
@@ -3599,7 +3599,7 @@
35993599
<tr>
36003600
<td>transport.lwm2m.bootstrap.id</td>
36013601
<td>LWM2M_SERVER_ID_BS</td>
3602-
<td>111</td>
3602+
<td>null</td>
36033603
<td> Default value in LwM2M client after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)</td>
36043604
</tr>
36053605
<tr>
@@ -3932,7 +3932,7 @@
39323932
<td>COAP_DTLS_CONNECTION_ID_LENGTH</td>
39333933
<td></td>
39343934
<td> CoAP DTLS connection ID length. RFC 9146, Connection Identifier for DTLS 1.2
3935-
Default: off
3935+
Default: 8
39363936
Control usage of DTLS connection ID length (CID).
39373937
- 'off' to deactivate it.
39383938
- 'on' to activate Connection ID support (same as CID 0 or more 0).

_includes/docs/pe/edge/user-guide/install/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3881,7 +3881,7 @@
38813881
<td>LWM2M_DTLS_CONNECTION_ID_LENGTH</td>
38823882
<td></td>
38833883
<td> CoAP DTLS connection ID length for LWM2M. RFC 9146, Connection Identifier for DTLS 1.2
3884-
Default: off
3884+
Default: 8
38853885
Control usage of DTLS connection ID length (CID).
38863886
- 'off' to deactivate it.
38873887
- 'on' to activate Connection ID support (same as CID 0 or more 0).
@@ -3995,7 +3995,7 @@
39953995
<tr>
39963996
<td>transport.lwm2m.bootstrap.id</td>
39973997
<td>LWM2M_SERVER_ID_BS</td>
3998-
<td>111</td>
3998+
<td>null</td>
39993999
<td> Default value in LwM2M client after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)</td>
40004000
</tr>
40014001
<tr>
@@ -4328,7 +4328,7 @@
43284328
<td>COAP_DTLS_CONNECTION_ID_LENGTH</td>
43294329
<td></td>
43304330
<td> CoAP DTLS connection ID length. RFC 9146, Connection Identifier for DTLS 1.2
4331-
Default: off
4331+
Default: 8
43324332
Control usage of DTLS connection ID length (CID).
43334333
- 'off' to deactivate it.
43344334
- 'on' to activate Connection ID support (same as CID 0 or more 0).

_includes/docs/pe/user-guide/install/coap-transport-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
<td>COAP_DTLS_CONNECTION_ID_LENGTH</td>
480480
<td></td>
481481
<td> CoAP DTLS connection ID length. RFC 9146, Connection Identifier for DTLS 1.2
482-
Default: off
482+
Default: 8
483483
Control usage of DTLS connection ID length (CID).
484484
- 'off' to deactivate it.
485485
- 'on' to activate Connection ID support (same as CID 0 or more 0).

_includes/docs/pe/user-guide/install/core-rule-engine-config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3803,7 +3803,7 @@
38033803
<td>LWM2M_DTLS_CONNECTION_ID_LENGTH</td>
38043804
<td></td>
38053805
<td> CoAP DTLS connection ID length for LWM2M. RFC 9146, Connection Identifier for DTLS 1.2
3806-
Default: off
3806+
Default: 8
38073807
Control usage of DTLS connection ID length (CID).
38083808
- 'off' to deactivate it.
38093809
- 'on' to activate Connection ID support (same as CID 0 or more 0).
@@ -3917,7 +3917,7 @@
39173917
<tr>
39183918
<td>transport.lwm2m.bootstrap.id</td>
39193919
<td>LWM2M_SERVER_ID_BS</td>
3920-
<td>111</td>
3920+
<td>null</td>
39213921
<td> Default value in LwM2M client after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)</td>
39223922
</tr>
39233923
<tr>
@@ -4250,7 +4250,7 @@
42504250
<td>COAP_DTLS_CONNECTION_ID_LENGTH</td>
42514251
<td></td>
42524252
<td> CoAP DTLS connection ID length. RFC 9146, Connection Identifier for DTLS 1.2
4253-
Default: off
4253+
Default: 8
42544254
Control usage of DTLS connection ID length (CID).
42554255
- 'off' to deactivate it.
42564256
- 'on' to activate Connection ID support (same as CID 0 or more 0).

_includes/docs/pe/user-guide/install/lwm2m-transport-config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425
<td>LWM2M_DTLS_CONNECTION_ID_LENGTH</td>
426426
<td></td>
427427
<td> CoAP DTLS connection ID length for LWM2M. RFC 9146, Connection Identifier for DTLS 1.2
428-
Default: off
428+
Default: 8
429429
Control usage of DTLS connection ID length (CID).
430430
- 'off' to deactivate it.
431431
- 'on' to activate Connection ID support (same as CID 0 or more 0).
@@ -539,7 +539,7 @@
539539
<tr>
540540
<td>transport.lwm2m.bootstrap.id</td>
541541
<td>LWM2M_SERVER_ID_BS</td>
542-
<td>111</td>
542+
<td>null</td>
543543
<td> Default value in Lwm2mClient after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)</td>
544544
</tr>
545545
<tr>

_includes/docs/reference/lwm2m-api.md

Lines changed: 145 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,118 @@ The registry enables efficient serialization/deserialization of telemetry data.
1818

1919
**LwM2M object structure**
2020

21-
When an LwM2M device registers with the server, it provides a list of supported LwM2M Objects. Each object has:
22-
- An **object** ID
23-
- A **version**
24-
- One or multiple **instances**
21+
### DTLS Connection ID (CID) — used only when security mode is enabled
22+
23+
- The default server-side CID length is now 8 bytes
24+
25+
(parameter COAP_DTLS_CONNECTION_ID_LENGTH in tb-lwm2m-transport.yml).
26+
27+
- Setting the server CID length to 8 bytes automatically enables the MultiNodeConnectionIdGenerator, which assigns a unique CID to each client session.
28+
This improves DTLS connection resilience and allows stable operation in multi-node deployments.
29+
30+
- With LWM2M_DTLS_CONNECTION_ID_LENGTH = 8, the following behavior is enabled:
31+
32+
- MultiNode Connection ID generator with NodeID = 0x00 (applicable for a single-server deployment).
33+
34+
- Ensures DTLS session continuity across reconnects, especially in NATed or unstable network environments.
35+
36+
- Table: CID length alignment between LWM2M client and server
37+
38+
<table>
39+
<thead>
40+
<tr>
41+
<td style="width: 5%"><b>№</b></td>
42+
<td style="width: 15%"><b>CID Client</b></td>
43+
<td style="width: 15%"><b>CID Server</b></td>
44+
<td style="width: 30%"><b>Connection Mode</b></td>
45+
<td style="width: 10%"><b>NodeID</b></td>
46+
<td style="width: 25%"><b>Description</b></td>
47+
</tr>
48+
</thead>
49+
<tbody>
50+
<tr>
51+
<td>1</td>
52+
<td>null</td>
53+
<td>null</td>
54+
<td><b>DTLS 1.2 (no CID)</b></td>
55+
<td>–</td>
56+
<td>Both sides do not support CID</td>
57+
</tr>
58+
<tr>
59+
<td>2</td>
60+
<td>1</td>
61+
<td>null</td>
62+
<td><b>DTLS 1.2 (no CID)</b></td>
63+
<td>–</td>
64+
<td>Server does not support CID → CID not used</td>
65+
</tr>
66+
<tr>
67+
<td>3</td>
68+
<td>null</td>
69+
<td>4</td>
70+
<td><b>DTLS 1.2 (no CID)</b></td>
71+
<td>–</td>
72+
<td>Client does not initiate CID → handshake without Connection ID</td>
73+
</tr>
74+
<tr>
75+
<td>4</td>
76+
<td>0</td>
77+
<td>0</td>
78+
<td><b>DTLS 1.2 (no CID)</b></td>
79+
<td>–</td>
80+
<td>CID allowed but not generated by either side</td>
81+
</tr>
82+
<tr>
83+
<td>5</td>
84+
<td>1</td>
85+
<td>1</td>
86+
<td><b>DTLS 1.2 + CID active</b></td>
87+
<td>–</td>
88+
<td>Short CID (SingleNode mode)</td>
89+
</tr>
90+
<tr>
91+
<td>6</td>
92+
<td>3</td>
93+
<td>3</td>
94+
<td><b>DTLS 1.2 + CID active</b></td>
95+
<td>–</td>
96+
<td>CID = 3 bytes, single-node mode</td>
97+
</tr>
98+
<tr>
99+
<td>7</td>
100+
<td>1</td>
101+
<td>5</td>
102+
<td><b>DTLS 1.2 + CID active (MultiNode)</b></td>
103+
<td>0x00</td>
104+
<td>Server CID > 4 bytes → server generates NodeID</td>
105+
</tr>
106+
<tr>
107+
<td>8</td>
108+
<td>2</td>
109+
<td>8</td>
110+
<td><b>DTLS 1.2 + CID active (MultiNode)</b></td>
111+
<td>0x00</td>
112+
<td>Server CID = 8 bytes → server generates NodeID</td>
113+
</tr>
114+
<tr>
115+
<td>9</td>
116+
<td>16</td>
117+
<td>2</td>
118+
<td><b>DTLS 1.2 + CID active</b></td>
119+
<td>–</td>
120+
<td>Server without NodeID, client uses long CID</td>
121+
</tr>
122+
<tr>
123+
<td>10</td>
124+
<td>null</td>
125+
<td>8</td>
126+
<td><b>DTLS 1.2 (no CID)</b></td>
127+
<td>0x00</td>
128+
<td>Server in MultiNode mode, but client does not support CID</td>
129+
</tr>
130+
</tbody>
131+
</table>
132+
25133

26134
### Handling of Object Versions in the LwM2M Model Structure
27135

@@ -166,18 +274,37 @@ Now let&#39;s configure how ThingsBoard should process LwM2M object data:
166274
All settings in the device profile are used to initialize the LwM2M client during the **Registration** operation.<br>
167275
Any changes in the device profile settings are applied immediately if the LwM2M client session is active, or during the next **Update Registration**.
168276
169-
> ⚠️ **Important:** All profile configuration changes are applied **only** if the object version in the profile matches the version used by the LwM2M client, according to the rules described in the [Handling of Object Versions in the LwM2M Model Structure](#handling-of-object-versions-in-the-lwm2m-model-structure).
277+
> ⚠️ **Important:** All profile configuration changes are applied **only** if the object version in the profile matches the version used by the LwM2M client, according to the rules described in the [Handling of Object Versions in the LwM2M Model Structure](#handling-of-object-versions-in-the-lwm2m-model-structure).<br>
278+
If you are not sure which object versions are used by the LwM2M client, or if this information is not available in advance, then after the LwM2M client connects to the server, complete information about supported objects and their versions is displayed in the client's telemetry logs.
279+
280+
Example of a registration log after an LwM2M client connects to the server:
170281
282+
```ruby
283+
info: Endpoint [MyClientNoSec] Client registered with registration id: [fR5In7YZNM] LwM2mVersion: [1.1], SupportedObjectIdVer [{1=1.1, 3442=1.0, 3=1.2, 19=1.0, 5=1.1, 6=1.0, 3303=1.1, 9=1.0}] QueueMode [false], BindingMode [U, T]
284+
```
285+
{: .copy-code}
171286
172287
To do this, follow these steps:
173-
- For each selected object:
288+
289+
**1. For each selected object:**
174290
- Check the "**Attributes**" box for any data you want to retrieve when the device connects and store it as ThingsBoard **attributes**.
175291
- Check the "**Telemetry**" and/or "**Observe**" boxes if you want the Server to monitor those values, fetch updates, and store them as ThingsBoard **telemetry**.
176-
- By default, the **observe strategy** - **Single**. You can choose **observe strategy** - **Composite all** or **Composite by object** to reduce traffic or group resources differently.
177-
- By default, the **observe strategy** is set to **Single**. You can switch to **Composite all** or **Composite by object** to reduce traffic or to group resources more efficiently.
178-
- Click "Save" to apply the changes.
179292
180-
{% include images-gallery.html imageCollection="configure-mapping" %}
293+
{% include images-gallery.html imageCollection="configure-mapping-1" %}
294+
295+
**2. Initialize attributes and telemetry using Observe strategy**
296+
297+
By default, the **Initialize attributes and telemetry using Observe strategy** option is **disabled**, which means attributes and telemetry are initialized by reading their values **one by one**; when **enabled**, they are initialized by subscribing to their values **using the selected Observe strategy**.
298+
299+
{% include images-gallery.html imageCollection="configure-mapping-2" %}
300+
301+
**3. Observe strategy**
302+
303+
By default, the **Observe strategy** is set to **Single**, but you can switch to **Composite all** or **Composite by object** to reduce traffic or group resources more efficiently.
304+
305+
Click "**Save**" to apply the changes.
306+
307+
{% include images-gallery.html imageCollection="configure-mapping-3" %}
181308
182309
> ⚠️ **Note**: If you uncheck all items (Attributes, Telemetry, Observe) for an object, it **will not appear** in the device profile configuration.
183310
@@ -1017,6 +1144,14 @@ Execute {"id":"5/0/2"}
10171144
```
10181145
{: .copy-code}
10191146
1147+
- **Alternative command** inputs available via the device credentials interface:
1148+
1149+
*"client registration update"* (in the debug terminal: Execute {"id":"1/0/8"}):
1150+
Device → Details → Manage credentials → Device credential → Client security config → Button: **Registration Update Trigger**
1151+
1152+
*"bootstrap-reboot"* (in the debug terminal: Execute {"id":"1/0/9"}):
1153+
Device → Details → Manage credentials → Device credential → Bootstrap client → Button: **Bootstrap-Request Trigger**
1154+
10201155
### Delete Operation
10211156
10221157
The "Delete" operation is used for LwM2M Server to delete an Object Instance within the LwM2M Client.

_includes/docs/user-guide/install/coap-transport-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@
479479
<td>COAP_DTLS_CONNECTION_ID_LENGTH</td>
480480
<td></td>
481481
<td> CoAP DTLS connection ID length. RFC 9146, Connection Identifier for DTLS 1.2
482-
Default: off
482+
Default: 8
483483
Control usage of DTLS connection ID length (CID).
484484
- 'off' to deactivate it.
485485
- 'on' to activate Connection ID support (same as CID 0 or more 0).

_includes/docs/user-guide/install/core-rule-engine-config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3341,7 +3341,7 @@
33413341
<td>LWM2M_DTLS_CONNECTION_ID_LENGTH</td>
33423342
<td></td>
33433343
<td> CoAP DTLS connection ID length for LWM2M. RFC 9146, Connection Identifier for DTLS 1.2
3344-
Default: off
3344+
Default: 8
33453345
Control usage of DTLS connection ID length (CID).
33463346
- 'off' to deactivate it.
33473347
- 'on' to activate Connection ID support (same as CID 0 or more 0).
@@ -3455,7 +3455,7 @@
34553455
<tr>
34563456
<td>transport.lwm2m.bootstrap.id</td>
34573457
<td>LWM2M_SERVER_ID_BS</td>
3458-
<td>111</td>
3458+
<td>null</td>
34593459
<td> Default value in LwM2M client after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)</td>
34603460
</tr>
34613461
<tr>
@@ -3788,7 +3788,7 @@
37883788
<td>COAP_DTLS_CONNECTION_ID_LENGTH</td>
37893789
<td></td>
37903790
<td> CoAP DTLS connection ID length. RFC 9146, Connection Identifier for DTLS 1.2
3791-
Default: off
3791+
Default: 8
37923792
Control usage of DTLS connection ID length (CID).
37933793
- 'off' to deactivate it.
37943794
- 'on' to activate Connection ID support (same as CID 0 or more 0).

_includes/docs/user-guide/install/lwm2m-transport-config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425
<td>LWM2M_DTLS_CONNECTION_ID_LENGTH</td>
426426
<td></td>
427427
<td> CoAP DTLS connection ID length for LWM2M. RFC 9146, Connection Identifier for DTLS 1.2
428-
Default: off
428+
Default: 8
429429
Control usage of DTLS connection ID length (CID).
430430
- 'off' to deactivate it.
431431
- 'on' to activate Connection ID support (same as CID 0 or more 0).
@@ -539,7 +539,7 @@
539539
<tr>
540540
<td>transport.lwm2m.bootstrap.id</td>
541541
<td>LWM2M_SERVER_ID_BS</td>
542-
<td>111</td>
542+
<td>null</td>
543543
<td> Default value in Lwm2mClient after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)</td>
544544
</tr>
545545
<tr>

0 commit comments

Comments
 (0)