nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_cloud_coap_bytes_send()

int nrf_cloud_coap_bytes_send ( uint8_t * buf,
size_t buf_len,
bool confirmable )

#include <include/net/nrf_cloud_coap.h>

Send raw bytes to nRF Cloud on the /msg/d2c/raw topic. The data sent can be for any purpose.

Parameters
[in]bufbuffer with binary string.
[in]buf_lenlength of buf in bytes.
[in]confirmableSelect whether to use a CON or NON CoAP transfer.
Return values
-EACCESDevice does not have a valid nRF Cloud CoAP connection.
Returns
0 If successful, nonzero if failed. Negative values are device-side errors defined in errno.h. Positive values are cloud-side errors (CoAP result codes) defined in zephyr/net/coap.h.