Commit Graph

1 Commits

Author SHA1 Message Date
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