2017-07-07 11:04:03 -07:00
|
|
|
#
|
|
|
|
# Copyright (c) 2017 Linaro Limited
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
|
|
|
menuconfig LWM2M
|
|
|
|
bool "OMA LWM2M protocol stack"
|
2019-01-25 14:13:07 -08:00
|
|
|
select COAP
|
2017-10-16 15:15:37 -07:00
|
|
|
select HTTP_PARSER_URL
|
2019-01-28 11:55:23 -08:00
|
|
|
select NET_SOCKETS
|
|
|
|
select NET_SOCKETS_POSIX_NAMES
|
2017-07-07 11:04:03 -07:00
|
|
|
help
|
|
|
|
This option adds logic for managing OMA LWM2M data
|
|
|
|
|
|
|
|
if LWM2M
|
|
|
|
|
2018-10-05 15:14:58 +03:00
|
|
|
module = LWM2M
|
|
|
|
module-dep = LOG
|
|
|
|
module-str = Log level for LWM2M library
|
2018-09-19 11:22:19 +03:00
|
|
|
source "subsys/net/Kconfig.template.log_config.net"
|
2017-07-07 11:04:03 -07:00
|
|
|
|
2019-01-24 15:49:31 -08:00
|
|
|
config LWM2M_DTLS_SUPPORT
|
|
|
|
bool "Enable DTLS support in the LwM2M client"
|
2019-01-28 11:55:23 -08:00
|
|
|
select TLS_CREDENTIALS
|
|
|
|
select NET_SOCKETS_SOCKOPT_TLS
|
|
|
|
select NET_SOCKETS_ENABLE_DTLS
|
2019-01-24 15:49:31 -08:00
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
config LWM2M_ENGINE_STACK_SIZE
|
|
|
|
int "LWM2M engine stack size"
|
2019-02-18 21:57:56 -08:00
|
|
|
default 2560 if NET_LOG
|
|
|
|
default 2048
|
2017-07-07 11:04:03 -07:00
|
|
|
help
|
|
|
|
Set the stack size for the LWM2M library engine (used for handling
|
|
|
|
OBSERVE and NOTIFY events)
|
|
|
|
|
2017-09-01 01:11:43 -07:00
|
|
|
config LWM2M_ENGINE_MAX_MESSAGES
|
|
|
|
int "LWM2M engine max. message object"
|
|
|
|
default 10
|
|
|
|
help
|
|
|
|
Set the maximum message objects for the LWM2M library client
|
|
|
|
|
2019-01-25 14:13:07 -08:00
|
|
|
config LWM2M_COAP_BLOCK_SIZE
|
|
|
|
int "LWM2M CoAP block-wise transfer size"
|
|
|
|
default 256
|
|
|
|
range 64 1024
|
|
|
|
help
|
|
|
|
CoAP block size used by LWM2M when performing block-wise
|
|
|
|
transfers. Possible values: 16, 32, 64, 128, 256, 512 and 1024.
|
|
|
|
|
|
|
|
config LWM2M_ENGINE_MESSAGE_HEADER_SIZE
|
|
|
|
int "Room for CoAP header data"
|
|
|
|
default 48
|
|
|
|
range 24 128
|
|
|
|
help
|
|
|
|
Extra room allocated to handle CoAP header data
|
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
config LWM2M_ENGINE_MAX_PENDING
|
|
|
|
int "LWM2M engine max. pending objects"
|
|
|
|
default 5
|
|
|
|
help
|
|
|
|
Set the maximum pending objects for the LWM2M library client
|
|
|
|
|
|
|
|
config LWM2M_ENGINE_MAX_REPLIES
|
|
|
|
int "LWM2M engine max. reply objects"
|
|
|
|
default 5
|
|
|
|
help
|
|
|
|
Set the maximum reply objects for the LWM2M library client
|
|
|
|
|
|
|
|
config LWM2M_ENGINE_MAX_OBSERVER
|
2017-08-16 14:16:02 -07:00
|
|
|
int "Maximum # of observable LWM2M resources"
|
2018-05-07 16:04:51 -07:00
|
|
|
default 10
|
2017-10-01 13:29:23 -07:00
|
|
|
range 5 200
|
2017-07-07 11:04:03 -07:00
|
|
|
help
|
|
|
|
This value sets the maximum number of resources which can be
|
|
|
|
added to the observe notification list.
|
|
|
|
|
|
|
|
config LWM2M_ENGINE_DEFAULT_LIFETIME
|
|
|
|
int "LWM2M engine default server connection lifetime"
|
|
|
|
default 30
|
2017-08-25 14:04:51 -07:00
|
|
|
range 15 65535
|
2017-07-07 11:04:03 -07:00
|
|
|
help
|
|
|
|
Set the default lifetime (in seconds) for the LWM2M library engine
|
|
|
|
|
|
|
|
config LWM2M_LOCAL_PORT
|
|
|
|
int "LWM2M client port"
|
2018-05-16 15:57:46 -07:00
|
|
|
default 0
|
2017-07-07 11:04:03 -07:00
|
|
|
help
|
2018-05-16 15:57:46 -07:00
|
|
|
This is the client port for LWM2M communication. The default
|
|
|
|
setting of 0 sets a random port for the client to be used for
|
|
|
|
outgoing communication.
|
2017-07-07 11:04:03 -07:00
|
|
|
|
|
|
|
config LWM2M_SECURITY_INSTANCE_COUNT
|
|
|
|
int "Maximum # of LWM2M Security object instances"
|
2017-10-01 13:29:23 -07:00
|
|
|
default 1
|
2019-01-25 22:36:47 -08:00
|
|
|
default 2 if LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP
|
2017-07-07 11:04:03 -07:00
|
|
|
range 1 10
|
|
|
|
help
|
|
|
|
This setting establishes the total count of LWM2M Security instances
|
|
|
|
available to the client.
|
|
|
|
|
2019-01-25 16:01:39 -08:00
|
|
|
config LWM2M_SECURITY_KEY_SIZE
|
|
|
|
int "Buffer size of the security key resources"
|
|
|
|
default 16
|
|
|
|
range 16 256
|
|
|
|
help
|
|
|
|
This setting establishes the size of the key (pre-shared / public)
|
|
|
|
resources in the security object instances.
|
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
config LWM2M_SERVER_INSTANCE_COUNT
|
|
|
|
int "Maximum # of LWM2M Server object instances"
|
2017-10-01 13:29:23 -07:00
|
|
|
default 1
|
2017-07-07 11:04:03 -07:00
|
|
|
range 1 10
|
|
|
|
help
|
|
|
|
This setting establishes the total count of LWM2M Server instances
|
|
|
|
available to the client (including: bootstrap and regular servers).
|
|
|
|
|
|
|
|
config LWM2M_RD_CLIENT_SUPPORT
|
|
|
|
bool "support for LWM2M client bootstrap/registration state machine"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Client will use registration state machine to locate and connect to
|
|
|
|
LWM2M servers (including bootstrap server support)
|
|
|
|
|
2019-01-25 22:36:47 -08:00
|
|
|
config LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP
|
|
|
|
bool "Enable bootstrap support"
|
|
|
|
help
|
|
|
|
Enabling this setting allows the RD client to support bootstrap mode.
|
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
config LWM2M_PEER_PORT
|
|
|
|
int "LWM2M server port"
|
|
|
|
depends on LWM2M_RD_CLIENT_SUPPORT
|
|
|
|
default 5683
|
|
|
|
help
|
2019-01-25 22:36:47 -08:00
|
|
|
This is the default server port to connect to for LWM2M communication
|
2017-07-07 11:04:03 -07:00
|
|
|
|
|
|
|
config LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT
|
|
|
|
bool "Firmware Update object support"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Include support for LWM2M Firmware Update Object (ID 5)
|
|
|
|
|
|
|
|
config LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT
|
|
|
|
bool "Firmware Update object pull support"
|
|
|
|
default y
|
|
|
|
depends on LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT
|
2017-07-05 23:07:41 +08:00
|
|
|
depends on (HTTP_PARSER || HTTP_PARSER_URL)
|
2017-07-07 11:04:03 -07:00
|
|
|
help
|
|
|
|
Include support for pulling a file from a remote server via
|
|
|
|
block transfer and "FIRMWARE PACKAGE URI" resource. This option
|
|
|
|
adds another UDP context and packet handling.
|
|
|
|
|
2018-05-16 16:07:03 -07:00
|
|
|
config LWM2M_FIRMWARE_UPDATE_PULL_LOCAL_PORT
|
|
|
|
int "LWM2M client firmware pull local port"
|
|
|
|
default 0
|
|
|
|
depends on LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT
|
|
|
|
help
|
|
|
|
This is the client port for LWM2M firmware download. The default
|
|
|
|
setting of 0 sets a random port for the client to be used for
|
|
|
|
outgoing communication.
|
|
|
|
|
2017-07-25 16:54:25 +08:00
|
|
|
config LWM2M_NUM_BLOCK1_CONTEXT
|
|
|
|
int "Maximum # of LWM2M block1 contexts"
|
|
|
|
default 3
|
|
|
|
help
|
|
|
|
This value sets up the maximum number of block1 contexts for
|
|
|
|
CoAP block-wise transfer we can handle at the same time.
|
|
|
|
|
2017-07-27 18:30:44 -03:00
|
|
|
config LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
|
|
|
|
bool "Firmware Update object pull via CoAP-CoAP/HTTP proxy support"
|
|
|
|
depends on LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT
|
|
|
|
help
|
|
|
|
Include support for pulling firmware file via a CoAP-CoAP/HTTP proxy.
|
|
|
|
|
|
|
|
if LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
|
|
|
|
|
|
|
|
config LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_ADDR
|
|
|
|
string "CoAP proxy network address"
|
|
|
|
help
|
|
|
|
Network address of the CoAP proxy server.
|
|
|
|
|
|
|
|
endif # LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT
|
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
config LWM2M_RW_JSON_SUPPORT
|
|
|
|
bool "support for JSON writer"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Include support for writing JSON data
|
|
|
|
|
2018-01-11 09:45:24 -08:00
|
|
|
config LWM2M_DEVICE_PWRSRC_MAX
|
|
|
|
int "Maximum # of device power source records"
|
|
|
|
default 5
|
|
|
|
range 1 20
|
|
|
|
help
|
|
|
|
This value sets the maximum number of power source data that a device
|
|
|
|
can store. These are displayed via the "Device" object /3/0/6,
|
|
|
|
/3/0/7 and /3/0/8 resources.
|
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
config LWM2M_DEVICE_ERROR_CODE_MAX
|
|
|
|
int "Maximum # of device obj error codes to store"
|
|
|
|
default 10
|
|
|
|
range 1 20
|
|
|
|
help
|
|
|
|
This value sets the maximum number of error codes that the device
|
|
|
|
object will store before ignoring new values.
|
|
|
|
|
2017-11-24 18:47:00 +08:00
|
|
|
config LWM2M_NUM_ATTR
|
|
|
|
int "Maximum # of LWM2M attributes"
|
|
|
|
default 20
|
|
|
|
help
|
|
|
|
This value sets up the maximum number of LwM2M attributes that
|
|
|
|
we can handle at the same time.
|
|
|
|
|
2017-07-07 11:04:05 -07:00
|
|
|
menu "IPSO Alliance Smart Object Support"
|
|
|
|
|
|
|
|
source "subsys/net/lib/lwm2m/Kconfig.ipso"
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
2017-07-07 11:04:03 -07:00
|
|
|
endif # LWM2M
|