Lines Matching +full:resource +full:- +full:id

18 CoAP packet-size optimization and a simple, stateless flow that supports a
25 LwM2M uses a simple resource model with the core set of objects and resources
35 .. list-table::
36 :header-rows: 1
38 * - Object ID
39 - Name
40 - Instance
41 - Mandatory
43 * - 3
44 - Device
45 - Single
46 - Mandatory
48 *Resource definitions*
52 .. list-table::
53 :header-rows: 1
55 * - ID
56 - Name
57 - OP\*
58 - Instance
59 - Mandatory
60 - Type
62 * - 0
63 - Manufacturer
64 - R
65 - Single
66 - Optional
67 - String
69 * - 1
70 - Model
71 - R
72 - Single
73 - Optional
74 - String
76 * - 2
77 - Serial number
78 - R
79 - Single
80 - Optional
81 - String
83 * - 3
84 - Firmware version
85 - R
86 - Single
87 - Optional
88 - String
90 * - 4
91 - Reboot
92 - E
93 - Single
94 - Mandatory
95 -
97 * - 5
98 - Factory Reset
99 - E
100 - Single
101 - Optional
102 -
104 * - 6
105 - Available Power Sources
106 - R
107 - Multiple
108 - Optional
109 - Integer 0-7
111 * - 7
112 - Power Source Voltage (mV)
113 - R
114 - Multiple
115 - Optional
116 - Integer
118 * - 8
119 - Power Source Current (mA)
120 - R
121 - Multiple
122 - Optional
123 - Integer
125 * - 9
126 - Battery Level %
127 - R
128 - Single
129 - Optional
130 - Integer
132 * - 10
133 - Memory Free (Kb)
134 - R
135 - Single
136 - Optional
137 - Integer
139 * - 11
140 - Error Code
141 - R
142 - Multiple
143 - Optional
144 - Integer 0-8
146 * - 12
147 - Reset Error
148 - E
149 - Single
150 - Optional
151 -
153 * - 13
154 - Current Time
155 - RW
156 - Single
157 - Optional
158 - Time
160 * - 14
161 - UTC Offset
162 - RW
163 - Single
164 - Optional
165 - String
167 * - 15
168 - Timezone
169 - RW
170 - Single
171 - Optional
172 - String
174 * - 16
175 - Supported Binding
176 - R
177 - Single
178 - Mandatory
179 - String
181 * - 17
182 - Device Type
183 - R
184 - Single
185 - Optional
186 - String
188 * - 18
189 - Hardware Version
190 - R
191 - Single
192 - Optional
193 - String
195 * - 19
196 - Software Version
197 - R
198 - Single
199 - Optional
200 - String
202 * - 20
203 - Battery Status
204 - R
205 - Single
206 - Optional
207 - Integer 0-6
209 * - 21
210 - Memory Total (Kb)
211 - R
212 - Single
213 - Optional
214 - Integer
216 * - 22
217 - ExtDevInfo
218 - R
219 - Multiple
220 - Optional
221 - ObjLnk
223 The server could query the ``Manufacturer`` resource for ``Device`` object
227 The full list of registered objects and resource IDs can be found in the
232 about the provided sample see: :zephyr:code-sample:`lwm2m-client`. The sample can be
255 .. code-block:: c
260 Create callback functions for LwM2M resource executions:
262 .. code-block:: c
276 .. code-block:: c
337 Next we assign ``Security`` resource values to let the client know where and how
341 .. code-block:: c
358 * Manufacturer resource of Device object = 3/0/0
368 /* Reboot resource of Device object = 3/0/4 */
375 .. code-block:: c
378 lwm2m_rd_client_start(&client, "unique-endpoint-name", 0, rd_client_event);
386 When using DTLS with the LwM2M engine, PSK (Pre-Shared Key) and X.509 certificates are the security…
387 The engine uses LwM2M Security object (Id 0) to read the stored credentials and feed keys from the …
394 Security Mode (Resource ID 2) set to zero (Pre-Shared Key mode).
395 Identity (Resource ID 3) contains PSK ID in binary form.
396 Secret key (Resource ID 5) contains the PSK key in binary form.
400 When X509 certificates are used, set Security Mode (ID 2) to ``2`` (Certificate mode).
401 …Identity (ID 3) is used to store the client certificate and Secret key (ID 5) must have a private …
402 …Server Public Key resource (ID 4) must contain a server certificate or CA certificate used to sign…
407 When no security is used, set Security Mode (Resource ID 2) to ``3`` (NoSec).
409 In all modes, Server URI resource (ID 0) must contain the full URI for the target server.
412 …llowing options are recommended to reduce DTLS handshake traffic when connection is re-established:
420 When an external TLS stack, or non-default socket options are required, you can overwrite the :c:fu…
424 .. code-block:: c
438 /* Set the client pre-shared key (PSK) */
443 .. code-block:: c
445 static const char certificate[] = "-----BEGIN CERTIFICATE-----\nMIIB6jCCAY+gAw...";
446 static const char key[] = "-----BEGIN EC PRIVATE KEY-----\nMHcCAQ...";
447 static const char root_ca[] = "-----BEGIN CERTIFICATE-----\nMIIBaz...";
459 .. code-block:: c
462 client.tls_tag = 1; /* <---- */
463 lwm2m_rd_client_start(&client, "endpoint-name", 0, rd_client_event);
465 For a more detailed LwM2M client sample see: :zephyr:code-sample:`lwm2m-client`.
467 Multi-thread usage
469 Writing a value to a resource can be done using functions like lwm2m_set_u8. When writing
473 .. code-block:: c
481 This is especially useful if the server is composite-observing the resources being
490 When data cache is enabled for a resource, each write will create a timestamped entry in a cache,
492 resource.
496 Supported resource types:
498 * Signed and unsigned 8-64-bit integers
507 enable the cache by calling :c:func:`lwm2m_engine_enable_cache` for a given resource. Each resource
508 must be enabled separately and each resource needs their own storage.
510 .. code-block:: c
532 internally reads the content of a given resource. This has a side effect that any read callbacks
533 registered for a that resource are ignored when cache is enabled.
558 .. list-table:: LwM2M RD Client events
560 :header-rows: 1
562 * - Event ID
563 - Event Name
564 - Description
565 * - 0
566 - NONE
567 - No event
568 * - 1
569 - BOOTSTRAP_REG_FAILURE
570 - Bootstrap registration failed.
572 * - 2
573 - BOOTSTRAP_REG_COMPLETE
574 - Bootstrap registration complete.
576 * - 3
577 - BOOTSTRAP_TRANSFER_COMPLETE
578 - Bootstrap finish command received from the server.
579 * - 4
580 - REGISTRATION_FAILURE
581 - Registration to LwM2M server failed.
583 * - 5
584 - REGISTRATION_COMPLETE
585 - Registration to LwM2M server successful.
588 * - 6
589 - REG_TIMEOUT
590 - Registration status lost.
592 * - 7
593 - REG_UPDATE_COMPLETE
594 - Registration update completed.
596 * - 8
597 - DEREGISTER_FAILURE
598 - Deregistration to LwM2M server failed.
600 * - 9
601 - DISCONNECT
602 - LwM2M client have de-registered from server and is now stopped.
604 * - 10
605 - QUEUE_MODE_RX_OFF
606 - Used only in queue mode, not actively listening for incoming packets.
609 * - 11
610 - ENGINE_SUSPENDED
611 - Indicate that client has now paused as a result of calling :c:func:`lwm2m_engine_pause`.
614 * - 12
615 - SERVER_DISABLED
616 - Server have executed the disable command.
618 * - 13
619 - NETWORK_ERROR
620 - Sending messages to the network failed too many times.
628 .. list-table:: How application should react to events
630 :header-rows: 1
632 * - Event Name
633 - How application should react
634 * - NONE
635 - Ignore the event.
636 * - BOOTSTRAP_REG_FAILURE
637- Try to recover network connection. Then restart the client by calling :c:func:`lwm2m_rd_client_s…
639 * - BOOTSTRAP_REG_COMPLETE
640 - No actions needed
641 * - BOOTSTRAP_TRANSFER_COMPLETE
642 - No actions needed
643 * - REGISTRATION_FAILURE
644 - No actions needed.
645 …Client proceeds re-registration automatically. Might need a bootstrap or configuration fix. Cannot…
646 * - REGISTRATION_COMPLETE
647 - No actions needed.
649 * - REG_TIMEOUT
650 - No actions needed.
651 Client proceeds to re-registration automatically. Cannot send or receive data.
652 * - REG_UPDATE_COMPLETE
653 - No actions needed
655 * - DEREGISTER_FAILURE
656 - No actions needed, client proceeds to idle state automatically. Cannot send or receive data.
657 * - DISCONNECT
658 - Engine have stopped as a result of calling :c:func:`lwm2m_rd_client_stop`.
660 * - QUEUE_MODE_RX_OFF
661 - No actions needed.
664 * - ENGINE_SUSPENDED
665 - Engine can be resumed by calling :c:func:`lwm2m_engine_resume`.
667 * - SERVER_DISABLED
668 - No actions needed, client will re-register once the disable period is over.
670 * - NETWORK_ERROR
671- Try to recover network connection. Then restart the client by calling :c:func:`lwm2m_rd_client_s…
683 .. list-table:: Update period variables
685 :header-rows: 1
687 * - Variable
688 - Effect
689 * - LwM2M registration lifetime
690- The lifetime parameter in LwM2M specifies how long a device's registration with an LwM2M server …
692 * - :kconfig:option:`CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME`
693 - Default lifetime value, unless set by the bootstrap server.
695 * - :kconfig:option:`CONFIG_LWM2M_UPDATE_PERIOD`
696 - How long the client can stay idle before sending a next update.
697 * - :kconfig:option:`CONFIG_LWM2M_SECONDS_TO_UPDATE_EARLY`
698 - Minimum time margin to send the update message before the registration lifetime expires.
737 .. code-block:: console
740 lwm2m - LwM2M commands
746 Execute a resource
749 Read value from LwM2M resource
750 -x Read value as hex stream (default)
751 -s Read value as string
752 -b Read value as bool (1/0)
753 -uX Read value as uintX_t
754 -sX Read value as intX_t
755 -f Read value as float
756 -t Read value as time_t
759 Write into LwM2M resource
760 -s Write value as string (default)
761 -b Write value as bool
762 -uX Write value as uintX_t
763 -sX Write value as intX_t
764 -f Write value as float
765 -t Write value as time_t
768 Create object or resource instance
771 Delete object or resource instance
774 Enable data cache for resource
780 -b Set the bootstrap flag (default 0)
783 Stop the LwM2M RD (De-register) Client
784 -f Force close the connection
807 https://www.omaspecworks.org/what-is-oma-specworks/iot/lightweight-m2m-lwm2m/
813 https://www.omaspecworks.org/what-is-oma-specworks/iot/lightweight-m2m-lwm2m/
816 …penmobilealliance.org/release/LightweightM2M/V1_0_2-20180209-A/OMA-TS-LightweightM2M-V1_0_2-201802…
819 http://openmobilealliance.org/release/LightweightM2M/V1_1_1-20190617-A/