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 <justin.morton@nordicsemi.no>
  • Loading branch information
jayteemo committed Oct 8, 2024
1 parent 2c7add3 commit 167373a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
16 changes: 9 additions & 7 deletions doc/nrf/releases_and_maturity/migration/migration_guide_2.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,24 @@ AT command parser

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

nRF Security
------------
nRF Cloud
---------

.. toggle::

* The ``CONFIG_CRACEN_LOAD_KMU_SEED`` Kconfig option was renamed to :kconfig:option:`CONFIG_CRACEN_IKG_SEED_LOAD`.

.. _migration_2.8_recommended:
* 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.

nRF Security
------------

.. toggle::

* The ``CONFIG_MBEDTLS_CIPHER_MODE_CFB`` and ``CONFIG_MBEDTLS_CIPHER_MODE_OFB`` Kconfig options have been removed.
Use other cipher modes instead.
* The ``CONFIG_CRACEN_LOAD_KMU_SEED`` Kconfig option was renamed to :kconfig:option:`CONFIG_CRACEN_IKG_SEED_LOAD`.
* The ``CONFIG_MBEDTLS_CIPHER_MODE_CFB`` and ``CONFIG_MBEDTLS_CIPHER_MODE_OFB`` Kconfig options have been removed.
Use other cipher modes instead.

.. _migration_2.8_recommended:

Recommended changes
*******************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,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` file.
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 @@ -873,6 +875,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 samples/cellular/nrf_cloud_multi_service/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tests:
- nrf9151dk/nrf9151/ns
- nrf9160dk/nrf9160/ns
- nrf9161dk/nrf9161/ns
extra_args: EXTRA_CONF_FILE="overlay_coap.conf;overlay-coap_nrf_provisioning.conf"
extra_args: EXTRA_CONF_FILE="overlay-coap_nrf_provisioning.conf;overlay_coap.conf"
nrf_cloud_multi_service_SNIPPET=nrf91-modem-trace-uart
tags: ci_build sysbuild ci_samples_cellular
sample.cellular.nrf7002ek_wifi.scan:
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 167373a

Please sign in to comment.