Home
last modified time | relevance | path

Searched full:coap (Results 1 – 25 of 110) sorted by relevance

12345

/Zephyr-latest/subsys/net/lib/coap/
DKconfig1 # CoAP implementation for Zephyr
6 config COAP config
7 bool "CoAP Support"
9 This option enables the CoAP implementation.
12 if COAP
16 bool "Test API for CoAP unit tests"
21 bool "CoAP ./well-known/core services block wise support"
23 This option enables the block wise support of CoAP response
30 int "CoAP ./well-known/core services block wise support"
34 Maximum size of CoAP block. Valid values are 16, 32, 64, 128,
[all …]
Dcoap_server_shell.c89 "Start a CoAP Service\n"
93 "Stop a CoAP Service\n"
98 SHELL_CMD_REGISTER(coap_service, &sub_coap_service, "CoAP Service commands", cmd_list);
/Zephyr-latest/doc/connectivity/networking/api/
Dcoap.rst3 CoAP chapter
13 The Constrained Application Protocol (CoAP) is a specialized web transfer
16 that support CoAP's features. For more information about the protocol
19 Zephyr provides a CoAP library which supports client and server roles.
21 is configurable as per user needs. The Zephyr CoAP library
26 On top of CoAP, Zephyr has support for LWM2M "Lightweight Machine 2 Machine"
32 - `RFC7252: The Constrained Application Protocol (CoAP) <https://tools.ietf.org/html/rfc7252>`_
34 - `RFC7959: Block-Wise Transfers in the Constrained Application Protocol (CoAP) <https://tools.ietf…
35 - `RFC7641: Observing Resources in the Constrained Application Protocol (CoAP) <https://tools.ietf.…
42 CoAP Server
[all …]
Dcoap_client.rst3 CoAP client
13 The CoAP client library allows application to send CoAP requests and parse CoAP responses.
16 in the request. The CoAP client handles the communication over sockets.
17 As the CoAP client doesn't create socket it is using, the application is responsible for creating
23 The following is an example of a CoAP client initialization and request sending:
45 Before any requests can be sent, the CoAP client needs to be initialized.
46 After initialization, the application can send a CoAP request and wait for the response.
47 Currently only one request can be sent for a single CoAP client at a time. There can be multiple
48 CoAP clients.
73 LOG_INF("CoAP response from server %d", code);
[all …]
Dcoap_server.rst3 CoAP server
13 Zephyr comes with a batteries-included CoAP server, which uses services to listen for CoAP
14 requests. The CoAP services handle communication over sockets and pass requests to registered
15 CoAP resources.
20 Some configuration is required to make sure services can be started using the CoAP server. The
64 Services defined with the ``COAP_SERVICE_AUTOSTART`` flag will be started together with the CoAP
71 The following is an example of a CoAP resource registered with our service:
114 /* Return a CoAP response code as a shortcut for an empty ACK message */
127 As demonstrated in the example above, a CoAP resource handler can return response codes to let
133 The CoAP server provides logic for parsing observe requests and stores these using the runtime data
[all …]
/Zephyr-latest/samples/net/sockets/coap_download/
DREADME.rst1 .. zephyr:code-sample:: coap-download
2 :name: CoAP download
3 :relevant-api: coap
5 Use the CoAP client API to download data via a GET request
10 This sample demonstrates the use of the CoAP client API to make GET requests to
11 a CoAP server. If the data to be fetched is larger than a single CoAP packet,
21 - Network connection between the board and host running a CoAP server
25 Build the CoAP download sample application like this:
38 Download a CoAP server application, for example `aiocoap`_ (Python), or
50 You can also change the name of the CoAP resource to request via Kconfig:
[all …]
DKconfig4 mainmenu "CoAP Download Sample Application"
7 int "CoAP server port"
10 CoAP server port that the application should send requests to.
13 string "The CoAP resource path to download"
16 The path (relative to server's root directory) of the CoAP resource
Dsample.yaml2 name: CoAP Download Sample
10 - coap
/Zephyr-latest/include/zephyr/net/
Dcoap_link_format.h10 * @brief CoAP implementation for Zephyr.
17 * @addtogroup coap COAP Library
34 * @brief Build a CoAP response for a .well-known/core CoAP request.
37 * @param request A pointer to the .well-known/core CoAP request
38 * @param response A pointer to a CoAP response, will be initialized
39 * @param data A data pointer to be used to build the CoAP response
50 * @brief Build a CoAP response for a .well-known/core CoAP request.
54 * @param request A pointer to the .well-known/core CoAP request
55 * @param response A pointer to a CoAP response, will be initialized
56 * @param data A data pointer to be used to build the CoAP response
Dcoap_client.h2 * @brief CoAP client API
4 * An API for applications to do CoAP requests
16 * @brief CoAP client API
17 * @defgroup coap_client CoAP client API
24 #include <zephyr/net/coap.h>
27 /** Maximum size of a CoAP message */
33 * @brief Callback for CoAP request.
35 * This callback is called for responses to CoAP client requests.
53 * @brief Representation of a CoAP client request.
57 bool confirmable; /**< CoAP Confirmable/Non-confirmable message */
[all …]
Dcoap_service.h8 * @brief CoAP Service API
10 * An API for applications to respond to CoAP requests
16 #include <zephyr/net/coap.h>
24 * @brief CoAP Service API
25 * @defgroup coap_service CoAP service API
33 * @name CoAP Service configuration flags
78 * @brief Define a static CoAP resource owned by the service named @p _service .
80 * @note The handlers registered with the resource can return a CoAP response code to reply with
118 * @brief Define a CoAP service with static resources.
142 * @brief Count the number of CoAP services.
[all …]
Dcoap_mgmt.h9 * @brief CoAP Events code public header
22 * @brief CoAP Manager Events
23 * @defgroup coap_mgmt CoAP Manager Events
32 /* CoAP events */
79 * @brief CoAP Service event structure.
82 /** The CoAP service for which the event is emitted */
87 * @brief CoAP Observer event structure.
90 /** The CoAP resource for which the event is emitted */
Dcoap.h11 * @brief CoAP implementation for Zephyr.
18 * @brief COAP library
19 * @defgroup coap COAP Library
38 * @brief Set of CoAP packet options we are aware of.
97 * @brief CoAP packets may be of one of these types.
130 * Utility macro to create a CoAP response code.
210 * @brief Set of Content-Format option values for CoAP.
227 * @brief Set of No-Response option values for CoAP.
275 * @brief Description of CoAP resource.
277 * CoAP servers often want to register resources, so that clients can act on
[all …]
/Zephyr-latest/samples/net/sockets/coap_server/
DREADME.rst1 .. zephyr:code-sample:: coap-server
2 :name: CoAP service
3 :relevant-api: coap coap_service
5 Use the CoAP server subsystem to register CoAP resources.
10 This sample shows how to register CoAP resources to a main CoAP service.
11 The CoAP server implementation expects all services and resources to be
20 The sample will listen for requests in the CoAP UDP port (5683) in the
21 site-local IPv6 multicast address reserved for CoAP nodes.
36 against coap-server.
/Zephyr-latest/samples/net/sockets/coap_client/
DREADME.rst1 .. zephyr:code-sample:: coap-client
2 :name: CoAP client
3 :relevant-api: coap
5 Use the CoAP library to implement a client that fetches a resource.
10 This sample is a simple CoAP client showing how to retrieve information
17 multicast address reserved for CoAP nodes, so the URI can be
22 coap://[ff02::fd]:5683/test
/Zephyr-latest/samples/net/sockets/coap_server/src/
Devents.c24 LOG_INF("CoAP observer added"); in coap_event_handler()
27 LOG_INF("CoAP observer removed"); in coap_event_handler()
33 LOG_INF("CoAP service %s started", net_event->service->name); in coap_event_handler()
35 LOG_INF("CoAP service started"); in coap_event_handler()
42 LOG_INF("CoAP service %s stopped", net_event->service->name); in coap_event_handler()
44 LOG_INF("CoAP service stopped"); in coap_event_handler()
/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_obj_gateway.h28 * It must handle the content of the coap message completely.
29 * In case of success the LwM2M engine will then send the formatted coap message,
30 * otherwise a coap response code is sent.
32 * Example of returning CoAP response:
35 * // Write CoAP packet to msg->out.out_cpkt
40 * @return 0 if msg contains a valid CoAP response.
DKconfig6 select COAP
81 bool "CoAP block transfer support for big outgoing LwM2M messages [EXPERIMENTAL]"
86 To append CoAP ETag option into outgoing block transfers, CONFIG_SYS_HASH_FUNC32 should
109 recommends this to be CoAP MAX_TRANSMIT_WAIT parameter (which
192 This is the default server port to connect to for LwM2M firmware downloads over coap.
275 int "LWM2M CoAP block-wise transfer size"
279 CoAP block size used by LwM2M when performing block-wise
283 int "Room for CoAP header data"
287 Extra room allocated to handle CoAP header data
290 int "LWM2M CoAP maximum message size"
[all …]
/Zephyr-latest/samples/net/sockets/coap_download/src/
Dmain.c37 LOG_INF("CoAP response, result_code=%d, offset=%u, len=%u", result_code, offset, len); in on_coap_response()
43 LOG_INF("CoAP download done, got %u bytes in %" PRId64 " ms", total_size, in on_coap_response()
47 LOG_ERR("Error during CoAP download, result_code=%d", result_code); in on_coap_response()
66 LOG_INF("Starting CoAP download using %s", (AF_INET == sa->sa_family) ? "IPv4" : "IPv6"); in do_coap_download()
78 LOG_ERR("Failed to send CoAP request, err %d", ret); in do_coap_download()
82 /* Wait for CoAP request to complete */ in do_coap_download()
94 LOG_ERR("Failed to init coap client, err %d", ret); in main()
/Zephyr-latest/samples/net/lwm2m_client/
DKconfig32 default "coap://leshan.eclipseprojects.io:5683" if (WIFI && !LWM2M_DTLS_SUPPORT)
34 default "coap://192.0.2.2:5683" if !LWM2M_DTLS_SUPPORT
39 Only accepted protocols are "coap://" and "coaps://"
42 IPv6 addresses must be enclosed in square brackets, for example "coap://[fd00::1]".
/Zephyr-latest/tests/net/lib/coap_client/
Dtestcase.yaml4 net.coap.client:
8 - coap
DCMakeLists.txt12 target_sources(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/coap/coap_client.c)
13 target_sources(app PRIVATE ${ZEPHYR_BASE}/subsys/net/lib/coap/coap.c)
/Zephyr-latest/tests/net/lib/coap_server/common/
Dtestcase.yaml5 - coap
11 net.coap.server.common: {}
/Zephyr-latest/samples/net/sockets/coap_client/src/
Dcoap-client.c19 #include <zephyr/net/coap.h>
26 /* CoAP socket fd */
32 /* CoAP Options */
147 LOG_ERR("Failed to init CoAP message"); in send_simple_coap_request()
204 /* Test CoAP GET method */ in send_simple_coap_msgs_and_wait_for_reply()
213 /* Test CoAP PUT method */ in send_simple_coap_msgs_and_wait_for_reply()
222 /* Test CoAP POST method*/ in send_simple_coap_msgs_and_wait_for_reply()
231 /* Test CoAP DELETE method*/ in send_simple_coap_msgs_and_wait_for_reply()
334 LOG_ERR("Failed to init CoAP message"); in send_large_coap_request()
368 /* Test CoAP Large GET method */ in get_large_coap_msgs()
[all …]
/Zephyr-latest/subsys/mgmt/updatehub/
DKconfig13 depends on COAP
84 int "CoAP connection timeout in seconds"
88 Set the CoAP connection timeout value.
99 int "Max CoAP block size defined as 2^(4 + EXP)"

12345