1# CoAP implementation for Zephyr
2
3# Copyright (c) 2017 Intel Corporation
4# SPDX-License-Identifier: Apache-2.0
5
6config COAP
7	bool "CoAP Support"
8	help
9	  This option enables the CoAP implementation.
10
11
12if COAP
13
14# This setting is only used by unit test. Do not enable it in applications
15config COAP_TEST_API_ENABLE
16	bool "Enable test API for CoAP unit tests"
17	help
18	  Do not enable this for normal use.
19
20config COAP_WELL_KNOWN_BLOCK_WISE
21	bool "CoAP ./well-known/core services block wise support"
22	help
23	  This option enables the block wise support of CoAP response
24	  to ./well-known/core request. Without this option all resource's
25	  information will be sent in a single IP packet (can be multiple
26	  fragments depends on MTU size). This will be useful in mesh kind
27	  of networks.
28
29config COAP_WELL_KNOWN_BLOCK_WISE_SIZE
30	int "CoAP ./well-known/core services block wise support"
31	default 32
32	depends on COAP_WELL_KNOWN_BLOCK_WISE
33	help
34	  Maximum size of CoAP block. Valid values are 16, 32, 64, 128,
35	  256, 512 and 1024.
36
37config COAP_EXTENDED_OPTIONS_LEN
38	bool "Support for CoAP extended options"
39	help
40	  This option enables the parsing of extended CoAP options length.
41	  CoAP extended options length can be 2 byte value, which
42	  requires more memory. User can save memory by disabling this.
43	  That means only length of maximum 12 bytes are supported by default.
44	  Enable this if length field going to bigger that 12.
45
46config COAP_EXTENDED_OPTIONS_LEN_VALUE
47	int "CoAP extended options length value"
48	default 13
49	depends on COAP_EXTENDED_OPTIONS_LEN
50	help
51	  This option specifies the maximum value of length field when
52	  COAP_EXTENDED_OPTIONS_LEN is enabled. Define the value according to
53	  user requirement.
54
55config COAP_INIT_ACK_TIMEOUT_MS
56	int "base length of the random generated initial ACK timeout in ms"
57	default 2000
58	range 1000 100000
59	help
60	  This value is used as a base value to retry pending CoAP packets.
61
62config COAP_RANDOMIZE_ACK_TIMEOUT
63	bool "Randomize initial ACK timeout, as specified in RFC 7252"
64	default y
65	help
66	  If enabled, the initial ACK timeout will be randomized, as specified
67	  in RFC 7252, i.e. will be a random number between ACK_TIMEOUT and
68	  ACK_TIMEOUT * ACK_RANDOM_FACTOR (where ACK_TIMEOUT is specified by
69	  COAP_INIT_ACK_TIMEOUT_MS option). Otherwise, the initial ACK timeout
70	  will be fixed to the value of COAP_INIT_ACK_TIMEOUT_MS option.
71
72config COAP_URI_WILDCARD
73	bool "Enable wildcards in CoAP resource path"
74	default y
75	help
76	  This option enables MQTT-style wildcards in path. Disable it if
77	  resource path may contain plus or hash symbol.
78
79config COAP_KEEP_USER_DATA
80	bool "Enable keeping user data in the CoAP packet"
81	help
82	  This option enables keeping application-specific user data
83
84module = COAP
85module-dep = NET_LOG
86module-str = Log level for CoAP
87module-help = Enables CoAP debug messages.
88source "subsys/net/Kconfig.template.log_config.net"
89
90endif # COAP
91