Skip to content

Commit

Permalink
net: lib: nrf_cloud: enable coap downloads by default
Browse files Browse the repository at this point in the history
If CONFIG_NRF_CLOUD_COAP is enabled, enable downloads over CoAP
(CONFIG_NRF_CLOUD_COAP_DOWNLOADS) by default if FOTA or P-GPS is
used.

Remove experimental status from CONFIG_NRF_CLOUD_COAP_DOWNLOADS.

IRIS-9685

Signed-off-by: Justin Morton <[email protected]>
  • Loading branch information
jayteemo committed Oct 3, 2024
1 parent 547aaab commit eb54666
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ AT command parser

* The :c:func:`at_parser_cmd_type_get` has been renamed to :c:func:`at_parser_at_cmd_type_get`.

nRF Cloud
=========

.. toggle::

* The :kconfig:option:`CONFIG_NRF_CLOUD_COAP_DOWNLOADS` Kconfig option has been enabled by default for nRF Cloud CoAP projects using the :kconfig:option:`CONFIG_NRF_CLOUD_FOTA_POLL` or :kconfig:option:`CONFIG_NRF_CLOUD_PGPS` Kconfig option.
The :kconfig:option:`CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE` Kconfig option must be set to at least 80 for P-GPS and 192 for FOTA.

.. _migration_2.8_recommended:

Recommended changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ Cellular samples
* Handling of JITP association to improve speed and reliability.
* Renamed the :file:`overlay_nrf7002ek_wifi_no_lte.conf` overlay to :file:`overlay_nrf700x_wifi_mqtt_no_lte.conf`.
* Renamed the :file:`overlay_nrf7002ek_wifi_coap_no_lte.conf` overlay to :file:`overlay_nrf700x_wifi_coap_no_lte.conf`.
* The value of the :kconfig:option:`CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE` Kconfig option in the :file:`overlay_coap.conf` overlay.
A larger value is required now that the :kconfig:option:`CONFIG_NRF_CLOUD_COAP_DOWNLOADS` Kconfig option is enabled.

* Fixed an issue where the accepted shadow was not marked as received because the config section did not yet exist in the shadow.
* Removed redundant logging now done by the :ref:`lib_nrf_cloud` library.
Expand Down Expand Up @@ -853,6 +855,9 @@ Libraries for networking

* To use a shorter resource string for the ``d2c/bulk`` resource.
* The function :c:func:`nrf_cloud_coap_shadow_get` to return ``-E2BIG`` if the received shadow data was truncated because the provided buffer was not big enough.
* The :kconfig:option:`CONFIG_NRF_CLOUD_COAP_DOWNLOADS` Kconfig option to be enabled by default if either the :kconfig:option:`CONFIG_NRF_CLOUD_FOTA_POLL` or :kconfig:option:`CONFIG_NRF_CLOUD_PGPS` Kconfig option is enabled.

* Removed the experimental status (:kconfig:option:`CONFIG_EXPERIMENTAL`) from the :kconfig:option:`CONFIG_NRF_CLOUD_COAP_DOWNLOADS` Kconfig option.

* :ref:`lib_lwm2m_client_utils` library:

Expand Down
3 changes: 2 additions & 1 deletion samples/cellular/nrf_cloud_multi_service/overlay_coap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ CONFIG_NET_SOCKETS_OFFLOAD_PRIORITY=40
CONFIG_COAP_CLIENT_BLOCK_SIZE=1024
CONFIG_COAP_CLIENT_STACK_SIZE=2048
CONFIG_COAP_CLIENT_THREAD_PRIORITY=0
CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=64
# The extended options length must be increased to perform FOTA and P-GPS downloads over CoAP.
CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=192

# Not compatible with ground-fix
CONFIG_ZCBOR_CANONICAL=n
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/lib/nrf_cloud/Kconfig.nrf_cloud_coap
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endif # WIFI
config NRF_CLOUD_COAP_DOWNLOADS
bool "Download files using CoAP instead of HTTP"
depends on NRF_CLOUD_COAP
select EXPERIMENTAL
default y if NRF_CLOUD_FOTA_POLL || NRF_CLOUD_PGPS
help
Use nRF Cloud CoAP's proxy download resource to download files for FOTA and P-GPS.
When enabled, the Kconfig option COAP_EXTENDED_OPTIONS_LEN_VALUE must be increased
Expand Down
2 changes: 1 addition & 1 deletion subsys/net/lib/nrf_cloud/src/nrf_cloud_pgps_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ static int download_client_callback(const struct download_client_evt *event)
}
break;
case DOWNLOAD_CLIENT_EVT_DONE:
LOG_INF("Download client done");
LOG_DBG("Download client done");
break;
case DOWNLOAD_CLIENT_EVT_ERROR: {
if ((event->error == -ECANCELED) && IS_ENABLED(CONFIG_NRF_CLOUD_COAP_DOWNLOADS)) {
Expand Down

0 comments on commit eb54666

Please sign in to comment.