diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst index 8e4acf28b2a6..6ab85b839521 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst @@ -297,7 +297,11 @@ Cellular samples * :ref:`nrf_cloud_multi_service` sample: - * Fixed an issue with an uninitialized variable in the :c:func:`handle_at_cmd_requests` function. + * Fixed: + + * An issue with an uninitialized variable in the :c:func:`handle_at_cmd_requests` function. + * An issue with the too small :kconfig:option:`CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE` Kconfig value + in the :file:`overlay-coap_nrf_provisioning.conf` file. * :ref:`lte_sensor_gateway` sample: @@ -512,6 +516,9 @@ Libraries for networking * :ref:`lib_azure_fota` * :ref:`lib_fota_download` +* :ref:`lib_nrf_cloud_pgps` library: + + * Fixed the warning due to missing ``https`` download protocol. Libraries for NFC ----------------- diff --git a/samples/cellular/nrf_cloud_multi_service/overlay-coap_nrf_provisioning.conf b/samples/cellular/nrf_cloud_multi_service/overlay-coap_nrf_provisioning.conf index 78178da573c5..df0f409a4fd3 100644 --- a/samples/cellular/nrf_cloud_multi_service/overlay-coap_nrf_provisioning.conf +++ b/samples/cellular/nrf_cloud_multi_service/overlay-coap_nrf_provisioning.conf @@ -58,7 +58,7 @@ CONFIG_NRF_PROVISIONING_CODEC_RX_SZ_START=2048 # CoAP Client CONFIG_COAP_EXTENDED_OPTIONS_LEN=y -CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=64 +CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=192 CONFIG_COAP_CLIENT_THREAD_PRIORITY=0 CONFIG_COAP_CLIENT_BLOCK_SIZE=1024 CONFIG_COAP_CLIENT_MESSAGE_SIZE=1024 diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_pgps.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_pgps.c index 56fc8344c56f..d6342465f31a 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_pgps.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_pgps.c @@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(nrf_cloud_pgps, CONFIG_NRF_CLOUD_GPS_LOG_LEVEL); #include "nrf_cloud_pgps_utils.h" #include "nrf_cloud_codec_internal.h" -#define FORCE_HTTP_DL 0 /* set to 1 to force HTTP instead of HTTPS */ +#define DOWNLOAD_PROTOCOL "https://" #define PGPS_DEBUG 0 /* set to 1 for extra logging */ #if defined(CONFIG_NRF_CLOUD_PGPS_PREDICTION_PERIOD_120_MIN) @@ -867,14 +867,18 @@ int nrf_cloud_pgps_process(const char *buf, size_t buf_len) int err; static char host[CONFIG_DOWNLOADER_MAX_HOSTNAME_SIZE]; static char path[CONFIG_DOWNLOADER_MAX_FILENAME_SIZE]; + size_t sz = strlen(DOWNLOAD_PROTOCOL); struct nrf_cloud_pgps_result pgps_dl = { - .host = host, - .host_sz = sizeof(host), + .host = &host[sz], + .host_sz = sizeof(host) - sz, .path = path, .path_sz = sizeof(path) }; + /* Include protocol so downloader does not issue a warning. */ + strncpy(host, DOWNLOAD_PROTOCOL, sz + 1); + #if defined(CONFIG_NRF_CLOUD_MQTT) LOG_HEXDUMP_DBG(buf, buf_len, "MQTT packet"); #endif @@ -888,6 +892,9 @@ int nrf_cloud_pgps_process(const char *buf, size_t buf_len) return err; } + /* Point to start of full host name including protocol. */ + pgps_dl.host = host; + return nrf_cloud_pgps_update(&pgps_dl); } @@ -918,14 +925,6 @@ int nrf_cloud_pgps_update(struct nrf_cloud_pgps_result *file_location) int sec_tag = nrf_cloud_sec_tag_get(); - if (FORCE_HTTP_DL && (strncmp(file_location->host, "https", 5) == 0)) { - memmove(&file_location->host[4], - &file_location->host[5], - strlen(&file_location->host[4])); - - sec_tag = -1; - } - err = npgps_download_start(file_location->host, file_location->path, sec_tag, 0, FRAGMENT_SIZE);