1CONFIG_NETWORKING=y
2CONFIG_LOG=y
3CONFIG_TEST_RANDOM_GENERATOR=y
4CONFIG_NET_IPV4=y
5CONFIG_NET_IPV6=n
6CONFIG_NET_DHCPV4=n
7CONFIG_NET_PKT_RX_COUNT=4
8CONFIG_NET_PKT_TX_COUNT=4
9CONFIG_NET_BUF_RX_COUNT=8
10CONFIG_NET_BUF_TX_COUNT=8
11CONFIG_NET_MAX_CONTEXTS=4
12CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
13CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"
14CONFIG_NET_CONFIG_NEED_IPV4=y
15CONFIG_NET_CONFIG_SETTINGS=y
16
17CONFIG_LWM2M=y
18CONFIG_LWM2M_IPSO_SUPPORT=y
19CONFIG_LWM2M_SHELL=y
20
21CONFIG_LWM2M_TICKLESS=y
22CONFIG_ZVFS_EVENTFD=y
23CONFIG_ZVFS_EVENTFD_MAX=2
24
25#Enable test objects
26CONFIG_LWM2M_PORTFOLIO_OBJ_SUPPORT=y
27CONFIG_LWM2M_BINARYAPPDATA_OBJ_SUPPORT=y
28CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT=y
29CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT=y
30
31#LwM2M v1.1 configure
32CONFIG_LWM2M_VERSION_1_1=y
33CONFIG_LWM2M_DTLS_SUPPORT=y
34CONFIG_LWM2M_DTLS_CID=y
35CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP=y
36
37#Enable SenML JSON content format
38CONFIG_JSON_LIBRARY=y
39CONFIG_BASE64=y
40CONFIG_LWM2M_RW_SENML_JSON_SUPPORT=y
41
42#Enable SenML CBOR content format
43CONFIG_LWM2M_RW_SENML_CBOR_SUPPORT=y
44CONFIG_LWM2M_RW_SENML_CBOR_RECORDS=60
45CONFIG_ZCBOR_CANONICAL=y
46
47#Enable legacy content formats
48CONFIG_LWM2M_RW_JSON_SUPPORT=y
49CONFIG_LWM2M_RW_OMA_TLV_SUPPORT=y
50
51# Longer endpoint name might be returned in a registration reply
52CONFIG_COAP_EXTENDED_OPTIONS_LEN=y
53CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=40
54
55# Speed up testing, we are running in non-lossy network
56CONFIG_COAP_INIT_ACK_TIMEOUT_MS=1000
57CONFIG_COAP_RANDOMIZE_ACK_TIMEOUT=n
58CONFIG_LWM2M_RD_CLIENT_MAX_RETRIES=2
59
60# Use QUEUE mode by default
61CONFIG_LWM2M_QUEUE_MODE_ENABLED=y
62CONFIG_LWM2M_QUEUE_MODE_UPTIME=20
63CONFIG_LWM2M_UPDATE_PERIOD=30
64CONFIG_LWM2M_RD_CLIENT_STOP_POLLING_AT_IDLE=y
65CONFIG_LWM2M_SECONDS_TO_UPDATE_EARLY=1
66
67# LwM2M configuration as OMA-ETS-LightweightM2M_INT-V1_1-20190912-D Configuration 3
68CONFIG_LWM2M_ENGINE_DEFAULT_LIFETIME=30
69CONFIG_LWM2M_SERVER_DEFAULT_PMIN=1
70CONFIG_LWM2M_SERVER_DEFAULT_PMAX=10
71
72CONFIG_MBEDTLS=y
73CONFIG_MBEDTLS_TLS_VERSION_1_2=y
74CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID=y
75
76# Special MbedTLS changes
77CONFIG_MBEDTLS_ENABLE_HEAP=y
78# MTU - IPv6 header - UDP header - DTLS header
79# 1280 - 40 - 8 - 21
80CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=1211
81CONFIG_MBEDTLS_HEAP_SIZE=7168
82CONFIG_MBEDTLS_CIPHER_AES_ENABLED=y
83CONFIG_MBEDTLS_CIPHER_CCM_ENABLED=y
84# Disable RSA, we don't parse certs: saves flash/memory
85CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=n
86# Enable PSK instead
87CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED=y
88CONFIG_LWM2M_SECURITY_DTLS_TLS_CIPHERSUITE_MAX=3
89
90CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
91# For testing purposes, limit DTLS contexts to one,
92# LwM2M engine should not use more than one on any given time.
93CONFIG_NET_SOCKETS_TLS_MAX_CONTEXTS=1
94CONFIG_NET_SOCKETS_ENABLE_DTLS=y
95CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID=y
96
97# Assume that IPv6 minimum MTU is accepted
98# MTU - IPv6 header - UDP header - DTLS header - CoAP header room
99# 1280 - 40 - 8 - 21 - 48
100CONFIG_LWM2M_COAP_MAX_MSG_SIZE=1163
101CONFIG_LWM2M_COAP_BLOCK_SIZE=512
102CONFIG_LWM2M_COAP_BLOCK_TRANSFER=y
103CONFIG_LWM2M_COAP_ENCODE_BUFFER_SIZE=8192
104CONFIG_LWM2M_NUM_OUTPUT_BLOCK_CONTEXT=2
105CONFIG_LWM2M_NUM_BLOCK1_CONTEXT=2
106CONFIG_SYS_HASH_FUNC32=y
107CONFIG_LWM2M_ENGINE_VALIDATION_BUFFER_SIZE=0
108CONFIG_LWM2M_ENGINE_MAX_PENDING=2
109CONFIG_LWM2M_ENGINE_MAX_REPLIES=2
110CONFIG_LWM2M_ENGINE_MAX_MESSAGES=3
111CONFIG_LWM2M_ENGINE_MAX_OBSERVER=5
112CONFIG_LWM2M_DEVICE_PWRSRC_MAX=2
113CONFIG_LWM2M_DEVICE_ERROR_CODE_MAX=2
114CONFIG_LWM2M_DEVICE_EXT_DEV_INFO_MAX=2
115CONFIG_LWM2M_NUM_ATTR=20
116
117# Configure stack sizes
118CONFIG_MAIN_STACK_SIZE=1024
119CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512
120CONFIG_SHELL_STACK_SIZE=1536
121CONFIG_LWM2M_ENGINE_STACK_SIZE=2048
122