ce735f4136
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>
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
############################################################################
|
|
# apps/netutils/libcoap/Make.defs
|
|
#
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
# this work for additional information regarding copyright ownership. The
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance with the
|
|
# License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
############################################################################
|
|
|
|
ifneq ($(CONFIG_NETUTILS_LIBCOAP),)
|
|
CONFIGURED_APPS += $(APPDIR)/netutils/libcoap
|
|
CFLAGS += ${INCDIR_PREFIX}$(APPDIR)$(DELIM)netutils$(DELIM)libcoap$(DELIM)libcoap$(DELIM)include
|
|
endif
|