1# Copyright (c) 2017 Linaro Limited 2# SPDX-License-Identifier: Apache-2.0 3 4menuconfig LWM2M 5 bool "OMA LWM2M protocol stack" 6 select COAP 7 select HTTP_PARSER_URL 8 select NET_SOCKETS 9 select NET_SOCKETS_POSIX_NAMES 10 help 11 This option adds logic for managing OMA LWM2M data 12 13if LWM2M 14 15module = LWM2M 16module-dep = LOG 17module-str = Log level for LWM2M library 18source "subsys/net/Kconfig.template.log_config.net" 19 20config LWM2M_DTLS_SUPPORT 21 bool "Enable DTLS support in the LwM2M client" 22 select TLS_CREDENTIALS 23 select NET_SOCKETS_SOCKOPT_TLS 24 select NET_SOCKETS_ENABLE_DTLS 25 26config LWM2M_DNS_SUPPORT 27 bool "Enable DNS support in the LWM2M client" 28 default y if DNS_RESOLVER 29 30config LWM2M_ENGINE_STACK_SIZE 31 int "LWM2M engine stack size" 32 default 2560 if NET_LOG 33 default 2048 34 help 35 Set the stack size for the LWM2M library engine (used for handling 36 OBSERVE and NOTIFY events) 37 38config LWM2M_ENGINE_MAX_MESSAGES 39 int "LWM2M engine max. message object" 40 default 10 41 help 42 Set the maximum message objects for the LWM2M library client 43 44config LWM2M_COAP_BLOCK_SIZE 45 int "LWM2M CoAP block-wise transfer size" 46 default 256 47 range 64 1024 48 help 49 CoAP block size used by LWM2M when performing block-wise 50 transfers. Possible values: 16, 32, 64, 128, 256, 512 and 1024. 51 52config LWM2M_ENGINE_MESSAGE_HEADER_SIZE 53 int "Room for CoAP header data" 54 default 48 55 range 24 128 56 help 57 Extra room allocated to handle CoAP header data 58 59config LWM2M_ENGINE_VALIDATION_BUFFER_SIZE 60 int "Size of the validation buffer for the incoming data" 61 default 64 62 help 63 LwM2M will use the validation buffer during the write operation, to 64 decode the resource value before validating it (applies for resources 65 for which validation callback has been registered). Set this value to 66 the maximum expected size of the resources that need to be validated 67 (and thus have validation callback registered). 68 Setting the validation buffer size to 0 disables validation support. 69 70config LWM2M_ENGINE_MAX_PENDING 71 int "LWM2M engine max. pending objects" 72 default 5 73 help 74 Set the maximum pending objects for the LWM2M library client 75 76config LWM2M_ENGINE_MAX_REPLIES 77 int "LWM2M engine max. reply objects" 78 default 5 79 help 80 Set the maximum reply objects for the LWM2M library client 81 82config LWM2M_ENGINE_MAX_OBSERVER 83 int "Maximum # of observable LWM2M resources" 84 default 10 85 range 5 200 86 help 87 This value sets the maximum number of resources which can be 88 added to the observe notification list. 89 90config LWM2M_CANCEL_OBSERVE_BY_PATH 91 bool "Use path matching as fallback for cancel-observe" 92 help 93 Some ambiguous language in the LwM2M spec causes some LwM2M server 94 implementations to implement cancel-observe by specifying the resource 95 path rather than the token of the original observe request. Without 96 this option, cancel-observe may not work properly when connecting to 97 those servers. 98 99config LWM2M_ENGINE_DEFAULT_LIFETIME 100 int "LWM2M engine default server connection lifetime" 101 default 30 102 range 15 65535 103 help 104 Set the default lifetime (in seconds) for the LWM2M library engine 105 106config LWM2M_SECONDS_TO_UPDATE_EARLY 107 int "LWM2M Registration Update transmission time before timeout" 108 default 6 109 range 1 65535 110 help 111 Time in seconds before the registration timeout, when the LWM2M 112 Registration Update is sent by the engine. In networks with large 113 round trip times (like NB-IoT), it might be needed to set this value 114 higher, in order to allow the response to arrive before timeout. 115 116config LWM2M_QUEUE_MODE_ENABLED 117 bool "Enable Queue Mode UDP binding" 118 help 119 Set the transport binding to UDP with Queue Mode (UQ). 120 121config LWM2M_QUEUE_MODE_UPTIME 122 int "Specify time the LWM2M client should stay online in queue mode." 123 default 93 124 help 125 This config specifies time (in seconds) the device should stay online 126 after sending a message to the server. Note, that LWM2M specification 127 recommends this to be CoAP MAX_TRANSMIT_WAIT parameter (which 128 defaults to 93 seconds, see RFC 7252), it does not forbid other 129 values though. 130 131config LWM2M_RD_CLIENT_SUPPORT 132 bool "support for LWM2M client bootstrap/registration state machine" 133 default y 134 help 135 Client will use registration state machine to locate and connect to 136 LWM2M servers (including bootstrap server support) 137 138config LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP 139 bool "Enable bootstrap support" 140 help 141 Enabling this setting allows the RD client to support bootstrap mode. 142 143config LWM2M_RD_CLIENT_ENDPOINT_NAME_MAX_LENGTH 144 int "Maximum length of client endpoint name" 145 depends on LWM2M_RD_CLIENT_SUPPORT 146 default 33 147 help 148 Default: room for 32 hexadeciaml digits (UUID) + NULL 149 150config LWM2M_RD_CLIENT_MAX_RETRIES 151 int "Specify maximum number of registration retries" 152 default 5 153 help 154 Specify maximum number of registration retries, before the application 155 is notified about the network failure. Once application is notified, 156 it's up to the application to handle this situation in a way 157 appropriate for the specific use-case (for instance by waiting for 158 LTE link to be re-established). 159 160config LWM2M_PEER_PORT 161 int "LWM2M server port" 162 depends on LWM2M_RD_CLIENT_SUPPORT 163 default 5683 164 help 165 This is the default server port to connect to for LWM2M communication 166 167config LWM2M_SECURITY_INSTANCE_COUNT 168 int "Maximum # of LWM2M Security object instances" 169 default 2 if LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP 170 default 1 171 range 1 10 172 help 173 This setting establishes the total count of LWM2M Security instances 174 available to the client. 175 176config LWM2M_SECURITY_KEY_SIZE 177 int "Buffer size of the security key resources" 178 default 16 179 range 16 256 180 help 181 This setting establishes the size of the key (pre-shared / public) 182 resources in the security object instances. 183 184config LWM2M_SERVER_DEFAULT_PMIN 185 int "Default server record PMIN" 186 default 0 187 help 188 Default minimum amount of time in seconds the client must wait 189 between notifications. If a resource has to be notified during this 190 minimum time period, the notification must be sent after the time 191 period expires. 192 193config LWM2M_SERVER_DEFAULT_PMAX 194 int "Default server record PMAX" 195 default 0 196 help 197 Default maximum amount of time in seconds the client may wait 198 between notifications. When this time period expires a notification 199 must be sent. 200 201config LWM2M_SERVER_INSTANCE_COUNT 202 int "Maximum # of LWM2M Server object instances" 203 default 2 if LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP 204 default 1 205 range 1 10 206 help 207 This setting establishes the total count of LWM2M Server instances 208 available to the client (including: bootstrap and regular servers). 209 210config LWM2M_CONN_MON_OBJ_SUPPORT 211 bool "Connectivity Monitoring object support" 212 help 213 Include support for LWM2M Connectivity Monitoring Object (ID 4) 214 215config LWM2M_CONN_MON_BEARER_MAX 216 int "Maximum # of available network bearer resource instances" 217 depends on LWM2M_CONN_MON_OBJ_SUPPORT 218 default 1 219 help 220 This value sets the maximum number of available network bearer 221 resource instances. These are displayed via the 222 "Connection Monitoring" object /4/0/1. 223 224config LWM2M_CONN_MON_APN_MAX 225 int "Maximum # of APN resource instances" 226 depends on LWM2M_CONN_MON_OBJ_SUPPORT 227 default 1 228 help 229 This value sets the maximum number of APN resource instances. 230 These are displayed via the "Connection Monitoring" object /4/0/7. 231 232config LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT 233 bool "Firmware Update object support" 234 default y 235 help 236 Include support for LWM2M Firmware Update Object (ID 5) 237 238config LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT 239 bool "Firmware Update object pull support" 240 default y 241 depends on LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT 242 depends on (HTTP_PARSER || HTTP_PARSER_URL) 243 help 244 Include support for pulling a file from a remote server via 245 block transfer and "FIRMWARE PACKAGE URI" resource. This option 246 adds another UDP context and packet handling. 247 248config LWM2M_NUM_BLOCK1_CONTEXT 249 int "Maximum # of LWM2M block1 contexts" 250 default 3 251 help 252 This value sets up the maximum number of block1 contexts for 253 CoAP block-wise transfer we can handle at the same time. 254 255config LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT 256 bool "Firmware Update object pull via CoAP-CoAP/HTTP proxy support" 257 depends on LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT 258 help 259 Include support for pulling firmware file via a CoAP-CoAP/HTTP proxy. 260 261config LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_ADDR 262 string "CoAP proxy network address" 263 depends on LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT 264 help 265 Network address of the CoAP proxy server. 266 267config LWM2M_RW_JSON_SUPPORT 268 bool "support for JSON writer" 269 default y 270 help 271 Include support for writing JSON data 272 273config LWM2M_DEVICE_PWRSRC_MAX 274 int "Maximum # of device power source records" 275 default 5 276 range 1 20 277 help 278 This value sets the maximum number of power source data that a device 279 can store. These are displayed via the "Device" object /3/0/6, 280 /3/0/7 and /3/0/8 resources. 281 282config LWM2M_DEVICE_ERROR_CODE_MAX 283 int "Maximum # of device obj error codes to store" 284 default 10 285 range 1 20 286 help 287 This value sets the maximum number of error codes that the device 288 object will store before ignoring new values. 289 290config LWM2M_DEVICE_EXT_DEV_INFO_MAX 291 int "Maximum # of device obj external device info to store" 292 default 5 293 range 1 20 294 help 295 This value sets the maximum number of external device info that the 296 device object will store before ignoring new values. 297 298config LWM2M_NUM_ATTR 299 int "Maximum # of LWM2M attributes" 300 default 20 301 help 302 This value sets up the maximum number of LwM2M attributes that 303 we can handle at the same time. 304 305config LWM2M_LOCATION_OBJ_SUPPORT 306 bool "Location object support" 307 help 308 Include support for LWM2M Location Object (ID 6) 309 310menu "IPSO Alliance Smart Object Support" 311 312source "subsys/net/lib/lwm2m/Kconfig.ipso" 313 314endmenu 315 316endif # LWM2M 317