nuttx-apps/netutils/libcoap/Kconfig
zhanghongyu ce735f4136 libcoap: add makefile and Kconfig
server:
when ipv6 is enable:
ap> coap_server
only ipv4 is enable, we need to specify the ip address of the network card:
ap> coap_server -A [ipv4 address]

client:
ap> coap_client -m get coap://[ipv4/6 address]/time
Dec 26 06:41:12

Other Examples:
	coap_client -m get coap://[::1]/
	coap_client -m get coap://[::1]/.well-known/core
	coap_client -m get coap+tcp://[::1]/.well-known/core
	coap_client -m get coap://%2Funix%2Fdomain%2Fpath%2Fdgram/.well-known/core
	coap_client -m get coap+tcp://%2Funix%2Fdomain%2Fpath%2Fstream/.well-known/core
	coap_client -m get coaps://[::1]/.well-known/core
	coap_client -m get coaps+tcp://[::1]/.well-known/core
	coap_client -m get coaps://%2Funix%2Fdomain%2Fpath%2Fdtls/.well-known/core
	coap_client -m get coaps+tcp://%2Funix%2Fdomain%2Fpath%2Ftls/.well-known/core
	coap_client -m get -T cafe coap://[::1]/time
	echo -n 1000 | coap-client -m put -T cafe coap://[::1]/time -f -

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-06 04:32:41 -08:00

38 lines
909 B
Plaintext

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config NETUTILS_LIBCOAP
bool "LIBCOAP"
default n
---help---
libcoap is a C implementation of a lightweight application-protocol
for devices that are constrained their resources such as computing
power, RF range, memory, bandwidth, or network packet sizes. This
protocol, CoAP, is standardized by the IETF as RFC 7252.
if NETUTILS_LIBCOAP
config LIBCOAP_VERSION
string "libcoap version"
default "4.3.4"
config NETUTILS_LIBCOAP_EXAMPLE
tristate "Example coap-server and coap-client"
default n
if NETUTILS_LIBCOAP_EXAMPLE
config NETUTILS_LIBCOAP_EXAMPLE_PRIORITY
int "libcoap example priority"
default 100
config NETUTILS_LIBCOAP_EXAMPLE_STACKSIZE
int "libcoap example stacksize"
default 2048
endif # NETUTILS_LIBCOAP_EXAMPLE
endif # NETUTILS_LIBCOAP