diff --git a/.checkpatch.conf b/.checkpatch.conf index 3248690b08e8..df7e0f87c00a 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -5,7 +5,6 @@ --min-conf-desc-length=1 --typedefsfile=scripts/checkpatch/typedefsfile ---ignore BRACES --ignore PRINTK_WITHOUT_KERN_LEVEL --ignore SPLIT_STRING --ignore VOLATILE diff --git a/.github/workflows/docbuild.yml b/.github/workflows/docbuild.yml index fa243cd0eac5..a98893bc4e7a 100644 --- a/.github/workflows/docbuild.yml +++ b/.github/workflows/docbuild.yml @@ -147,7 +147,7 @@ jobs: for docset in "${DOXYGEN[@]}"; do OUTDIR=doc/_build/html-doxygen/$docset-apis - mv doc/_build/html/$docset "$OUTDIR" + mv doc/_build/html/$docset/html "$OUTDIR" # Populate custom.properties, tags.yml cp doc/_zoomin/$docset.apis.custom.properties "$OUTDIR/custom.properties" diff --git a/CODEOWNERS b/CODEOWNERS index 5b57bc5493a2..8a4bcec1bb53 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -346,7 +346,6 @@ /include/net/download_client* @nrfconnect/ncs-modem /include/net/downloader* @nrfconnect/ncs-modem /include/net/nrf_cloud_* @nrfconnect/ncs-nrf-cloud -/include/net/wifi_credentials.h @nrfconnect/ncs-cia /include/nfc/ @nrfconnect/ncs-co-drivers @nrfconnect/ncs-si-muffin /include/nrf_compress/ @nordicjm /include/nrf_rpc/ @nrfconnect/ncs-co-drivers @nrfconnect/ncs-si-muffin @@ -760,7 +759,6 @@ /subsys/net/lib/nrf_cloud/ @nrfconnect/ncs-nrf-cloud /subsys/net/lib/nrf_provisioning/ @nrfconnect/ncs-iot-oulu /subsys/net/lib/zzhc/ @junqingzou -/subsys/net/lib/wifi_credentials/ @nrfconnect/ncs-cia /subsys/net/lib/softap_wifi_provision/ @nrfconnect/ncs-cia /subsys/net/openthread/ @nrfconnect/ncs-co-networking @nrfconnect/ncs-thread /subsys/net/openthread/rpc/ @nrfconnect/ncs-protocols-serialization @@ -870,7 +868,6 @@ /tests/subsys/net/lib/mqtt_helper/ @nrfconnect/ncs-cia /tests/subsys/net/lib/nrf_cloud/ @nrfconnect/ncs-nrf-cloud /tests/subsys/net/lib/nrf_provisioning/ @nrfconnect/ncs-iot-oulu -/tests/subsys/net/lib/wifi_credentials*/ @nrfconnect/ncs-cia /tests/subsys/net/openthread/rpc/ @nrfconnect/ncs-protocols-serialization /tests/subsys/nfc/rpc/ @nrfconnect/ncs-protocols-serialization /tests/subsys/nrf_compress/ @nordicjm diff --git a/Kconfig.nrf b/Kconfig.nrf index 8b6e648b2f3d..eb8b5e73dc6b 100644 --- a/Kconfig.nrf +++ b/Kconfig.nrf @@ -113,6 +113,12 @@ config FLASH_SIZE default 1524 endif +config NRF_SECURITY_ENABLER + def_bool y + imply NRF_SECURITY if BT_CRYPTO || BT_HOST_CRYPTO || BT_MESH_USES_MBEDTLS_PSA || BT_FAST_PAIR_CRYPTO_PSA + imply ENTROPY_GENERATOR if BOARD_NATIVE_SIM + imply PSA_WANT_GENERATE_RANDOM if BT_HOST_CRYPTO_PRNG + depends on !SOC_NRF5340_CPUNET rsource "samples/Kconfig" rsource "subsys/Kconfig" diff --git a/applications/asset_tracker_v2/overlay-lwm2m.conf b/applications/asset_tracker_v2/overlay-lwm2m.conf index a66f4292aaf1..b15f97e6d4fb 100644 --- a/applications/asset_tracker_v2/overlay-lwm2m.conf +++ b/applications/asset_tracker_v2/overlay-lwm2m.conf @@ -13,6 +13,9 @@ CONFIG_LWM2M_RW_JSON_SUPPORT=n CONFIG_LWM2M_SECURITY_INSTANCE_COUNT=3 CONFIG_COAP_INIT_ACK_TIMEOUT_MS=4000 CONFIG_BASE64=y +CONFIG_POSIX_API=y +CONFIG_ZVFS_EVENTFD=y +CONFIG_ZVFS_EVENTFD_MAX=2 # Transmission buffers. CONFIG_LWM2M_ENGINE_MAX_OBSERVER=5 diff --git a/applications/connectivity_bridge/boards/thingy91_nrf52840.conf b/applications/connectivity_bridge/boards/thingy91_nrf52840.conf index 4efb654d4314..062efe231a62 100644 --- a/applications/connectivity_bridge/boards/thingy91_nrf52840.conf +++ b/applications/connectivity_bridge/boards/thingy91_nrf52840.conf @@ -17,7 +17,6 @@ CONFIG_BT_BUF_ACL_RX_SIZE=251 CONFIG_BT_NUS=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_SMP=y -CONFIG_BT_CTLR=y CONFIG_BT_CTLR_RX_BUFFERS=10 CONFIG_BT_BUF_ACL_TX_COUNT=10 CONFIG_BT_BUF_ACL_TX_SIZE=251 diff --git a/applications/connectivity_bridge/src/modules/ble_handler.c b/applications/connectivity_bridge/src/modules/ble_handler.c index 6359561519d4..227956f41f59 100644 --- a/applications/connectivity_bridge/src/modules/ble_handler.c +++ b/applications/connectivity_bridge/src/modules/ble_handler.c @@ -222,7 +222,7 @@ static void adv_start(void) err = bt_le_adv_start( BT_LE_ADV_PARAM( - BT_LE_ADV_OPT_CONNECTABLE, + BT_LE_ADV_OPT_CONN, BT_GAP_ADV_SLOW_INT_MIN, BT_GAP_ADV_SLOW_INT_MAX, NULL), diff --git a/applications/machine_learning/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf b/applications/machine_learning/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf index f280710d4b39..04646b8473f2 100644 --- a/applications/machine_learning/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf +++ b/applications/machine_learning/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf @@ -53,6 +53,7 @@ CONFIG_USB_CDC_ACM=y CONFIG_CBPRINTF_NANO=y CONFIG_TIMESLICING=n CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n CONFIG_CONSOLE=n CONFIG_CONSOLE_HANDLER=n CONFIG_UART_CONSOLE=n diff --git a/applications/matter_bridge/boards/nrf5340dk_nrf5340_cpuapp.overlay b/applications/matter_bridge/boards/nrf5340dk_nrf5340_cpuapp.overlay index d941f278a4d7..a9a324ae42ac 100644 --- a/applications/matter_bridge/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/applications/matter_bridge/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -12,11 +12,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/applications/matter_weather_station/app.overlay b/applications/matter_weather_station/app.overlay index 6ad93e4cb38d..3850c2657e65 100644 --- a/applications/matter_weather_station/app.overlay +++ b/applications/matter_weather_station/app.overlay @@ -65,11 +65,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - &i2c1 { bme688@76 { compatible = "bosch,bme680"; diff --git a/applications/nrf5340_audio/Kconfig b/applications/nrf5340_audio/Kconfig index ba8552c498e5..6997b4fb3806 100644 --- a/applications/nrf5340_audio/Kconfig +++ b/applications/nrf5340_audio/Kconfig @@ -39,24 +39,6 @@ config TRANSPORT_CIS endchoice #----------------------------------------------------------------------------# -if (TRANSPORT_BIS && AUDIO_DEV = 1) -rsource "broadcast_sink/Kconfig.defaults" -endif # TRANSPORT_BIS && AUDIO_DEV = 1 - -if (TRANSPORT_BIS && AUDIO_DEV = 2) -rsource "broadcast_source/Kconfig.defaults" -endif # TRANSPORT_BIS && AUDIO_DEV = 2 - -if (TRANSPORT_CIS && AUDIO_DEV = 1) -rsource "unicast_server/Kconfig.defaults" -endif # TRANSPORT_CIS && AUDIO_DEV = 1 - -if (TRANSPORT_CIS && AUDIO_DEV = 2) -rsource "unicast_client/Kconfig.defaults" -endif # TRANSPORT_CIS && AUDIO_DEV = 2 - - - rsource "Kconfig.defaults" rsource "src/audio/Kconfig" rsource "src/bluetooth/Kconfig" diff --git a/applications/nrf5340_audio/broadcast_sink/Kconfig.defaults b/applications/nrf5340_audio/broadcast_sink/Kconfig.defaults deleted file mode 100644 index 3dcf65b596b3..000000000000 --- a/applications/nrf5340_audio/broadcast_sink/Kconfig.defaults +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -## ACL related configs ## -config BT_OBSERVER - default y - -config BT_PERIPHERAL - default y - -config BT_BUF_ACL_TX_COUNT - default 18 - -config BT_CAP_ACCEPTOR - default y if BT_AUDIO_SCAN_DELEGATOR - select BT_CSIP_SET_MEMBER - select BT_CAP_ACCEPTOR_SET_MEMBER - select BT_GAP_PERIPHERAL_PREF_PARAMS - select BT_VCP_VOL_REND - -config BT_PERIPHERAL_PREF_MIN_INT - default 64 - -config BT_PERIPHERAL_PREF_MAX_INT - default 69 - -config BT_PERIPHERAL_PREF_LATENCY - default 0 - -config BT_PERIPHERAL_PREF_TIMEOUT - default 200 - -# Generic Audio Sink - 0x0840 -config BT_DEVICE_APPEARANCE - default 2112 - -config BT_PER_ADV_SYNC_MAX - default 2 - -config BT_SMP - default y - - -## ISO related configs ## -config BT_ISO_SYNC_RECEIVER - default y - -config BT_BAP_BROADCAST_SINK - default y - -config BT_BAP_SCAN_DELEGATOR - default y - -config BT_BAP_BROADCAST_SNK_STREAM_COUNT - default 2 - -config BT_BAP_BROADCAST_SNK_COUNT - default 2 - -config BT_ISO_MAX_CHAN - default 2 - -config BT_ISO_MAX_BIG - default 2 - -config BT_AUDIO_RX - default y - -config BT_PER_ADV_SYNC_TRANSFER_RECEIVER - default y if BT_AUDIO_SCAN_DELEGATOR - select SETTINGS - select BT_SETTINGS - select FLASH - select FLASH_MAP - select NVS - -config NVS_LOG_LEVEL - default 2 - -config BT_DEVICE_NAME - default "NRF5340_BIS_HEADSET" - -## PACS related configs ## -config BT_PAC_SNK_NOTIFIABLE - default y - -config BT_PAC_SNK - default y - -config BT_PAC_SRC_NOTIFIABLE - default y - -config BT_PAC_SRC - default y - -## Audio related configs ## -config AUDIO_MUTE - default n - -config AUDIO_TEST_TONE - default n - - -## LC3 related configs ## -config LC3_DEC_CHAN_MAX - default 1 diff --git a/applications/nrf5340_audio/broadcast_sink/overlay-broadcast_sink.conf b/applications/nrf5340_audio/broadcast_sink/overlay-broadcast_sink.conf new file mode 100644 index 000000000000..e18101ba7865 --- /dev/null +++ b/applications/nrf5340_audio/broadcast_sink/overlay-broadcast_sink.conf @@ -0,0 +1,66 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_TRANSPORT_BIS=y + +## ACL related configs ## +CONFIG_BT_OBSERVER=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_SMP=y +CONFIG_BT_AUDIO=y +CONFIG_BT_GATT_DYNAMIC_DB=y +CONFIG_BT_GATT_CACHING=n + +CONFIG_SETTINGS=y +CONFIG_BT_SETTINGS=y +CONFIG_FLASH=y +CONFIG_FLASH_MAP=y +CONFIG_NVS=y + +CONFIG_BT_BUF_ACL_TX_COUNT=18 + +CONFIG_BT_CAP_ACCEPTOR=y +CONFIG_BT_CSIP_SET_MEMBER=y +CONFIG_BT_CAP_ACCEPTOR_SET_MEMBER=y +CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y +CONFIG_BT_VCP_VOL_REND=y + +CONFIG_BT_PERIPHERAL_PREF_MIN_INT=64 +CONFIG_BT_PERIPHERAL_PREF_MAX_INT=69 +CONFIG_BT_PERIPHERAL_PREF_LATENCY=0 +CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=200 + +# Generic Audio Sink - 0x0840 +CONFIG_BT_DEVICE_APPEARANCE=2112 +CONFIG_BT_PER_ADV_SYNC_MAX=2 + +## ISO related configs ## +CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT=2 +CONFIG_BT_BAP_BROADCAST_SNK_COUNT=2 +CONFIG_BT_ISO_MAX_CHAN=2 +CONFIG_BT_ISO_MAX_BIG=2 + +CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=y + +## PACS related configs ## +CONFIG_BT_PAC_SNK_NOTIFIABLE=y +CONFIG_BT_PAC_SNK=y +CONFIG_BT_PAC_SRC_NOTIFIABLE=y +CONFIG_BT_PAC_SRC=y + +## Audio related configs ## +CONFIG_AUDIO_MUTE=n +CONFIG_AUDIO_TEST_TONE=n + +CONFIG_BT_ISO_SYNC_RECEIVER=y +CONFIG_BT_BAP_SCAN_DELEGATOR=y +CONFIG_BT_BAP_BROADCAST_SINK=y + +## LC3 related configs ## +CONFIG_LC3_DEC_CHAN_MAX=1 + + + diff --git a/applications/nrf5340_audio/broadcast_source/overlay-broadcast_source.conf b/applications/nrf5340_audio/broadcast_source/overlay-broadcast_source.conf new file mode 100644 index 000000000000..814436987c20 --- /dev/null +++ b/applications/nrf5340_audio/broadcast_source/overlay-broadcast_source.conf @@ -0,0 +1,27 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_TRANSPORT_BIS=y + +CONFIG_BT_CAP_INITIATOR=y +CONFIG_BT_AUDIO=y + +CONFIG_BT_DEVICE_APPEARANCE=2181 + +CONFIG_BT_ISO_BROADCASTER=y + +CONFIG_BT_BAP_BROADCAST_SOURCE=y + +CONFIG_BT_ISO_TX_BUF_COUNT=2 + +CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT=2 + +CONFIG_BT_ISO_MAX_CHAN=2 + +CONFIG_BT_ISO_MAX_BIG=2 + +CONFIG_LC3_ENC_CHAN_MAX=2 +CONFIG_ENTROPY_GENERATOR=y diff --git a/applications/nrf5340_audio/prj.conf b/applications/nrf5340_audio/prj.conf index b1dc911a59a3..0b3b57fce736 100644 --- a/applications/nrf5340_audio/prj.conf +++ b/applications/nrf5340_audio/prj.conf @@ -17,6 +17,7 @@ CONFIG_STACK_USAGE=y CONFIG_THREAD_RUNTIME_STATS=y CONFIG_STACK_SENTINEL=y CONFIG_INIT_STACKS=y +CONFIG_BT=y # Uart driver CONFIG_SERIAL=y diff --git a/applications/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h b/applications/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h index 302eca3198a2..e0263d9e3469 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h +++ b/applications/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.h @@ -16,13 +16,12 @@ CONFIG_BLE_ACL_EXT_ADV_INT_MIN, CONFIG_BLE_ACL_EXT_ADV_INT_MAX, NULL) #define LE_AUDIO_EXTENDED_ADV_CONN_NAME \ - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONNECTABLE | \ - BT_LE_ADV_OPT_USE_NAME, \ + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME, \ CONFIG_BLE_ACL_EXT_ADV_INT_MIN, CONFIG_BLE_ACL_EXT_ADV_INT_MAX, NULL) #define LE_AUDIO_EXTENDED_ADV_CONN_NAME_FILTER \ - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONNECTABLE | \ - BT_LE_ADV_OPT_USE_NAME | BT_LE_ADV_OPT_FILTER_CONN, \ + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME | \ + BT_LE_ADV_OPT_FILTER_CONN, \ CONFIG_BLE_ACL_EXT_ADV_INT_MIN, CONFIG_BLE_ACL_EXT_ADV_INT_MAX, NULL) #define LE_AUDIO_PERIODIC_ADV \ @@ -30,8 +29,8 @@ BT_LE_PER_ADV_OPT_NONE) #define BT_LE_ADV_FAST_CONN \ - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, BT_GAP_ADV_FAST_INT_MIN_1, \ - BT_GAP_ADV_FAST_INT_MAX_1, NULL) + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_1, BT_GAP_ADV_FAST_INT_MAX_1, \ + NULL) /* Broadcast name can be max 32 bytes long, so this will be the limit for both. * Add one for '\0' at the end. diff --git a/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c b/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c index a6bece89c988..d87f20cc9d4d 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c +++ b/applications/nrf5340_audio/src/bluetooth/bt_management/dfu/bt_mgmt_dfu.c @@ -36,7 +36,7 @@ static void smp_adv(void) { int ret; - ret = bt_le_adv_start(BT_LE_ADV_CONN, ad_peer, ARRAY_SIZE(ad_peer), sd_peer, + ret = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad_peer, ARRAY_SIZE(ad_peer), sd_peer, ARRAY_SIZE(sd_peer)); if (ret) { LOG_ERR("SMP_SVR Advertising failed to start (ret %d)", ret); diff --git a/applications/nrf5340_audio/src/bluetooth/bt_management/scanning/bt_mgmt_scan_for_broadcast.c b/applications/nrf5340_audio/src/bluetooth/bt_management/scanning/bt_mgmt_scan_for_broadcast.c index 351162269e57..cce523a97eba 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_management/scanning/bt_mgmt_scan_for_broadcast.c +++ b/applications/nrf5340_audio/src/bluetooth/bt_management/scanning/bt_mgmt_scan_for_broadcast.c @@ -425,7 +425,7 @@ void bt_mgmt_broadcast_code_ptr_get(uint8_t **broadcast_code_ptr) void bt_mgmt_scan_delegator_init(void) { if (!scan_dlg_cb_registered) { - bt_bap_scan_delegator_register_cb(&scan_delegator_cbs); + bt_bap_scan_delegator_register(&scan_delegator_cbs); scan_dlg_cb_registered = true; } diff --git a/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_source.c b/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_source.c index 1dd9d7d50594..4d3134032c4b 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_source.c +++ b/applications/nrf5340_audio/src/bluetooth/bt_stream/broadcast/broadcast_source.c @@ -51,6 +51,7 @@ static struct bt_bap_lc3_preset lc3_preset = BT_BAP_LC3_BROADCAST_PRESET_NRF5340 static bool initialized; static bool delete_broadcast_src[CONFIG_BT_ISO_MAX_BIG]; +static uint32_t stored_broadcast_id; static int metadata_u8_add(uint8_t buffer[], uint8_t *index, uint8_t type, uint8_t value) { @@ -263,14 +264,15 @@ int broadcast_source_ext_adv_populate(uint8_t big_index, bool fixed_id, uint32_t if (!fixed_id) { /* Use a random broadcast ID */ - ret = bt_cap_initiator_broadcast_get_id(broadcast_sources[big_index], - &broadcast_id); + ret = bt_rand(&broadcast_id, BT_AUDIO_BROADCAST_ID_SIZE); if (ret) { - LOG_ERR("Unable to get broadcast ID: %d", ret); + LOG_WRN("Unable to generate broadcast ID: %d\n", ret); return ret; } } + stored_broadcast_id = broadcast_id; + sys_put_le16(BT_UUID_BROADCAST_AUDIO_VAL, ext_adv_data->brdcst_id_buf); sys_put_le24(broadcast_id, &ext_adv_data->brdcst_id_buf[BROADCAST_SOURCE_ADV_ID_START]); @@ -596,8 +598,6 @@ static uint8_t audio_map_location_get(struct bt_bap_stream *bap_stream) int broadcast_source_id_get(uint8_t big_index, uint32_t *broadcast_id) { - int ret; - if (big_index >= CONFIG_BT_ISO_MAX_BIG) { LOG_ERR("Failed to get broadcast ID for BIG %d out of %d", big_index, CONFIG_BT_ISO_MAX_BIG); @@ -614,11 +614,7 @@ int broadcast_source_id_get(uint8_t big_index, uint32_t *broadcast_id) return -EINVAL; } - ret = bt_cap_initiator_broadcast_get_id(broadcast_sources[big_index], broadcast_id); - if (ret) { - LOG_ERR("Unable to get broadcast ID: %d", ret); - return ret; - } + *broadcast_id = stored_broadcast_id; return 0; } diff --git a/applications/nrf5340_audio/src/bluetooth/bt_stream/le_audio.h b/applications/nrf5340_audio/src/bluetooth/bt_stream/le_audio.h index 658a947aa0b1..d578d5bca598 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_stream/le_audio.h +++ b/applications/nrf5340_audio/src/bluetooth/bt_stream/le_audio.h @@ -36,10 +36,10 @@ BT_AUDIO_CODEC_CFG_DURATION_10, _loc, \ LE_AUDIO_SDU_SIZE_OCTETS(_bitrate), 1, \ _stream_context), \ - BT_AUDIO_CODEC_QOS_UNFRAMED(10000u, LE_AUDIO_SDU_SIZE_OCTETS(_bitrate), \ - CONFIG_BT_AUDIO_RETRANSMITS, \ - CONFIG_BT_AUDIO_MAX_TRANSPORT_LATENCY_MS, \ - CONFIG_BT_AUDIO_PRESENTATION_DELAY_US)) + BT_BAP_QOS_CFG_UNFRAMED(10000u, LE_AUDIO_SDU_SIZE_OCTETS(_bitrate), \ + CONFIG_BT_AUDIO_RETRANSMITS, \ + CONFIG_BT_AUDIO_MAX_TRANSPORT_LATENCY_MS, \ + CONFIG_BT_AUDIO_PRESENTATION_DELAY_US)) /** * @brief Callback for receiving Bluetooth LE Audio data. diff --git a/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/Kconfig.defaults b/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/Kconfig.defaults index cbeaf9b90bf9..fd607265d15d 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/Kconfig.defaults +++ b/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/Kconfig.defaults @@ -55,6 +55,3 @@ config NVS config NVS_LOG_LEVEL default 2 - -config BT_ASCS_MAX_ASE_SRC_COUNT - default 1 diff --git a/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_client.c b/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_client.c index 26aabe4b25fb..e98330a844fc 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_client.c +++ b/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_client.c @@ -1112,7 +1112,7 @@ static void check_and_update_pd_in_group(struct stream_index idx, uint32_t new_p } static void stream_configured_cb(struct bt_bap_stream *stream, - const struct bt_audio_codec_qos_pref *pref) + const struct bt_bap_qos_cfg_pref *pref) { int ret; uint32_t new_pres_dly_us; diff --git a/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_server.c b/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_server.c index 01323fa6b67d..2b90e87d7f9b 100644 --- a/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_server.c +++ b/applications/nrf5340_audio/src/bluetooth/bt_stream/unicast/unicast_server.c @@ -138,7 +138,7 @@ static enum bt_audio_dir caps_dirs[] = { #endif /* (CONFIG_BT_AUDIO_TX) */ }; -static const struct bt_audio_codec_qos_pref qos_pref = BT_AUDIO_CODEC_QOS_PREF( +static const struct bt_bap_qos_cfg_pref qos_pref = BT_BAP_QOS_CFG_PREF( true, BT_GAP_LE_PHY_2M, CONFIG_BT_AUDIO_RETRANSMITS, BLE_ISO_LATENCY_MS, CONFIG_AUDIO_MIN_PRES_DLY_US, CONFIG_AUDIO_MAX_PRES_DLY_US, CONFIG_BT_AUDIO_PREFERRED_MIN_PRES_DLY_US, CONFIG_BT_AUDIO_PREFERRED_MAX_PRES_DLY_US); @@ -168,7 +168,7 @@ BUILD_ASSERT(CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT <= 1, static int lc3_config_cb(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec, struct bt_bap_stream **stream, - struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp) + struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp) { int ret; LOG_DBG("LC3 config callback"); @@ -224,14 +224,14 @@ static int lc3_config_cb(struct bt_conn *conn, const struct bt_bap_ep *ep, enum static int lc3_reconfig_cb(struct bt_bap_stream *stream, enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec, - struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp) + struct bt_bap_qos_cfg_pref *const pref, struct bt_bap_ascs_rsp *rsp) { LOG_DBG("ASE Codec Reconfig: stream %p", (void *)stream); return 0; } -static int lc3_qos_cb(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos, +static int lc3_qos_cb(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos, struct bt_bap_ascs_rsp *rsp) { enum bt_audio_dir dir; diff --git a/applications/nrf5340_audio/tools/buildprog/buildprog.py b/applications/nrf5340_audio/tools/buildprog/buildprog.py index 5b954aff1a23..ee18c2c44ce7 100644 --- a/applications/nrf5340_audio/tools/buildprog/buildprog.py +++ b/applications/nrf5340_audio/tools/buildprog/buildprog.py @@ -27,6 +27,7 @@ AudioDevice, SelectFlags, Core, + Transport, ) from program import program_threads_run @@ -45,6 +46,11 @@ TARGET_DEV_HEADSET_FOLDER = NRF5340_AUDIO_FOLDER / "build/dev_headset" TARGET_DEV_GATEWAY_FOLDER = NRF5340_AUDIO_FOLDER / "build/dev_gateway" +UNICAST_SERVER_OVERLAY = NRF5340_AUDIO_FOLDER / "unicast_server/overlay-unicast_server.conf" +UNICAST_CLIENT_OVERLAY = NRF5340_AUDIO_FOLDER / "unicast_client/overlay-unicast_client.conf" +BROADCAST_SINK_OVERLAY = NRF5340_AUDIO_FOLDER / "broadcast_sink/overlay-broadcast_sink.conf" +BROADCAST_SOURCE_OVERLAY = NRF5340_AUDIO_FOLDER / "broadcast_source/overlay-broadcast_source.conf" + TARGET_RELEASE_FOLDER = "build_release" TARGET_DEBUG_FOLDER = "build_debug" @@ -130,16 +136,26 @@ def __build_cmd_get(cores: Core, device: AudioDevice, build: BuildType, user_specific_bt_name = ( "AUDIO_DEV_" + getpass.getuser())[:MAX_USER_NAME_LEN].upper() device_flag += " -DCONFIG_BT_DEVICE_NAME=\\\"" + user_specific_bt_name + "\\\"" + if options.transport == Transport.broadcast.name: + if device == AudioDevice.headset: + overlay_flag = (f" -DEXTRA_CONF_FILE={BROADCAST_SINK_OVERLAY}") + elif device == AudioDevice.gateway: + overlay_flag = (f" -DEXTRA_CONF_FILE={BROADCAST_SOURCE_OVERLAY}") + elif options.transport == Transport.unicast.name: + if device == AudioDevice.headset: + overlay_flag = (f" -DEXTRA_CONF_FILE={UNICAST_SERVER_OVERLAY}") + elif device == AudioDevice.gateway: + overlay_flag = (f" -DEXTRA_CONF_FILE={UNICAST_CLIENT_OVERLAY}") if os.name == 'nt': release_flag = release_flag.replace('\\', '/') if pristine: build_cmd += " -p" - return build_cmd, dest_folder, device_flag, release_flag + return build_cmd, dest_folder, device_flag, release_flag, overlay_flag def __build_module(build_config, options): - build_cmd, dest_folder, device_flag, release_flag = __build_cmd_get( + build_cmd, dest_folder, device_flag, release_flag, overlay_flag = __build_cmd_get( build_config.core, build_config.device, build_config.build, @@ -153,7 +169,7 @@ def __build_module(build_config, options): # Only add compiler flags if folder doesn't exist already if not dest_folder.exists(): - west_str = west_str + device_flag + release_flag + west_str = west_str + device_flag + release_flag + overlay_flag print("Run: " + west_str) @@ -180,7 +196,7 @@ def __find_snr(): def __populate_hex_paths(dev, options): """Poplulate hex paths where relevant""" - _, temp_dest_folder, _, _ = __build_cmd_get( + _, temp_dest_folder, _, _, _ = __build_cmd_get( Core.app, dev.nrf5340_audio_dk_dev, options.build, options.pristine, options ) @@ -293,6 +309,14 @@ def __main(): help="Set to generate a user specific Bluetooth device name.\ Note that this will put the computer user name on air in clear text", ) + parser.add_argument( + "-t", + "--transport", + type=str, + choices=[i.name for i in Transport], + default=Transport.unicast.name, + help="Select the transport type", + ) options = parser.parse_args(args=sys.argv[1:]) diff --git a/applications/nrf5340_audio/tools/buildprog/nrf5340_audio_dk_devices.py b/applications/nrf5340_audio/tools/buildprog/nrf5340_audio_dk_devices.py index d550292c3ab7..638e5c28fd39 100644 --- a/applications/nrf5340_audio/tools/buildprog/nrf5340_audio_dk_devices.py +++ b/applications/nrf5340_audio/tools/buildprog/nrf5340_audio_dk_devices.py @@ -47,6 +47,11 @@ class Channel(Enum): right = 1 NA = auto() +class Transport(str, Enum): + """Transport type""" + broadcast = "broadcast" + unicast = "unicast" + @dataclass class DeviceConf: diff --git a/applications/nrf5340_audio/unicast_client/Kconfig.defaults b/applications/nrf5340_audio/unicast_client/Kconfig.defaults deleted file mode 100644 index 99f22f3f64e6..000000000000 --- a/applications/nrf5340_audio/unicast_client/Kconfig.defaults +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -config UTF8 - default y - -## ACL related configs ## -config BT_MAX_CONN - default 2 - -# Generic Audio Source - 0x0880 -config BT_DEVICE_APPEARANCE - default 2176 - -config BT_MAX_PAIRED - default 2 - -config BT_GATT_DYNAMIC_DB - default y - - -## ISO related configs ## -config BT_ISO_MAX_CHAN - default 4 - -config BT_BAP_UNICAST - default y - -config BT_BAP_UNICAST_CLIENT - default y - -config BT_CAP_INITIATOR - default y - -config BT_CSIP_SET_COORDINATOR - default y - -config BT_ISO_TX_BUF_COUNT - default 2 - -config BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT - default 4 - -config BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT - default 2 - -config BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT - default 2 - -config BT_VCP_VOL_CTLR - default y - -config BT_MCS - default y - -config BT_MPL - default y - -config MCTL - default y - -config MCTL_LOCAL_PLAYER_CONTROL - default y - -config MCTL_LOCAL_PLAYER_REMOTE_CONTROL - default y - - -## LC3 related configs ## -config LC3_BITRATE - default BT_AUDIO_BITRATE_UNICAST_SINK - -config LC3_ENC_CHAN_MAX - default 2 - -config LC3_DEC_CHAN_MAX - default 1 diff --git a/applications/nrf5340_audio/unicast_client/overlay-unicast_client.conf b/applications/nrf5340_audio/unicast_client/overlay-unicast_client.conf new file mode 100644 index 000000000000..36c6c85696d2 --- /dev/null +++ b/applications/nrf5340_audio/unicast_client/overlay-unicast_client.conf @@ -0,0 +1,42 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + +CONFIG_BT_CENTRAL=y + +CONFIG_BT_GATT_DYNAMIC_DB=y +CONFIG_BT_GATT_CLIENT=y +CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y +CONFIG_BT_GATT_AUTO_UPDATE_MTU=y +CONFIG_BT_GATT_CACHING=n +CONFIG_BT_MAX_CONN=2 +CONFIG_BT_MAX_PAIRED=2 +CONFIG_BT_EXT_ADV=y + +CONFIG_BT_AUDIO=y +CONFIG_BT_ISO_CENTRAL=y +CONFIG_BT_BAP_UNICAST_CLIENT=y +CONFIG_BT_CAP_INITIATOR=y +CONFIG_BT_CSIP_SET_COORDINATOR=y +CONFIG_BT_DEVICE_APPEARANCE=2176 + +CONFIG_BT_ISO_TX_BUF_COUNT=4 +# Support an ISO channel per ASE +CONFIG_BT_ISO_MAX_CHAN=4 +CONFIG_BT_VCP_VOL_CTLR=y +CONFIG_BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT=4 +CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT=2 +CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT=2 +CONFIG_BT_MCS=y +CONFIG_BT_MPL=y +CONFIG_UTF8=y +CONFIG_MCTL=y +CONFIG_MCTL_LOCAL_PLAYER_CONTROL=y +CONFIG_MCTL_LOCAL_PLAYER_REMOTE_CONTROL=y + +CONFIG_LC3_ENC_CHAN_MAX=2 +CONFIG_LC3_DEC_CHAN_MAX=1 +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_HEAP_SIZE=2048 diff --git a/applications/nrf5340_audio/unicast_server/Kconfig.defaults b/applications/nrf5340_audio/unicast_server/Kconfig.defaults deleted file mode 100644 index a8e785adda32..000000000000 --- a/applications/nrf5340_audio/unicast_server/Kconfig.defaults +++ /dev/null @@ -1,100 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -## ACL related configs ## -config BT_MAX_CONN - default 4 - -config BT_MAX_PAIRED - default 4 - -config BT_PERIPHERAL - default y - -config BT_GATT_AUTO_RESUBSCRIBE - default n - -config BT_GATT_AUTO_SEC_REQ - default n - - -## ISO related configs ## -config BT_ISO_PERIPHERAL - default y - -config BT_BAP_UNICAST - default y - -config BT_BAP_UNICAST_SERVER - default y - -config BT_ISO_MAX_CHAN - default 2 - -# Earbud - 0x0941 -config BT_DEVICE_APPEARANCE - default 2369 - -config BT_GAP_PERIPHERAL_PREF_PARAMS - default n - -config BT_ASCS - default y - -config BT_ASCS_MAX_ASE_SNK_COUNT - default 1 - -config BT_ASCS_MAX_ASE_SRC_COUNT - default 1 if STREAM_BIDIRECTIONAL - default 0 if !STREAM_BIDIRECTIONAL - -config BT_VCP_VOL_REND - default y - -config BT_MCC - default y - -config BT_MCC_READ_MEDIA_STATE - default y - -config BT_MCC_SET_MEDIA_CONTROL_POINT - default y - -# For fixing compatibility issue with Android 14 -config BT_PAC_SNK - default y - -config BT_PAC_SNK_NOTIFIABLE - default y - -config BT_PAC_SRC - default y - -config BT_PAC_SRC_NOTIFIABLE - default y - -config BT_CSIP_SET_MEMBER - default y - -config BT_CAP_ACCEPTOR - default y - -config BT_CAP_ACCEPTOR_SET_MEMBER - default y - -config BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE - default 25 - - -## LC3 related configs ## -config LC3_BITRATE - default BT_AUDIO_BITRATE_UNICAST_SRC - -config LC3_ENC_CHAN_MAX - default 1 - -config LC3_DEC_CHAN_MAX - default 1 diff --git a/applications/nrf5340_audio/unicast_server/overlay-unicast_server.conf b/applications/nrf5340_audio/unicast_server/overlay-unicast_server.conf new file mode 100644 index 000000000000..795f6113fec7 --- /dev/null +++ b/applications/nrf5340_audio/unicast_server/overlay-unicast_server.conf @@ -0,0 +1,48 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# + + +CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y +CONFIG_BT_GATT_AUTO_RESUBSCRIBE=n +CONFIG_BT_GATT_AUTO_SEC_REQ=n +CONFIG_BT_GATT_AUTO_UPDATE_MTU=y +CONFIG_BT_GATT_CACHING=n +CONFIG_BT_GATT_CLIENT=y +CONFIG_BT_GATT_DYNAMIC_DB=y + +CONFIG_BT_MAX_CONN=4 +CONFIG_BT_MAX_PAIRED=4 +CONFIG_BT_EXT_ADV=y + +CONFIG_BT_AUDIO=y + +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y +CONFIG_BT_BAP_UNICAST_SERVER=y +CONFIG_BT_CAP_ACCEPTOR=y +CONFIG_BT_CAP_ACCEPTOR_SET_MEMBER=y +CONFIG_BT_PAC_SNK=y +CONFIG_BT_PAC_SNK_NOTIFIABLE=y +CONFIG_BT_PAC_SRC=y +CONFIG_BT_PAC_SRC_NOTIFIABLE=y +CONFIG_BT_CSIP_SET_MEMBER=y +CONFIG_BT_DEVICE_APPEARANCE=2369 + +CONFIG_BT_ISO_MAX_CHAN=2 +CONFIG_BT_ASCS=y +CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=1 +CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=1 +CONFIG_BT_VCP_VOL_REND=y +CONFIG_BT_MCC=y +CONFIG_BT_MCC_READ_MEDIA_STATE=y +CONFIG_BT_MCC_SET_MEDIA_CONTROL_POINT=y +CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n +CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE=25 + +CONFIG_LC3_ENC_CHAN_MAX=1 +CONFIG_LC3_DEC_CHAN_MAX=1 +CONFIG_MBEDTLS_ENABLE_HEAP=y +CONFIG_MBEDTLS_HEAP_SIZE=2048 diff --git a/applications/nrf_desktop/Kconfig.ble b/applications/nrf_desktop/Kconfig.ble index 91db0c6b10ad..a2c484c5fa91 100644 --- a/applications/nrf_desktop/Kconfig.ble +++ b/applications/nrf_desktop/Kconfig.ble @@ -260,15 +260,7 @@ config BT_MAX_PAIRED endif # DESKTOP_BT_CENTRAL -if BT_CTLR - -choice BT_LL_CHOICE - default BT_LL_SOFTDEVICE - help - nRF Desktop devices should use the Softdevice controller by default. - Other controller variants may be used for resource-constrained - devices. -endchoice +if HAS_BT_CTLR choice BT_CTLR_TX_PWR default BT_CTLR_TX_PWR_0 @@ -282,7 +274,7 @@ config BT_CTLR_CONN_PARAM_REQ nRF Desktop devices disable support for the Connection Parameter Request feature as it is not needed. -endif # BT_CTLR +endif # HAS_BT_CTLR config BT_DEVICE_NAME default DESKTOP_DEVICE_PRODUCT diff --git a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/app.overlay b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/app.overlay index 692637514335..f03b07a3b244 100644 --- a/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/app.overlay +++ b/applications/nrf_desktop/configuration/nrf52840dongle_nrf52840/app.overlay @@ -8,7 +8,7 @@ / { chosen { - ncs,ble-qos-uart = &cdc_acm_uart; + ncs,ble-qos-uart = &board_cdc_acm_uart; }; /* Configure DTS nodes used for USB next HID support. */ @@ -38,6 +38,6 @@ num-isoout-endpoints = <0>; }; -&cdc_acm_uart { - status = "okay"; +&board_cdc_acm_uart { + status = "okay"; }; diff --git a/applications/serial_lte_modem/prj.conf b/applications/serial_lte_modem/prj.conf index 222c1d3acd9e..ab48c5c29683 100644 --- a/applications/serial_lte_modem/prj.conf +++ b/applications/serial_lte_modem/prj.conf @@ -28,6 +28,7 @@ CONFIG_NET_SOCKETS=y CONFIG_NET_NATIVE=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y +CONFIG_POSIX_API=y # Modem library CONFIG_NRF_MODEM_LIB=y diff --git a/applications/serial_lte_modem/src/gnss/slm_at_gnss.c b/applications/serial_lte_modem/src/gnss/slm_at_gnss.c index 3964d0ce3aa7..50852beb37cb 100644 --- a/applications/serial_lte_modem/src/gnss/slm_at_gnss.c +++ b/applications/serial_lte_modem/src/gnss/slm_at_gnss.c @@ -53,8 +53,6 @@ static struct modem_pipe *gnss_pipe; #define LOCATION_REPORT_MS 5000 -#define SEC_PER_HOUR (MIN_PER_HOUR * SEC_PER_MIN) -#define SEC_PER_DAY (HOUR_PER_DAY * SEC_PER_HOUR) /* (6.1.1980 UTC - 1.1.1970 UTC) */ #define GPS_TO_UNIX_UTC_OFFSET_SECONDS (315964800UL) /* UTC/GPS time offset as of 1st of January 2017. */ diff --git a/applications/serial_lte_modem/src/slm_at_commands.c b/applications/serial_lte_modem/src/slm_at_commands.c index f5c42d0b08b8..03f9cf0b1a49 100644 --- a/applications/serial_lte_modem/src/slm_at_commands.c +++ b/applications/serial_lte_modem/src/slm_at_commands.c @@ -81,7 +81,7 @@ enum sleep_modes { static struct { struct k_work_delayable work; uint32_t mode; -} sleep; +} sleep_data; #endif bool verify_datamode_control(uint16_t time_limit, uint16_t *time_limit_min); @@ -130,13 +130,13 @@ static int handle_at_slmver(enum at_parser_cmd_type cmd_type, struct at_parser * static void go_sleep_wk(struct k_work *) { - if (sleep.mode == SLEEP_MODE_IDLE) { + if (sleep_data.mode == SLEEP_MODE_IDLE) { if (slm_at_host_power_off() == 0) { slm_enter_idle(); } else { LOG_ERR("failed to power off UART"); } - } else if (sleep.mode == SLEEP_MODE_DEEP) { + } else if (sleep_data.mode == SLEEP_MODE_DEEP) { slm_enter_sleep(); } } @@ -148,12 +148,12 @@ static int handle_at_sleep(enum at_parser_cmd_type cmd_type, struct at_parser *p int ret = -EINVAL; if (cmd_type == AT_PARSER_CMD_TYPE_SET) { - ret = at_parser_num_get(parser, 1, &sleep.mode); + ret = at_parser_num_get(parser, 1, &sleep_data.mode); if (ret) { return -EINVAL; } - if (sleep.mode == SLEEP_MODE_DEEP || sleep.mode == SLEEP_MODE_IDLE) { - k_work_reschedule(&sleep.work, SLM_UART_RESPONSE_DELAY); + if (sleep_data.mode == SLEEP_MODE_DEEP || sleep_data.mode == SLEEP_MODE_IDLE) { + k_work_reschedule(&sleep_data.work, SLM_UART_RESPONSE_DELAY); } else { ret = -EINVAL; } @@ -376,7 +376,7 @@ int slm_at_init(void) int err; #if POWER_PIN_IS_ENABLED - k_work_init_delayable(&sleep.work, go_sleep_wk); + k_work_init_delayable(&sleep_data.work, go_sleep_wk); #endif err = slm_at_tcp_proxy_init(); diff --git a/boards/nordic/nrf52810dmouse/Kconfig.defconfig b/boards/nordic/nrf52810dmouse/Kconfig.defconfig index 2251139128e2..d9866927ec40 100644 --- a/boards/nordic/nrf52810dmouse/Kconfig.defconfig +++ b/boards/nordic/nrf52810dmouse/Kconfig.defconfig @@ -6,9 +6,6 @@ if BOARD_NRF52810DMOUSE -config BT_CTLR - default BT - config HW_STACK_PROTECTION default ARCH_HAS_STACK_PROTECTION diff --git a/boards/nordic/nrf52820dongle/Kconfig.defconfig b/boards/nordic/nrf52820dongle/Kconfig.defconfig index 5214f0a6a2b9..080649e904ba 100644 --- a/boards/nordic/nrf52820dongle/Kconfig.defconfig +++ b/boards/nordic/nrf52820dongle/Kconfig.defconfig @@ -6,9 +6,6 @@ if BOARD_NRF52820DONGLE -config BT_CTLR - default BT - config HW_STACK_PROTECTION default ARCH_HAS_STACK_PROTECTION diff --git a/boards/nordic/nrf52833dongle/Kconfig.defconfig b/boards/nordic/nrf52833dongle/Kconfig.defconfig index 80279a0fceab..8a810243637e 100644 --- a/boards/nordic/nrf52833dongle/Kconfig.defconfig +++ b/boards/nordic/nrf52833dongle/Kconfig.defconfig @@ -6,9 +6,6 @@ if BOARD_NRF52833DONGLE -config BT_CTLR - default BT - config HW_STACK_PROTECTION default ARCH_HAS_STACK_PROTECTION diff --git a/boards/nordic/nrf52840gmouse/Kconfig.defconfig b/boards/nordic/nrf52840gmouse/Kconfig.defconfig index 92dc9bebdd55..ee408f3124bb 100644 --- a/boards/nordic/nrf52840gmouse/Kconfig.defconfig +++ b/boards/nordic/nrf52840gmouse/Kconfig.defconfig @@ -13,9 +13,6 @@ config IEEE802154_NRF5 endif # IEEE802154 -config BT_CTLR - default BT - config HW_STACK_PROTECTION default ARCH_HAS_STACK_PROTECTION diff --git a/boards/nordic/nrf52dmouse/Kconfig.defconfig b/boards/nordic/nrf52dmouse/Kconfig.defconfig index b4f411bf315c..7f0b642c3006 100644 --- a/boards/nordic/nrf52dmouse/Kconfig.defconfig +++ b/boards/nordic/nrf52dmouse/Kconfig.defconfig @@ -6,9 +6,6 @@ if BOARD_NRF52DMOUSE -config BT_CTLR - default BT - config HW_STACK_PROTECTION default ARCH_HAS_STACK_PROTECTION diff --git a/boards/nordic/nrf52kbd/Kconfig.defconfig b/boards/nordic/nrf52kbd/Kconfig.defconfig index e70306c6515d..ad9ac577ebb7 100644 --- a/boards/nordic/nrf52kbd/Kconfig.defconfig +++ b/boards/nordic/nrf52kbd/Kconfig.defconfig @@ -6,9 +6,6 @@ if BOARD_NRF52KBD -config BT_CTLR - default BT - config HW_STACK_PROTECTION default ARCH_HAS_STACK_PROTECTION diff --git a/boards/nordic/thingy91x/Kconfig b/boards/nordic/thingy91x/Kconfig index 7fcd1cdc89dd..09c7f5197753 100644 --- a/boards/nordic/thingy91x/Kconfig +++ b/boards/nordic/thingy91x/Kconfig @@ -32,11 +32,6 @@ endif if BOARD_THINGY91X_NRF5340_CPUNET -# BT_CTLR depends on BT. When BT is enabled we should default to also -# enabling the controller. -config BT_CTLR - default y if BT - config BT_ECC default y if BT diff --git a/boards/nordic/thingy91x/Kconfig.defconfig.nrf5340 b/boards/nordic/thingy91x/Kconfig.defconfig.nrf5340 index f789488a53dc..d03191722bd4 100644 --- a/boards/nordic/thingy91x/Kconfig.defconfig.nrf5340 +++ b/boards/nordic/thingy91x/Kconfig.defconfig.nrf5340 @@ -75,13 +75,6 @@ endif # BOARD_THINGY91X_NRF5340_CPUAPP || BOARD_THINGY91X_NRF5340_CPUAPP_NS config MBOX_NRFX_IPC default MBOX -if BOARD_THINGY91X_NRF5340_CPUNET - -config BT_CTLR - default y if BT - -endif # BOARD_THINGY91X_NRF5340_CPUNET - config USE_SEGGER_RTT default y if BOARD_THINGY91X_NRF5340_CPUAPP || BOARD_THINGY91X_NRF5340_CPUAPP_NS || BOARD_THINGY91X_NRF5340_CPUNET diff --git a/boards/nordic/thingy91x/nrf5340_shared_sram_planning_conf.dts b/boards/nordic/thingy91x/nrf5340_shared_sram_planning_conf.dts deleted file mode 100644 index a3b9276ffd22..000000000000 --- a/boards/nordic/thingy91x/nrf5340_shared_sram_planning_conf.dts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2024 Nordic Semiconductor - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -/* Default shared SRAM planning when building for nRF5340. - * This file is included by both nRF5340 CPUAPP (Application MCU) - * and nRF5340 CPUNET (Network MCU). - * - 64 kB SRAM allocated as Shared memory (sram0_shared) - * - Region defined after the image SRAM of Application MCU - */ - -/ { - chosen { - /* shared memory reserved for the inter-processor communication */ - zephyr,ipc_shm = &sram0_shared; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - sram0_shared: memory@20070000 { - /* SRAM allocated to shared memory */ - reg = <0x20070000 0x10000>; - }; - }; -}; diff --git a/boards/nordic/thingy91x/thingy91x_common.dtsi b/boards/nordic/thingy91x/thingy91x_common.dtsi index 37ac05289e1d..a09acad0c1ff 100644 --- a/boards/nordic/thingy91x/thingy91x_common.dtsi +++ b/boards/nordic/thingy91x/thingy91x_common.dtsi @@ -83,7 +83,7 @@ /* Battery specs from LiPol LP803448 datasheet (Dwg. nr. FD_3245_70) */ term-microvolt = <4200000>; current-microamp = <675000>; /* 0.5C charging current */ - dischg-limit-microamp = <1340000>; /* Maximum value for PMIC */ + dischg-limit-microamp = <1000000>; /* Maximum value for PMIC */ thermistor-cold-millidegrees = <0>; thermistor-cool-millidegrees = <0>; thermistor-warm-millidegrees = <45000>; diff --git a/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_common.dts b/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_common.dts index 7358bb1948d4..d48cfd95f138 100644 --- a/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_common.dts +++ b/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_common.dts @@ -129,41 +129,9 @@ pinctrl-names = "default", "sleep"; }; +/* Include default memory partition configuration file. */ /* This is not the layout that's actually used! It's overridden by Partition Manager. */ -&flash0 { - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x00000000 0x00010000>; - }; - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 0x40000>; - }; - slot0_ns_partition: partition@50000 { - label = "image-0-nonsecure"; - reg = <0x00050000 0x30000>; - }; - slot1_partition: partition@80000 { - label = "image-1"; - reg = <0x00080000 0x40000>; - }; - slot1_ns_partition: partition@c0000 { - label = "image-1-nonsecure"; - reg = <0x000c0000 0x30000>; - }; - /* 0xf0000 to 0xf7fff reserved for TF-M partitions */ - storage_partition: partition@f8000 { - label = "storage"; - reg = <0x000f8000 0x00008000>; - }; - }; -}; +#include &ieee802154 { status = "okay"; @@ -178,30 +146,6 @@ zephyr_udc0: &usbd { }; }; -/ { - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - sram0_image: image@20000000 { - /* Zephyr image(s) memory */ - reg = <0x20000000 DT_SIZE_K(448)>; - }; - - sram0_s: image_s@20000000 { - /* Secure image memory */ - reg = <0x20000000 0x40000>; - }; - - sram0_ns: image_ns@20040000 { - /* Non-Secure image memory */ - reg = <0x20040000 0x30000>; - }; - }; -}; - / { sram0_ns@2007fc00 { compatible = "zephyr,memory-region", "mmio-sram"; @@ -239,6 +183,3 @@ zephyr_udc0: &usbd { zephyr,bt-c2h-uart = &rtt0; }; }; - -/* Include partition configuration file */ -#include "nrf5340_shared_sram_planning_conf.dts" diff --git a/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_ns.dts b/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_ns.dts index ed2b031bed46..37da30812a4d 100644 --- a/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_ns.dts +++ b/boards/nordic/thingy91x/thingy91x_nrf5340_cpuapp_ns.dts @@ -12,7 +12,7 @@ compatible = "nordic,nrf5340-dk-nrf5340-cpuapp"; chosen { - zephyr,sram = &sram0_ns; + zephyr,sram = &sram0_ns_app; zephyr,flash = &flash0; zephyr,code-partition = &slot0_ns_partition; zephyr,entropy = &psa_rng; diff --git a/boards/nordic/thingy91x/thingy91x_nrf5340_cpunet.dts b/boards/nordic/thingy91x/thingy91x_nrf5340_cpunet.dts index e61f83382c80..015b892b57ff 100644 --- a/boards/nordic/thingy91x/thingy91x_nrf5340_cpunet.dts +++ b/boards/nordic/thingy91x/thingy91x_nrf5340_cpunet.dts @@ -81,5 +81,5 @@ status = "okay"; }; -/* Include shared RAM configuration file */ -#include "nrf5340_shared_sram_planning_conf.dts" +/* Include default shared RAM configuration file */ +#include diff --git a/boards/nordic/thingy91x/thingy91x_nrf9151_common.dts b/boards/nordic/thingy91x/thingy91x_nrf9151_common.dts index b1b6b6a61222..69cf3fc7f59c 100644 --- a/boards/nordic/thingy91x/thingy91x_nrf9151_common.dts +++ b/boards/nordic/thingy91x/thingy91x_nrf9151_common.dts @@ -175,68 +175,6 @@ pinctrl-names = "default", "sleep"; }; +/* Include default memory partition configuration file. */ /* This is not the layout that's actually used! It's overridden by Partition Manager. */ -&flash0 { - /* - * For more information, see: - * http://docs.zephyrproject.org/devices/dts/flash_partitions.html - */ - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - boot_partition: partition@0 { - label = "mcuboot"; - reg = <0x00000000 0x10000>; - }; - slot0_partition: partition@10000 { - label = "image-0"; - reg = <0x00010000 0x30000>; - }; - slot0_ns_partition: partition@40000 { - label = "image-0-nonsecure"; - reg = <0x00040000 0x40000>; - }; - slot1_partition: partition@80000 { - label = "image-1"; - reg = <0x00080000 0x30000>; - }; - slot1_ns_partition: partition@b0000 { - label = "image-1-nonsecure"; - reg = <0x000b0000 0x40000>; - }; - scratch_partition: partition@f0000 { - label = "image-scratch"; - reg = <0x000f0000 0xa000>; - }; - storage_partition: partition@fa000 { - label = "storage"; - reg = <0x000fa000 0x00006000>; - }; - }; -}; - -/ { - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - - sram0_s: image_s@20000000 { - /* Secure image memory */ - reg = <0x20000000 DT_SIZE_K(64)>; - }; - - sram0_bsd: image_bsd@20010000 { - /* BSD (shared) memory */ - reg = <0x20010000 DT_SIZE_K(64)>; - }; - - sram0_ns: image_ns@20020000 { - /* Non-Secure image memory */ - reg = <0x20020000 DT_SIZE_K(128)>; - }; - }; -}; +#include diff --git a/boards/nordic/thingy91x/thingy91x_nrf9151_ns.dts b/boards/nordic/thingy91x/thingy91x_nrf9151_ns.dts index 419ae0a76eb0..7ba41da613ac 100644 --- a/boards/nordic/thingy91x/thingy91x_nrf9151_ns.dts +++ b/boards/nordic/thingy91x/thingy91x_nrf9151_ns.dts @@ -10,7 +10,7 @@ / { chosen { zephyr,flash = &flash0; - zephyr,sram = &sram0_ns; + zephyr,sram = &sram0_ns_app; zephyr,code-partition = &slot0_ns_partition; zephyr,wifi = &nordic_wlan0; }; diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index e60cd5ff2301..a2c1a5f9a256 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -74,13 +74,13 @@ file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR}) # function(add_doxygen_docset name sources version) cmake_parse_arguments(DOXYGEN "STANDALONE" "" "" ${ARGN}) - set(DOCSET_BUILD_DIR ${CMAKE_BINARY_DIR}/html) + set(DOCSET_BUILD_DIR ${CMAKE_BINARY_DIR}/html/${name}) set(DOCSET_SOURCE_BASE ${sources}) set(DOCSET_VERSION ${version}) if(NOT DOXYGEN_STANDALONE) set(SUFFIX "-doxygen") - set(DOCSET_BUILD_DIR ${DOCSET_BUILD_DIR}/${name}/doxygen) + set(DOCSET_BUILD_DIR ${DOCSET_BUILD_DIR}/doxygen) endif() configure_file(${CMAKE_CURRENT_LIST_DIR}/${name}/${name}.doxyfile.in ${CMAKE_BINARY_DIR}/${name}.doxyfile) diff --git a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_recovery.rst b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_recovery.rst index c1dab7cabbd4..d7482642b98f 100644 --- a/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_recovery.rst +++ b/doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_suit_recovery.rst @@ -125,7 +125,7 @@ To turn an application into a recovery application, the following steps have to * :kconfig:option:`CONFIG_SUIT_RECOVERY` set to ``y`` * :kconfig:option:`CONFIG_NRF_REGTOOL_GENERATE_UICR` set to ``n`` - * :kconfig:option:`CONFIG_NRF_REGTOOL_GENERATE_BICR` set to ``n`` + * :kconfig:option:`CONFIG_SOC_NRF54H20_GENERATE_BICR` set to ``n`` To do that you can simply paste the following code snippet into your configuration files: @@ -133,7 +133,7 @@ To turn an application into a recovery application, the following steps have to CONFIG_SUIT_RECOVERY=y CONFIG_NRF_REGTOOL_GENERATE_UICR=n - CONFIG_NRF_REGTOOL_GENERATE_BICR=n + CONFIG_SOC_NRF54H20_GENERATE_BICR=n #. Create the overlay files to be used by the recovery application. In this guide it is assumed that for the application core they are placed in the custom recovery application directory in the :file:`boards/nrf54h20dk_nrf54h20_cpuapp.overlay` file. diff --git a/doc/nrf/conf.py b/doc/nrf/conf.py index a054e2c25687..4f1ab3b4b12d 100644 --- a/doc/nrf/conf.py +++ b/doc/nrf/conf.py @@ -122,22 +122,28 @@ # -- Options for doxyrunner plugin --------------------------------------------- +_doxyrunner_outdir = utils.get_builddir() / "html" / "nrf" / "doxygen" + doxyrunner_doxygen = os.environ.get("DOXYGEN_EXECUTABLE", "doxygen") -doxyrunner_doxyfile = NRF_BASE / "doc" / "nrf" / "nrf.doxyfile.in" -doxyrunner_outdir = utils.get_builddir() / "html" / "nrf" / "doxygen" -doxyrunner_fmt = True -doxyrunner_fmt_vars = { - "NRF_BASE": str(NRF_BASE), - "DOCSET_SOURCE_BASE": str(NRF_BASE), - "DOCSET_BUILD_DIR": str(doxyrunner_outdir), - "DOCSET_VERSION": version, +doxyrunner_projects = { + "nrf": { + "doxyfile": NRF_BASE / "doc" / "nrf" / "nrf.doxyfile.in", + "outdir": _doxyrunner_outdir, + "fmt": True, + "fmt_vars": { + "NRF_BASE": str(NRF_BASE), + "DOCSET_SOURCE_BASE": str(NRF_BASE), + "DOCSET_BUILD_DIR": str(_doxyrunner_outdir), + "DOCSET_VERSION": version, + } + } } # create mbedtls config header (needed for Doxygen) -doxyrunner_outdir.mkdir(exist_ok=True, parents=True) +_doxyrunner_outdir.mkdir(exist_ok=True, parents=True) fin_path = NRF_BASE / "subsys" / "nrf_security" / "configs" / "legacy_crypto_config.h.template" -fout_path = doxyrunner_outdir / "mbedtls_doxygen_config.h" +fout_path = _doxyrunner_outdir / "mbedtls_doxygen_config.h" with open(fin_path) as fin, open(fout_path, "w") as fout: fout.write( @@ -150,7 +156,7 @@ # -- Options for doxybridge plugin --------------------------------------------- -doxybridge_dir = doxyrunner_outdir +doxybridge_projects = {"nrf": _doxyrunner_outdir} # Options for ncs_include ------------------------------------------------------ diff --git a/doc/nrf/libraries/networking/wifi_credentials.rst b/doc/nrf/libraries/networking/wifi_credentials.rst index 44141e62ad32..1fc4205cccf9 100644 --- a/doc/nrf/libraries/networking/wifi_credentials.rst +++ b/doc/nrf/libraries/networking/wifi_credentials.rst @@ -64,7 +64,7 @@ The library has the following limitations: API documentation ***************** -| Header file: :file:`include/net/wifi_credentials.h` +| Header file: :file:`include/zephyr/net/wifi_credentials.h` | Source files: :file:`subsys/net/lib/wifi_credentials` .. doxygengroup:: wifi_credentials diff --git a/doc/nrf/libraries/networking/wifi_mgmt_ext.rst b/doc/nrf/libraries/networking/wifi_mgmt_ext.rst index 48fe40d7ef7f..22397f9e27e7 100644 --- a/doc/nrf/libraries/networking/wifi_mgmt_ext.rst +++ b/doc/nrf/libraries/networking/wifi_mgmt_ext.rst @@ -53,15 +53,5 @@ Limitations The library has the following limitations: -* It can only be used with Nordic Semiconductor's ``hostap``-based Wi-Fi stack. - The Wi-Fi configuration is highly vendor-specific. * The commands ``NET_REQUEST_WIFI_CONNECT`` and ``NET_REQUEST_WIFI_CONNECT_STORED`` clear the list of configured Wi-Fi networks in RAM. Automatic connection has to be requested again after directly requesting connection to a specific network. - -API documentation -***************** - -| Header file: :file:`include/net/wifi_mgmt_ext.h` -| Source files: :file:`subsys/net/lib/wifi_mgmt_ext` - -.. doxygengroup:: wifi_mgmt_ext diff --git a/doc/nrf/releases_and_maturity/releases/release-notes-1.4.1.rst b/doc/nrf/releases_and_maturity/releases/release-notes-1.4.1.rst index 284992e30187..bd0a41961724 100644 --- a/doc/nrf/releases_and_maturity/releases/release-notes-1.4.1.rst +++ b/doc/nrf/releases_and_maturity/releases/release-notes-1.4.1.rst @@ -92,7 +92,7 @@ Zephyr changes incorporated into |NCS| This section contains changes in Zephyr that were cherry-picked into |NCS| for this release. -* Added support for the :ref:`zephyr:actinius_icarus` board. +* Added support for the Actinius Icarus board. Bluetooth Host ~~~~~~~~~~~~~~ diff --git a/doc/nrfx/nrfx.doxyfile.in b/doc/nrfx/nrfx.doxyfile.in index 00edb7ddc486..54ce176bbfd3 100644 --- a/doc/nrfx/nrfx.doxyfile.in +++ b/doc/nrfx/nrfx.doxyfile.in @@ -1275,7 +1275,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = nrfx +HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/doc/nrfxlib/conf.py b/doc/nrfxlib/conf.py index 9b9b7e9d24b8..dbea695dd8df 100644 --- a/doc/nrfxlib/conf.py +++ b/doc/nrfxlib/conf.py @@ -79,20 +79,26 @@ # -- Options for doxyrunner plugin --------------------------------------------- +_doxyrunner_outdir = utils.get_builddir() / "html" / "nrfxlib" / "doxygen" + doxyrunner_doxygen = os.environ.get("DOXYGEN_EXECUTABLE", "doxygen") -doxyrunner_doxyfile = NRF_BASE / "doc" / "nrfxlib" / "nrfxlib.doxyfile.in" -doxyrunner_outdir = utils.get_builddir() / "html" / "nrfxlib" / "doxygen" -doxyrunner_fmt = True -doxyrunner_fmt_vars = { - "NRF_BASE": str(NRF_BASE), - "DOCSET_SOURCE_BASE": str(NRFXLIB_BASE), - "DOCSET_BUILD_DIR": str(doxyrunner_outdir), - "DOCSET_VERSION": version, +doxyrunner_projects = { + "nrfxlib": { + "doxyfile": NRF_BASE / "doc" / "nrfxlib" / "nrfxlib.doxyfile.in", + "outdir": _doxyrunner_outdir, + "fmt": True, + "fmt_vars": { + "NRF_BASE": str(NRF_BASE), + "DOCSET_SOURCE_BASE": str(NRFXLIB_BASE), + "DOCSET_BUILD_DIR": str(_doxyrunner_outdir), + "DOCSET_VERSION": version, + } + } } # -- Options for doxybridge plugin --------------------------------------------- -doxybridge_dir = doxyrunner_outdir +doxybridge_projects = {"nrfxlib": _doxyrunner_outdir} # -- Options for warnings_filter ----------------------------------------------- diff --git a/doc/requirements.txt b/doc/requirements.txt index 10b1e50a3972..c01ffbf5a868 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -14,7 +14,7 @@ PyYAML # | X | | | | | pykwalify # | | | | | | | X | pytest # | | | | | | | X | recommonmark # | | | X | X | | | | -sphinx~=7.4 # | X | X | X | X | X | X | X | +sphinx~=8.1 # | X | X | X | X | X | X | X | sphinx-autobuild # | X | X | X | X | X | X | X | sphinx-copybutton # | X | | | | | | X | sphinx-ncs-theme<1.1 # | X | | | | | | | diff --git a/doc/wifi/wifi.doxyfile.in b/doc/wifi/wifi.doxyfile.in index 237a2eef590a..db26c64b506f 100644 --- a/doc/wifi/wifi.doxyfile.in +++ b/doc/wifi/wifi.doxyfile.in @@ -1304,7 +1304,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = wifi +HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). @@ -2262,7 +2262,7 @@ MAN_LINKS = NO # captures the structure of the code including all documentation. # The default value is: NO. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/doc/zephyr/conf.py b/doc/zephyr/conf.py index e262bbcd12e7..585cabb39394 100644 --- a/doc/zephyr/conf.py +++ b/doc/zephyr/conf.py @@ -27,7 +27,7 @@ # Import all Zephyr configuration, override as needed later os.environ["ZEPHYR_BASE"] = str(ZEPHYR_BASE) -os.environ["ZEPHYR_BUILD"] = str(utils.get_builddir() / "zephyr") +os.environ["OUTPUT_DIR"] = str(utils.get_builddir() / "html" / "zephyr") conf = eval_config_file(str(ZEPHYR_BASE / "doc" / "conf.py"), tags) locals().update(conf) @@ -71,17 +71,27 @@ # -- Options for doxyrunner plugin --------------------------------------------- +_doxyrunner_outdir = utils.get_builddir() / "html" / "zephyr" / "doxygen" + doxyrunner_doxygen = os.environ.get("DOXYGEN_EXECUTABLE", "doxygen") -doxyrunner_doxyfile = NRF_BASE / "doc" / "zephyr" / "zephyr.doxyfile.in" -doxyrunner_outdir = utils.get_builddir() / "html" / "zephyr" / "doxygen" -doxyrunner_fmt = True -doxyrunner_fmt_vars = { - "NRF_BASE": str(NRF_BASE), - "DOCSET_SOURCE_BASE": str(ZEPHYR_BASE), - "DOCSET_BUILD_DIR": str(doxyrunner_outdir), - "DOCSET_VERSION": version, +doxyrunner_projects = { + "zephyr": { + "doxyfile": NRF_BASE / "doc" / "zephyr" / "zephyr.doxyfile.in", + "outdir": _doxyrunner_outdir, + "fmt": True, + "fmt_vars": { + "NRF_BASE": str(NRF_BASE), + "DOCSET_SOURCE_BASE": str(ZEPHYR_BASE), + "DOCSET_BUILD_DIR": str(_doxyrunner_outdir), + "DOCSET_VERSION": version, + } + } } +# -- Options for doxybridge plugin --------------------------------------------- + +doxybridge_projects = {"zephyr": _doxyrunner_outdir} + # -- Options for zephyr.warnings_filter ---------------------------------------- warnings_filter_silent = True diff --git a/doc/zephyr/zephyr.doxyfile.in b/doc/zephyr/zephyr.doxyfile.in index b24bc5ed7ef0..c6d821b7b782 100644 --- a/doc/zephyr/zephyr.doxyfile.in +++ b/doc/zephyr/zephyr.doxyfile.in @@ -978,7 +978,8 @@ INPUT = @DOCSET_SOURCE_BASE@/doc/_doxygen/mainpage.md \ @DOCSET_SOURCE_BASE@/include/ \ @DOCSET_SOURCE_BASE@/lib/libc/minimal/include/ \ @DOCSET_SOURCE_BASE@/subsys/testsuite/include/ \ - @DOCSET_SOURCE_BASE@/subsys/testsuite/ztest/include/ + @DOCSET_SOURCE_BASE@/subsys/testsuite/ztest/include/ \ + @DOCSET_SOURCE_BASE@/subsys/secure_storage/include/ # This tag can be used to specify the character encoding of the source files # that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses @@ -2447,7 +2448,6 @@ PREDEFINED = __DOXYGEN__ \ CONFIG_NET_L2_IEEE802154_MGMT \ CONFIG_NET_L2_IEEE802154_SECURITY \ CONFIG_NET_MGMT_EVENT \ - CONFIG_NET_SOCKETS_POSIX_NAMES \ CONFIG_NET_TCP \ CONFIG_NET_UDP \ CONFIG_SCHED_CPU_MASK \ diff --git a/dts/bindings/bluetooth/nordic,bt-hci-sdc.yaml b/dts/bindings/bluetooth/nordic,bt-hci-sdc.yaml index 08ea1fc8d2ed..3bfb8798887f 100644 --- a/dts/bindings/bluetooth/nordic,bt-hci-sdc.yaml +++ b/dts/bindings/bluetooth/nordic,bt-hci-sdc.yaml @@ -8,4 +8,4 @@ properties: bt-hci-name: default: "SDC" bt-hci-bus: - default: "BT_HCI_BUS_VIRTUAL" + default: "virtual" diff --git a/ext/curl/Kconfig b/ext/curl/Kconfig index 27a785339c47..340913d42630 100644 --- a/ext/curl/Kconfig +++ b/ext/curl/Kconfig @@ -10,7 +10,7 @@ config NRF_CURL_PROMPTLESS config NRF_CURL bool "Curl" if !NRF_CURL_PROMPTLESS - depends on POSIX_API && !PTHREAD_IPC && !NET_SOCKETS_POSIX_NAMES && NEWLIB_LIBC + depends on POSIX_API && !PTHREAD_IPC && NEWLIB_LIBC imply NEWLIB_LIBC_FLOAT_PRINTF help Curl support for NRF. diff --git a/ext/iperf3/Kconfig b/ext/iperf3/Kconfig index 224388edd1c7..e970a0dcf9bf 100644 --- a/ext/iperf3/Kconfig +++ b/ext/iperf3/Kconfig @@ -12,7 +12,7 @@ config NRF_IPERF3_PROMPTLESS config NRF_IPERF3 bool "Iperf3 NRF integration" if !NRF_IPERF3_PROMPTLESS - depends on POSIX_API && !PTHREAD_IPC && !NET_SOCKETS_POSIX_NAMES && NEWLIB_LIBC && CJSON_LIB + depends on POSIX_API && !PTHREAD_IPC && NEWLIB_LIBC && CJSON_LIB help Enable Iperf3 NRF integration diff --git a/include/net/wifi_credentials.h b/include/net/wifi_credentials.h deleted file mode 100644 index 5e313f532da3..000000000000 --- a/include/net/wifi_credentials.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#ifndef WIFI_CREDENTIALS_H__ -#define WIFI_CREDENTIALS_H__ - -#include -#include -#include - -/** - * @defgroup wifi_credentials Wi-Fi credentials library - * @{ - * @brief Library that provides a way to store and load Wi-Fi credentials. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* this entry contains a BSSID */ -#define WIFI_CREDENTIALS_FLAG_BSSID BIT(0) -/* this entry is to be preferred over others */ -#define WIFI_CREDENTIALS_FLAG_FAVORITE BIT(1) -/* this entry can use the 2.4 GHz band */ -#define WIFI_CREDENTIALS_FLAG_2_4GHz BIT(2) -/* this entry can use the 5 GHz band */ -#define WIFI_CREDENTIALS_FLAG_5GHz BIT(3) -/* this entry can use the 6 GHz band */ -#define WIFI_CREDENTIALS_FLAG_6GHz BIT(4) -/* this entry requires management frame protection */ -#define WIFI_CREDENTIALS_FLAG_MFP_REQUIRED BIT(5) -/* this entry disables management frame protection */ -#define WIFI_CREDENTIALS_FLAG_MFP_DISABLED BIT(6) -/* this entry has anonymous identity configured */ -#define WIFI_CREDENTIALS_FLAG_ANONYMOUS_IDENTITY BIT(7) -/* this entry has key password configured */ -#define WIFI_CREDENTIALS_FLAG_KEY_PASSWORD BIT(8) - -#define WIFI_CREDENTIALS_MAX_PASSWORD_LEN\ - MAX(WIFI_PSK_MAX_LEN, CONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH) - -/** - * @brief Wi-Fi credentials entry header - * @note Every settings entry starts with this header. - * Depending on the `type` field, the header can be casted to a larger type. - * In addition to SSID (usually a string) and BSSID (a MAC address), - * a `flags` field can be used to control some detail settings. - * - */ -struct wifi_credentials_header { - enum wifi_security_type type; - char ssid[WIFI_SSID_MAX_LEN]; - size_t ssid_len; - uint8_t bssid[WIFI_MAC_ADDR_LEN]; - uint32_t flags; - uint8_t channel; - uint32_t timeout; - char anon_id[16]; - uint8_t aid_length; - char key_passwd[16]; - uint8_t key_passwd_length; -}; - -/** - * @brief Wi-Fi Personal credentials entry - * @note Contains only the header and a password. - * For PSK security, passwords can be up to `WIFI_PSK_MAX_LEN` bytes long - * including NULL termination. For SAE security it can range up to - * `CONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH`. - * - */ -struct wifi_credentials_personal { - struct wifi_credentials_header header; - char password[WIFI_CREDENTIALS_MAX_PASSWORD_LEN]; - size_t password_len; -}; - -/** - * @brief Wi-Fi Enterprise credentials entry - * @note This functionality is not yet implemented. - */ -struct wifi_credentials_enterprise { - struct wifi_credentials_header header; - size_t identity_len; - size_t anonymous_identity_len; - size_t password_len; - size_t ca_cert_len; - size_t client_cert_len; - size_t private_key_len; - size_t private_key_pw_len; -}; - -/** - * @brief Get credentials for given SSID. - * - * @param[in] ssid SSID to look for - * @param[in] ssid_len length of SSID - * @param[out] type Wi-Fi security type - * @param[out] bssid_buf buffer to store BSSID if it was fixed - * @param[in] bssid_buf_len length of bssid_buf - * @param[out] password_buf buffer to store password - * @param[in] password_buf_len length of password_buf - * @param[out] password_len length of password - * @param[out] flags flags - * @param[out] channel channel - * @param[out] timeout timeout - * - * @return 0 Success. - * @return -ENOENT No network with this SSID was found. - * @return -EINVAL A required buffer was NULL or invalid SSID length. - * @return -EPROTO The network with this SSID is not a personal network. - */ -int wifi_credentials_get_by_ssid_personal( - const char *ssid, - size_t ssid_len, - enum wifi_security_type *type, - uint8_t *bssid_buf, - size_t bssid_buf_len, - char *password_buf, - size_t password_buf_len, - size_t *password_len, - uint32_t *flags, - uint8_t *channel, - uint32_t *timeout -); - -/** - * @brief Set credentials for given SSID. - * - * @param[in] ssid SSID to look for - * @param[in] ssid_len length of SSID - * @param[in] type Wi-Fi security type - * @param[in] bssid BSSID (may be NULL) - * @param[in] bssid_len length of BSSID buffer (either 0 or WIFI_MAC_ADDR_LEN) - * @param[in] password password - * @param[in] password_len length of password - * @param[in] flags flags - * @param[in] channel Channel - * @param[in] timeout Timeout - * - * @return 0 Success. Credentials are stored in persistent storage. - * @return -EINVAL A required buffer was NULL or security type is not supported. - * @return -ENOTSUP Security type is not supported. - * @return -ENOBUFS All slots are already taken. - */ -int wifi_credentials_set_personal( - const char *ssid, - size_t ssid_len, - enum wifi_security_type type, - const uint8_t *bssid, - size_t bssid_len, - const char *password, - size_t password_len, - uint32_t flags, - uint8_t channel, - uint32_t timeout -); - -/** - * @brief Get credentials for given SSID by struct. - * - * @param[in] ssid SSID to look for - * @param[in] ssid_len length of SSID - * @param[out] buf credentials Pointer to struct where credentials are stored - * - * @return 0 Success. - * @return -ENOENT No network with this SSID was found. - * @return -EINVAL A required buffer was NULL or too small. - * @return -EPROTO The network with this SSID is not a personal network. - */ -int wifi_credentials_get_by_ssid_personal_struct(const char *ssid, size_t ssid_len, - struct wifi_credentials_personal *buf); - -/** - * @brief Set credentials for given SSID by struct. - * - * @param[in] creds credentials Pointer to struct from which credentials are loaded - * - * @return 0 Success. - * @return -ENOENT No network with this SSID was found. - * @return -EINVAL A required buffer was NULL or incorrect size. - * @return -ENOBUFS All slots are already taken. - */ -int wifi_credentials_set_personal_struct(const struct wifi_credentials_personal *creds); - -/** - * @brief Delete credentials for given SSID. - * - * @param[in] ssid SSID to look for - * @param[in] ssid_len length of SSID - * - * @return -ENOENT if No network with this SSID was found. - * @return 0 on success, otherwise a negative error code - */ -int wifi_credentials_delete_by_ssid(const char *ssid, size_t ssid_len); - -/** - * @brief Check if credentials storage is empty. - * - * @return true if credential storage is empty, otherwise false - */ -bool wifi_credentials_is_empty(void); - -/** - * @brief Deletes all stored Wi-Fi credentials. - * - * This function deletes all Wi-Fi credentials that have been stored in the system. - * It is typically used when you want to clear all saved networks. - * - * @return 0 on successful, otherwise a negative error code - */ -int wifi_credentials_delete_all(void); - -/** - * @brief Callback type for wifi_credentials_for_each_ssid. - * @param[in] cb_arg arguments for the callback function. Appropriate cb_arg is - * transferred by wifi_credentials_for_each_ssid. - * @param[in] ssid SSID - * @param[in] ssid_len length of SSID - */ -typedef void (*wifi_credentials_ssid_cb)(void *cb_arg, const char *ssid, size_t ssid_len); - -/** - * @brief Call callback for each registered SSID. - * - * @param cb callback - * @param cb_arg argument for callback function - */ -void wifi_credentials_for_each_ssid(wifi_credentials_ssid_cb cb, void *cb_arg); - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif /* WIFI_CREDENTIALS_H__ */ diff --git a/include/net/wifi_mgmt_ext.h b/include/net/wifi_mgmt_ext.h index d223f487aa0a..7c6985c5d48b 100644 --- a/include/net/wifi_mgmt_ext.h +++ b/include/net/wifi_mgmt_ext.h @@ -16,14 +16,6 @@ */ -enum net_request_wifi_cmd_ext { - NET_REQUEST_WIFI_CMD_CONNECT_STORED = NET_REQUEST_WIFI_CMD_REG_DOMAIN + 100, -}; - -#define NET_REQUEST_WIFI_CONNECT_STORED \ - (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT_STORED) - -NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_CONNECT_STORED); /** @} */ diff --git a/lib/nrf_modem_lib/Kconfig b/lib/nrf_modem_lib/Kconfig index c7098f138a04..f00560133c5b 100644 --- a/lib/nrf_modem_lib/Kconfig +++ b/lib/nrf_modem_lib/Kconfig @@ -9,7 +9,6 @@ menuconfig NRF_MODEM_LIB select EXPERIMENTAL if SOC_NRF9280_CPUAPP select NRF_MODEM imply NET_SOCKETS_OFFLOAD - imply NET_SOCKETS_POSIX_NAMES if !POSIX_API # The modem must be turned on to achieve low power consumption. # But disable it for ZTEST's as some tests have HW # resource-conflicts with NRF_MODEM_LIB. diff --git a/lib/nrf_modem_lib/sanity.c b/lib/nrf_modem_lib/sanity.c index 226e36f5516c..647e65826a10 100644 --- a/lib/nrf_modem_lib/sanity.c +++ b/lib/nrf_modem_lib/sanity.c @@ -161,19 +161,23 @@ BUILD_ASSERT(NRF_SPROTO_DTLS1v2 == IPPROTO_DTLS_1_2, "Socket value not aligned w BUILD_ASSERT(SOL_TLS == NRF_SOL_SECURE, "Socket value not aligned with modemlib."); BUILD_ASSERT(SOL_SOCKET == NRF_SOL_SOCKET, "Socket value not aligned with modemlib."); +#if defined(CONFIG_POSIX_API) BUILD_ASSERT(MSG_DONTWAIT == NRF_MSG_DONTWAIT, "Socket value not aligned with modemlib."); BUILD_ASSERT(MSG_PEEK == NRF_MSG_PEEK, "Socket value not aligned with modemlib."); BUILD_ASSERT(MSG_WAITALL == NRF_MSG_WAITALL, "Socket value not aligned with modemlib."); +#endif BUILD_ASSERT(AI_CANONNAME == NRF_AI_CANONNAME, "Socket value not aligned with modemlib."); BUILD_ASSERT(AI_NUMERICSERV == NRF_AI_NUMERICSERV, "Socket value not aligned with modemlib."); BUILD_ASSERT(AI_PDNSERV == NRF_AI_PDNSERV, "Socket value not aligned with modemlib."); +#if defined(CONFIG_POSIX_API) BUILD_ASSERT(POLLIN == NRF_POLLIN, "Socket value not aligned with modemlib."); BUILD_ASSERT(POLLOUT == NRF_POLLOUT, "Socket value not aligned with modemlib."); BUILD_ASSERT(POLLERR == NRF_POLLERR, "Socket value not aligned with modemlib."); BUILD_ASSERT(POLLHUP == NRF_POLLHUP, "Socket value not aligned with modemlib."); BUILD_ASSERT(POLLNVAL == NRF_POLLNVAL, "Socket value not aligned with modemlib."); +#endif BUILD_ASSERT(DNS_EAI_ADDRFAMILY == NRF_EAI_ADDRFAMILY, "Socket value not aligned with modemlib."); BUILD_ASSERT(DNS_EAI_AGAIN == NRF_EAI_AGAIN, "Socket value not aligned with modemlib."); diff --git a/lib/pdn/pdn.c b/lib/pdn/pdn.c index 1311da49df2d..47336fc7caac 100644 --- a/lib/pdn/pdn.c +++ b/lib/pdn/pdn.c @@ -674,9 +674,9 @@ static int pdn_sa_family_from_ip_string(const char *src) { char buf[INET6_ADDRSTRLEN]; - if (inet_pton(AF_INET, src, buf)) { + if (zsock_inet_pton(AF_INET, src, buf)) { return AF_INET; - } else if (inet_pton(AF_INET6, src, buf)) { + } else if (zsock_inet_pton(AF_INET6, src, buf)) { return AF_INET6; } return -1; @@ -752,10 +752,10 @@ int pdn_dynamic_info_get(uint32_t cid, struct pdn_dynamic_info *pdn_info) if (family == AF_INET) { addr = &(pdn_info->dns_addr4_primary); - (void)inet_pton(AF_INET, dns_addr_str, addr); + (void)zsock_inet_pton(AF_INET, dns_addr_str, addr); } else if (family == AF_INET6) { addr6 = &(pdn_info->dns_addr6_primary); - (void)inet_pton(AF_INET6, dns_addr_str, addr6); + (void)zsock_inet_pton(AF_INET6, dns_addr_str, addr6); } /* Read secondary DNS address */ @@ -775,10 +775,10 @@ int pdn_dynamic_info_get(uint32_t cid, struct pdn_dynamic_info *pdn_info) if (family == AF_INET) { addr = &(pdn_info->dns_addr4_secondary); - (void)inet_pton(AF_INET, dns_addr_str, addr); + (void)zsock_inet_pton(AF_INET, dns_addr_str, addr); } else if (family == AF_INET6) { addr6 = &(pdn_info->dns_addr6_secondary); - (void)inet_pton(AF_INET6, dns_addr_str, addr6); + (void)zsock_inet_pton(AF_INET6, dns_addr_str, addr6); } /* Read link MTU if exists: diff --git a/samples/bluetooth/central_and_peripheral_hr/src/main.c b/samples/bluetooth/central_and_peripheral_hr/src/main.c index 2716ba46e460..5bdedb50181e 100644 --- a/samples/bluetooth/central_and_peripheral_hr/src/main.c +++ b/samples/bluetooth/central_and_peripheral_hr/src/main.c @@ -425,7 +425,7 @@ int main(void) printk("Scanning started\n"); - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); diff --git a/samples/bluetooth/central_nfc_pairing/prj.conf b/samples/bluetooth/central_nfc_pairing/prj.conf index f8a095497e1a..de02cba29d10 100644 --- a/samples/bluetooth/central_nfc_pairing/prj.conf +++ b/samples/bluetooth/central_nfc_pairing/prj.conf @@ -10,6 +10,7 @@ CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_BT=y CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y +CONFIG_BT_SMP_SC_PAIR_ONLY=n CONFIG_BT_GATT_CLIENT=y # Enable the BLE modules from NCS diff --git a/samples/bluetooth/channel_sounding_ras_initiator/src/main.c b/samples/bluetooth/channel_sounding_ras_initiator/src/main.c index 95ad1cfd3592..022298ab9723 100644 --- a/samples/bluetooth/channel_sounding_ras_initiator/src/main.c +++ b/samples/bluetooth/channel_sounding_ras_initiator/src/main.c @@ -464,8 +464,8 @@ int main(void) .phy = BT_LE_CS_PROCEDURE_PHY_1M, .tx_power_delta = 0x80, .preferred_peer_antenna = BT_LE_CS_PROCEDURE_PREFERRED_PEER_ANTENNA_1, - .snr_control_initiator = BT_LE_CS_INITIATOR_SNR_CONTROL_NOT_USED, - .snr_control_reflector = BT_LE_CS_REFLECTOR_SNR_CONTROL_NOT_USED, + .snr_control_initiator = BT_LE_CS_SNR_CONTROL_NOT_USED, + .snr_control_reflector = BT_LE_CS_SNR_CONTROL_NOT_USED, }; err = bt_le_cs_set_procedure_parameters(connection, &procedure_params); diff --git a/samples/bluetooth/channel_sounding_ras_reflector/src/main.c b/samples/bluetooth/channel_sounding_ras_reflector/src/main.c index 41f8171519c9..baa6e78ed2fe 100644 --- a/samples/bluetooth/channel_sounding_ras_reflector/src/main.c +++ b/samples/bluetooth/channel_sounding_ras_reflector/src/main.c @@ -115,7 +115,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { LOG_ERR("Advertising failed to start (err %d)", err); return 0; diff --git a/samples/bluetooth/conn_time_sync/prj.conf b/samples/bluetooth/conn_time_sync/prj.conf index a90029f7f011..24d416b59707 100644 --- a/samples/bluetooth/conn_time_sync/prj.conf +++ b/samples/bluetooth/conn_time_sync/prj.conf @@ -22,3 +22,5 @@ CONFIG_CONSOLE_GETCHAR=y CONFIG_BT_CTLR_SDC_CONN_ANCHOR_POINT_REPORT=y CONFIG_BT_HCI_VS_EVT_USER=y + +CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/conn_time_sync/src/peripheral.c b/samples/bluetooth/conn_time_sync/src/peripheral.c index 6b8e11cff031..e339e3422605 100644 --- a/samples/bluetooth/conn_time_sync/src/peripheral.c +++ b/samples/bluetooth/conn_time_sync/src/peripheral.c @@ -68,7 +68,7 @@ static void adv_start(void) { int err; - err = bt_le_adv_start(BT_LE_ADV_CONN_ONE_TIME, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return; diff --git a/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet.conf b/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet.conf index 17bb72276140..43e7a0d3862a 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet.conf @@ -9,6 +9,4 @@ CONFIG_IPC_SERVICE=y CONFIG_IPC_SERVICE_BACKEND_RPMSG=y CONFIG_MBOX=y -CONFIG_NRFX_GPPI=y - CONFIG_HEAP_MEM_POOL_SIZE=4096 diff --git a/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet_hci.conf b/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet_hci.conf index 4440ff36ff9d..70722896c341 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet_hci.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet_hci.conf @@ -8,8 +8,6 @@ CONFIG_IPC_SERVICE=y CONFIG_IPC_SERVICE_BACKEND_RPMSG=y CONFIG_MBOX=y -CONFIG_NRFX_GPPI=y - CONFIG_HEAP_MEM_POOL_SIZE=4096 CONFIG_NRF_RPC=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf index c6d7d4e891d8..2bc1bb232846 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -12,4 +12,3 @@ CONFIG_NRFX_TIMER2=n # Use necessary peripherals CONFIG_NRFX_TIMER20=y CONFIG_NRFX_TIMER10=y -CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf index c6d7d4e891d8..2bc1bb232846 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -12,4 +12,3 @@ CONFIG_NRFX_TIMER2=n # Use necessary peripherals CONFIG_NRFX_TIMER20=y CONFIG_NRFX_TIMER10=y -CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf index c6d7d4e891d8..2bc1bb232846 100644 --- a/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -12,4 +12,3 @@ CONFIG_NRFX_TIMER2=n # Use necessary peripherals CONFIG_NRFX_TIMER20=y CONFIG_NRFX_TIMER10=y -CONFIG_NRFX_GPPI=y diff --git a/samples/bluetooth/direct_test_mode/prj.conf b/samples/bluetooth/direct_test_mode/prj.conf index 8788565a4e08..68f23de67550 100644 --- a/samples/bluetooth/direct_test_mode/prj.conf +++ b/samples/bluetooth/direct_test_mode/prj.conf @@ -23,6 +23,7 @@ CONFIG_LOG_BACKEND_RTT=y CONFIG_NRFX_TIMER0=y CONFIG_NRFX_TIMER1=y CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y CONFIG_FEM_AL_LIB=y diff --git a/samples/bluetooth/direct_test_mode/prj_hci.conf b/samples/bluetooth/direct_test_mode/prj_hci.conf index b92c82e9ec58..5713f6ffbd83 100644 --- a/samples/bluetooth/direct_test_mode/prj_hci.conf +++ b/samples/bluetooth/direct_test_mode/prj_hci.conf @@ -23,6 +23,7 @@ CONFIG_LOG_BACKEND_RTT=y CONFIG_NRFX_TIMER0=y CONFIG_NRFX_TIMER1=y CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y CONFIG_FEM_AL_LIB=y diff --git a/samples/bluetooth/direct_test_mode/prj_usb.conf b/samples/bluetooth/direct_test_mode/prj_usb.conf index 8f5c63293a29..a4db7f9246f8 100644 --- a/samples/bluetooth/direct_test_mode/prj_usb.conf +++ b/samples/bluetooth/direct_test_mode/prj_usb.conf @@ -23,6 +23,7 @@ CONFIG_LOG_BACKEND_RTT=y CONFIG_NRFX_TIMER0=y CONFIG_NRFX_TIMER1=y CONFIG_NRFX_TIMER2=y +CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y CONFIG_FEM_AL_LIB=y diff --git a/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52820.conf b/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52820.conf index 18a076bcfcc3..90967479c3ab 100644 --- a/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52820.conf +++ b/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52820.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - # Enable Direction Finding Feature including AoA and AoD CONFIG_BT_CTLR_DF=y diff --git a/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf b/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf index 18a076bcfcc3..90967479c3ab 100644 --- a/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf +++ b/samples/bluetooth/direction_finding_central/boards/nrf52833dk_nrf52833.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - # Enable Direction Finding Feature including AoA and AoD CONFIG_BT_CTLR_DF=y diff --git a/samples/bluetooth/direction_finding_central/sysbuild/ipc_radio/prj.conf b/samples/bluetooth/direction_finding_central/sysbuild/ipc_radio/prj.conf index 20c7699d86c2..556ab546e545 100644 --- a/samples/bluetooth/direction_finding_central/sysbuild/ipc_radio/prj.conf +++ b/samples/bluetooth/direction_finding_central/sysbuild/ipc_radio/prj.conf @@ -16,9 +16,6 @@ CONFIG_BT_MAX_CONN=16 # CONFIG_BT_BUF_ACL_TX_SIZE=251 # CONFIG_BT_BUF_CMD_TX_SIZE=255 -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - # Enable Direction Finding Feature including AoA and AoD CONFIG_BT_CTLR_DF=y diff --git a/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52820.conf b/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52820.conf index d030f006d949..4a675a91ce04 100644 --- a/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52820.conf +++ b/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52820.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - CONFIG_BT_CTLR_ADV_EXT=y CONFIG_BT_CTLR_SYNC_PERIODIC=y diff --git a/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.conf b/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.conf index 96498c082021..d5d8d82fa206 100644 --- a/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.conf +++ b/samples/bluetooth/direction_finding_connectionless_rx/boards/nrf52833dk_nrf52833.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - CONFIG_BT_CTLR_ADV_EXT=y CONFIG_BT_CTLR_SYNC_PERIODIC=y diff --git a/samples/bluetooth/direction_finding_connectionless_rx/sysbuild/ipc_radio/prj.conf b/samples/bluetooth/direction_finding_connectionless_rx/sysbuild/ipc_radio/prj.conf index 884172611490..26b9acdc0d51 100644 --- a/samples/bluetooth/direction_finding_connectionless_rx/sysbuild/ipc_radio/prj.conf +++ b/samples/bluetooth/direction_finding_connectionless_rx/sysbuild/ipc_radio/prj.conf @@ -23,9 +23,6 @@ CONFIG_BT_EXT_ADV=y CONFIG_BT_PER_ADV_SYNC=y CONFIG_BT_OBSERVER=y -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - CONFIG_BT_CTLR_ADV_EXT=y CONFIG_BT_CTLR_SYNC_PERIODIC=y diff --git a/samples/bluetooth/direction_finding_connectionless_tx/overlay-bt_ll_sw_split.conf b/samples/bluetooth/direction_finding_connectionless_tx/overlay-bt_ll_sw_split.conf index 0ad2b92a3612..f357ef8f3221 100644 --- a/samples/bluetooth/direction_finding_connectionless_tx/overlay-bt_ll_sw_split.conf +++ b/samples/bluetooth/direction_finding_connectionless_tx/overlay-bt_ll_sw_split.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - CONFIG_BT_CTLR_ADV_EXT=y CONFIG_BT_CTLR_ADV_PERIODIC=y diff --git a/samples/bluetooth/direction_finding_peripheral/overlay-bt_ll_sw_split.conf b/samples/bluetooth/direction_finding_peripheral/overlay-bt_ll_sw_split.conf index d5c5c57f3ffb..d4eafc04d88a 100644 --- a/samples/bluetooth/direction_finding_peripheral/overlay-bt_ll_sw_split.conf +++ b/samples/bluetooth/direction_finding_peripheral/overlay-bt_ll_sw_split.conf @@ -4,9 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -CONFIG_BT_CTLR=y -CONFIG_BT_LL_SW_SPLIT=y - # Enable Direction Finding Feature including AoA and AoD CONFIG_BT_CTLR_DF=y diff --git a/samples/bluetooth/direction_finding_peripheral/src/main.c b/samples/bluetooth/direction_finding_peripheral/src/main.c index 6673f91d8abf..b8191450b0ea 100644 --- a/samples/bluetooth/direction_finding_peripheral/src/main.c +++ b/samples/bluetooth/direction_finding_peripheral/src/main.c @@ -98,7 +98,7 @@ static void bt_ready(void) printk("Bluetooth initialized\n"); - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return; diff --git a/samples/bluetooth/event_trigger/src/main.c b/samples/bluetooth/event_trigger/src/main.c index 1910754b9379..ddd646720810 100644 --- a/samples/bluetooth/event_trigger/src/main.c +++ b/samples/bluetooth/event_trigger/src/main.c @@ -175,7 +175,7 @@ static void adv_start(void) int err; err = bt_le_adv_start( - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL), diff --git a/samples/bluetooth/fast_pair/input_device/src/bt_adv_helper.c b/samples/bluetooth/fast_pair/input_device/src/bt_adv_helper.c index 2caf112f07dd..37c7eaeebac7 100644 --- a/samples/bluetooth/fast_pair/input_device/src/bt_adv_helper.c +++ b/samples/bluetooth/fast_pair/input_device/src/bt_adv_helper.c @@ -100,7 +100,7 @@ static int adv_start_internal(void) */ static const struct bt_le_adv_param adv_param = { .id = BT_ID_DEFAULT, - .options = (BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME), + .options = BT_LE_ADV_OPT_CONN, .interval_min = BT_GAP_ADV_FAST_INT_MIN_1, .interval_max = BT_GAP_ADV_FAST_INT_MAX_1, .peer = NULL, diff --git a/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c b/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c index 56d4f1962d91..997a8fc33c62 100644 --- a/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c +++ b/samples/bluetooth/fast_pair/locator_tag/src/fp_adv.c @@ -59,7 +59,7 @@ static const char * const fp_adv_mode_description[] = { */ static struct bt_le_adv_param fp_adv_param = { .id = BT_ID_DEFAULT, - .options = (BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME), + .options = BT_LE_ADV_OPT_CONN, .interval_min = FP_ADV_INTERVAL, .interval_max = FP_ADV_INTERVAL, }; diff --git a/samples/bluetooth/fast_pair/locator_tag/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.overlay b/samples/bluetooth/fast_pair/locator_tag/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.overlay index 407f3f83a94a..6651c4d270e8 100644 --- a/samples/bluetooth/fast_pair/locator_tag/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.overlay +++ b/samples/bluetooth/fast_pair/locator_tag/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.overlay @@ -4,6 +4,6 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -&cdc_acm_uart { +&board_cdc_acm_uart { status = "disabled"; }; diff --git a/samples/bluetooth/hci_lpuart/boards/nrf9160dk_nrf52840.conf b/samples/bluetooth/hci_lpuart/boards/nrf9160dk_nrf52840.conf index c4ea3fddf698..c52ddfabad97 100644 --- a/samples/bluetooth/hci_lpuart/boards/nrf9160dk_nrf52840.conf +++ b/samples/bluetooth/hci_lpuart/boards/nrf9160dk_nrf52840.conf @@ -4,7 +4,6 @@ CONFIG_GPIO=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 -CONFIG_BT_TINYCRYPT_ECC=n CONFIG_BT_CTLR_DTM_HCI=y CONFIG_BT_CTLR_ASSERT_HANDLER=y diff --git a/samples/bluetooth/hci_lpuart/boards/thingy91_nrf52840.conf b/samples/bluetooth/hci_lpuart/boards/thingy91_nrf52840.conf index 457fd9a0f487..6a0d77b28fcd 100644 --- a/samples/bluetooth/hci_lpuart/boards/thingy91_nrf52840.conf +++ b/samples/bluetooth/hci_lpuart/boards/thingy91_nrf52840.conf @@ -1,12 +1,10 @@ # Override prj.conf defaults CONFIG_GPIO=y -CONFIG_BT_CTLR=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_WAIT_NOP=y CONFIG_BT_MAX_CONN=16 -CONFIG_BT_TINYCRYPT_ECC=n CONFIG_BT_CTLR_DTM_HCI=y CONFIG_BT_CTLR_ASSERT_HANDLER=y diff --git a/samples/bluetooth/iso_combined_bis_and_cis/prj.conf b/samples/bluetooth/iso_combined_bis_and_cis/prj.conf index 3cc708932774..b857296809fb 100644 --- a/samples/bluetooth/iso_combined_bis_and_cis/prj.conf +++ b/samples/bluetooth/iso_combined_bis_and_cis/prj.conf @@ -7,6 +7,8 @@ CONFIG_RING_BUFFER=y CONFIG_BT=y CONFIG_BT_ISO_BROADCASTER=y CONFIG_BT_ISO_CENTRAL=y +CONFIG_BT_CENTRAL=y +CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_ISO" diff --git a/samples/bluetooth/iso_time_sync/prj.conf b/samples/bluetooth/iso_time_sync/prj.conf index a301daaf51d4..1390e30d0777 100644 --- a/samples/bluetooth/iso_time_sync/prj.conf +++ b/samples/bluetooth/iso_time_sync/prj.conf @@ -4,6 +4,8 @@ CONFIG_BT_ISO_SYNC_RECEIVER=y CONFIG_BT_ISO_CENTRAL=y CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_OBSERVER=y +CONFIG_BT_CENTRAL=y +CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_ISO" CONFIG_BT_MAX_CONN=5 diff --git a/samples/bluetooth/iso_time_sync/src/cis_peripheral.c b/samples/bluetooth/iso_time_sync/src/cis_peripheral.c index 833814d748ef..eae0cdfdf831 100644 --- a/samples/bluetooth/iso_time_sync/src/cis_peripheral.c +++ b/samples/bluetooth/iso_time_sync/src/cis_peripheral.c @@ -98,7 +98,7 @@ void cis_peripheral_start(bool do_tx) return; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return; diff --git a/samples/bluetooth/llpm/src/main.c b/samples/bluetooth/llpm/src/main.c index 7f2666b6da06..3d321848b45a 100644 --- a/samples/bluetooth/llpm/src/main.c +++ b/samples/bluetooth/llpm/src/main.c @@ -153,7 +153,7 @@ static void adv_start(void) { int err; - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); diff --git a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/src/lb_service_handler.c b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/src/lb_service_handler.c index c4949115baaf..3b79ef729782 100644 --- a/samples/bluetooth/mesh/ble_peripheral_lbs_coex/src/lb_service_handler.c +++ b/samples/bluetooth/mesh/ble_peripheral_lbs_coex/src/lb_service_handler.c @@ -119,7 +119,7 @@ static void lbs_adv_start(void) { int err; size_t id_count = 0xFF; - struct bt_le_adv_param adv_params = *BT_LE_ADV_CONN; + struct bt_le_adv_param adv_params = *BT_LE_ADV_CONN_FAST_2; /* Use different identity from Bluetooth Mesh to avoid conflicts with Mesh Provisioning * Service and Mesh Proxy Service advertisements. */ diff --git a/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/chat/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/common/smp_bt.c b/samples/bluetooth/mesh/common/smp_bt.c index 2860cd2072da..db14ed4fecc8 100644 --- a/samples/bluetooth/mesh/common/smp_bt.c +++ b/samples/bluetooth/mesh/common/smp_bt.c @@ -26,7 +26,7 @@ static struct bt_le_adv_param adv_params = { .id = BT_ID_DEFAULT, .sid = 0, .secondary_max_skip = 0, - .options = BT_LE_ADV_OPT_CONNECTABLE, + .options = BT_LE_ADV_OPT_CONN, .interval_min = BT_GAP_ADV_SLOW_INT_MIN, .interval_max = BT_GAP_ADV_SLOW_INT_MAX, .peer = NULL diff --git a/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/dfu/distributor/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/dfu/distributor/prj.conf b/samples/bluetooth/mesh/dfu/distributor/prj.conf index 2e887d6a6e85..3514dbde197a 100644 --- a/samples/bluetooth/mesh/dfu/distributor/prj.conf +++ b/samples/bluetooth/mesh/dfu/distributor/prj.conf @@ -18,6 +18,7 @@ CONFIG_LOG=y CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="Mesh DFU Distributor" CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y +CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=3072 CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE=y CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION="1.0.0+0" @@ -28,8 +29,6 @@ CONFIG_BT_L2CAP_TX_BUF_COUNT=8 CONFIG_BT_OBSERVER=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_SETTINGS=y -CONFIG_BT_ECC=y -CONFIG_BT_TINYCRYPT_ECC=y CONFIG_BT_BUF_CMD_TX_COUNT=4 # Disable unused Bluetooth features diff --git a/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/dfu/target/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/dfu/target/prj.conf b/samples/bluetooth/mesh/dfu/target/prj.conf index 88baadbbf674..8d69b45f8250 100644 --- a/samples/bluetooth/mesh/dfu/target/prj.conf +++ b/samples/bluetooth/mesh/dfu/target/prj.conf @@ -33,8 +33,6 @@ CONFIG_BT_L2CAP_TX_BUF_COUNT=8 CONFIG_BT_OBSERVER=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_SETTINGS=y -CONFIG_BT_ECC=y -CONFIG_BT_TINYCRYPT_ECC=y # Disable unused Bluetooth features CONFIG_BT_CTLR_LE_ENC=n diff --git a/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4af79acbeec5..b6b4e45f2f70 100644 --- a/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -18,3 +18,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l10_cpuapp.conf index 82f571bd3cfb..153a16959be6 100644 --- a/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -18,3 +18,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 4c81ab396c98..6412354a7c26 100644 --- a/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/light/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -18,3 +18,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light/overlay-dfu.conf b/samples/bluetooth/mesh/light/overlay-dfu.conf index dbfbc6761700..06d91369c41f 100644 --- a/samples/bluetooth/mesh/light/overlay-dfu.conf +++ b/samples/bluetooth/mesh/light/overlay-dfu.conf @@ -8,7 +8,7 @@ CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y - +CONFIG_MCUMGR_TRANSPORT_WORKQUEUE_STACK_SIZE=3072 # Enable Extended Advertiser to advertise BT SMP service CONFIG_BT_EXT_ADV=y CONFIG_BT_EXT_ADV_MAX_ADV_SET=6 diff --git a/samples/bluetooth/mesh/light/prj.conf b/samples/bluetooth/mesh/light/prj.conf index d899577df685..0d7b8d34bb13 100644 --- a/samples/bluetooth/mesh/light/prj.conf +++ b/samples/bluetooth/mesh/light/prj.conf @@ -11,7 +11,7 @@ CONFIG_LOG_MODE_DEFERRED=y # General configuration CONFIG_NCS_APPLICATION_BOOT_BANNER_STRING="Mesh Light" -CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3072 CONFIG_FLASH=y CONFIG_FLASH_MAP=y CONFIG_NVS=y diff --git a/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/light_ctrl/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_ctrl/src/main.c b/samples/bluetooth/mesh/light_ctrl/src/main.c index d23f48d2b373..4a6f27c77ecc 100644 --- a/samples/bluetooth/mesh/light_ctrl/src/main.c +++ b/samples/bluetooth/mesh/light_ctrl/src/main.c @@ -18,7 +18,7 @@ #ifdef CONFIG_EMDS #include -#if defined(CONFIG_BT_CTLR) +#if defined(CONFIG_HAS_BT_CTLR) #include #endif @@ -57,7 +57,7 @@ static void isr_emds_cb(void *arg) { ARG_UNUSED(arg); -#if defined(CONFIG_BT_CTLR) +#if defined(CONFIG_HAS_BT_CTLR) int32_t err = mpsl_lib_uninit(); if (err != 0) { diff --git a/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/light_dimmer/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/light_switch/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/sensor_client/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/sensor_server/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l05_cpuapp.conf index 4267f46ce685..13b39eeabfb5 100644 --- a/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l10_cpuapp.conf index f4821a1a3fb5..55120e85651f 100644 --- a/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e12c92c7ae50..995706b02555 100644 --- a/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/bluetooth/mesh/silvair_enocean/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -17,3 +17,5 @@ CONFIG_ZMS_LOOKUP_CACHE_SIZE=512 CONFIG_SETTINGS_ZMS_NAME_CACHE=y CONFIG_SETTINGS_ZMS_NAME_CACHE_SIZE=512 CONFIG_ZMS_LOOKUP_CACHE_FOR_SETTINGS=y +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 +CONFIG_BT_RX_STACK_SIZE=5120 diff --git a/samples/bluetooth/multiple_adv_sets/src/main.c b/samples/bluetooth/multiple_adv_sets/src/main.c index b2d9e47c50ec..4b8898572c63 100644 --- a/samples/bluetooth/multiple_adv_sets/src/main.c +++ b/samples/bluetooth/multiple_adv_sets/src/main.c @@ -37,7 +37,7 @@ static const struct bt_le_adv_param *non_connectable_adv_param = NULL); static const struct bt_le_adv_param *connectable_adv_param = - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, /* 100 ms */ BT_GAP_ADV_FAST_INT_MAX_2, /* 150 ms */ NULL); diff --git a/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c b/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c index efb277b81e2a..7a3aa370fc35 100644 --- a/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c +++ b/samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c @@ -720,18 +720,18 @@ static void context_print(const struct shell *shell) } } -static void codec_qos_print(const struct shell *shell, struct bt_audio_codec_qos *qos) +static void codec_qos_print(const struct shell *shell, struct bt_bap_qos_cfg *qos) { - if (qos->phy == BT_AUDIO_CODEC_QOS_1M || qos->phy == BT_AUDIO_CODEC_QOS_2M) { + if (qos->phy == BT_BAP_QOS_CFG_1M || qos->phy == BT_BAP_QOS_CFG_2M) { shell_print(shell, "\t\t\tPHY: %dM", qos->phy); - } else if (qos->phy == BT_AUDIO_CODEC_QOS_CODED) { + } else if (qos->phy == BT_BAP_QOS_CFG_CODED) { shell_print(shell, "\t\t\tPHY: LE Coded"); } else { shell_print(shell, "\t\t\tPHY: Unknown"); } shell_print(shell, "\t\t\tFraming: %s", - (qos->framing == BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED ? "unframed" : "framed")); + (qos->framing == BT_BAP_QOS_CFG_FRAMING_UNFRAMED ? "unframed" : "framed")); shell_print(shell, "\t\t\tRTN: %d", qos->rtn); shell_print(shell, "\t\t\tSDU size: %d", qos->sdu); shell_print(shell, "\t\t\tMax Transport Latency: %d ms", qos->latency); @@ -1829,8 +1829,7 @@ static int cmd_phy(const struct shell *shell, size_t argc, char **argv) uint8_t phy = (uint8_t)atoi(argv[1]); - if (phy != BT_AUDIO_CODEC_QOS_1M && phy != BT_AUDIO_CODEC_QOS_2M && - phy != BT_AUDIO_CODEC_QOS_CODED) { + if (phy != BT_BAP_QOS_CFG_1M && phy != BT_BAP_QOS_CFG_2M && phy != BT_BAP_QOS_CFG_CODED) { shell_error(shell, "Invalid PHY"); return -EINVAL; } @@ -1865,11 +1864,11 @@ static int cmd_framing(const struct shell *shell, size_t argc, char **argv) if (strcasecmp(argv[1], "unframed") == 0) { broadcast_param[big_index].subgroups[sub_index].group_lc3_preset.qos.framing = - BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED; + BT_BAP_QOS_CFG_FRAMING_UNFRAMED; broadcast_param[big_index].subgroups[sub_index].preset_name = "Custom"; } else if (strcasecmp(argv[1], "framed") == 0) { broadcast_param[big_index].subgroups[sub_index].group_lc3_preset.qos.framing = - BT_AUDIO_CODEC_QOS_FRAMING_FRAMED; + BT_BAP_QOS_CFG_FRAMING_FRAMED; broadcast_param[big_index].subgroups[sub_index].preset_name = "Custom"; } else { shell_error(shell, "Invalid framing type"); diff --git a/samples/bluetooth/nrf_dm/src/main.c b/samples/bluetooth/nrf_dm/src/main.c index 8d0fb5cab7c0..ccb650a8e9ab 100644 --- a/samples/bluetooth/nrf_dm/src/main.c +++ b/samples/bluetooth/nrf_dm/src/main.c @@ -40,7 +40,7 @@ struct adv_mfg_data { static struct adv_mfg_data mfg_data; struct bt_le_adv_param adv_param_conn = - BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE | + BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_NOTIFY_SCAN_REQ, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, diff --git a/samples/bluetooth/peripheral_ams_client/src/main.c b/samples/bluetooth/peripheral_ams_client/src/main.c index fb36e46b56a4..4de68bd79392 100644 --- a/samples/bluetooth/peripheral_ams_client/src/main.c +++ b/samples/bluetooth/peripheral_ams_client/src/main.c @@ -479,7 +479,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); return 0; diff --git a/samples/bluetooth/peripheral_ancs_client/src/main.c b/samples/bluetooth/peripheral_ancs_client/src/main.c index 31e0f9f4b3f3..2a2072f4fb6d 100644 --- a/samples/bluetooth/peripheral_ancs_client/src/main.c +++ b/samples/bluetooth/peripheral_ancs_client/src/main.c @@ -730,7 +730,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return 0; diff --git a/samples/bluetooth/peripheral_bms/src/main.c b/samples/bluetooth/peripheral_bms/src/main.c index a8b8012cc8e0..2b128b6c689b 100644 --- a/samples/bluetooth/peripheral_bms/src/main.c +++ b/samples/bluetooth/peripheral_bms/src/main.c @@ -217,7 +217,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); diff --git a/samples/bluetooth/peripheral_cgms/src/main.c b/samples/bluetooth/peripheral_cgms/src/main.c index 5c0249d52a3d..e8832571a2ab 100644 --- a/samples/bluetooth/peripheral_cgms/src/main.c +++ b/samples/bluetooth/peripheral_cgms/src/main.c @@ -151,7 +151,7 @@ int main(void) printk("Error occurred when initializing cgm service (err %d)\n", err); return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); return 0; diff --git a/samples/bluetooth/peripheral_cts_client/src/main.c b/samples/bluetooth/peripheral_cts_client/src/main.c index 5a0ddfaad91a..aaabc343655f 100644 --- a/samples/bluetooth/peripheral_cts_client/src/main.c +++ b/samples/bluetooth/peripheral_cts_client/src/main.c @@ -346,7 +346,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return 0; diff --git a/samples/bluetooth/peripheral_gatt_dm/src/main.c b/samples/bluetooth/peripheral_gatt_dm/src/main.c index b30a744606ea..5f44853db4c3 100644 --- a/samples/bluetooth/peripheral_gatt_dm/src/main.c +++ b/samples/bluetooth/peripheral_gatt_dm/src/main.c @@ -250,7 +250,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); diff --git a/samples/bluetooth/peripheral_hids_keyboard/src/main.c b/samples/bluetooth/peripheral_hids_keyboard/src/main.c index facd9a4a5065..aacd17f48f70 100644 --- a/samples/bluetooth/peripheral_hids_keyboard/src/main.c +++ b/samples/bluetooth/peripheral_hids_keyboard/src/main.c @@ -170,8 +170,7 @@ static void advertising_start(void) { int err; const struct bt_le_adv_param *adv_param = BT_LE_ADV_PARAM( - BT_LE_ADV_OPT_CONNECTABLE | - BT_LE_ADV_OPT_ONE_TIME, + BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL); diff --git a/samples/bluetooth/peripheral_hids_mouse/src/main.c b/samples/bluetooth/peripheral_hids_mouse/src/main.c index 720abcb3c4c5..0c5f42456a41 100644 --- a/samples/bluetooth/peripheral_hids_mouse/src/main.c +++ b/samples/bluetooth/peripheral_hids_mouse/src/main.c @@ -196,8 +196,7 @@ static void advertising_continue(void) return; } - adv_param = *BT_LE_ADV_CONN; - adv_param.options |= BT_LE_ADV_OPT_ONE_TIME; + adv_param = *BT_LE_ADV_CONN_FAST_2; err = bt_le_adv_start(&adv_param, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { diff --git a/samples/bluetooth/peripheral_hr_coded/src/main.c b/samples/bluetooth/peripheral_hr_coded/src/main.c index 985183457bee..eb8c4e06055b 100644 --- a/samples/bluetooth/peripheral_hr_coded/src/main.c +++ b/samples/bluetooth/peripheral_hr_coded/src/main.c @@ -94,7 +94,7 @@ static int create_advertising_coded(void) { int err; struct bt_le_adv_param param = - BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE | + BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CODED, BT_GAP_ADV_FAST_INT_MIN_2, diff --git a/samples/bluetooth/peripheral_lbs/src/main.c b/samples/bluetooth/peripheral_lbs/src/main.c index 8ceee699c72f..fb21b433181c 100644 --- a/samples/bluetooth/peripheral_lbs/src/main.c +++ b/samples/bluetooth/peripheral_lbs/src/main.c @@ -233,7 +233,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); diff --git a/samples/bluetooth/peripheral_mds/src/main.c b/samples/bluetooth/peripheral_mds/src/main.c index 9d2ac9828983..788c538f2c19 100644 --- a/samples/bluetooth/peripheral_mds/src/main.c +++ b/samples/bluetooth/peripheral_mds/src/main.c @@ -332,7 +332,7 @@ int main(void) } } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); diff --git a/samples/bluetooth/peripheral_nfc_pairing/prj.conf b/samples/bluetooth/peripheral_nfc_pairing/prj.conf index 3c8ddccfec47..e0271c42d6be 100644 --- a/samples/bluetooth/peripheral_nfc_pairing/prj.conf +++ b/samples/bluetooth/peripheral_nfc_pairing/prj.conf @@ -25,6 +25,7 @@ CONFIG_NFC_TNEP_CH=y CONFIG_BT=y CONFIG_BT_SMP=y CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y +CONFIG_BT_SMP_SC_PAIR_ONLY=n CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_NFC_pairing" diff --git a/samples/bluetooth/peripheral_nfc_pairing/src/main.c b/samples/bluetooth/peripheral_nfc_pairing/src/main.c index a86bbdfe6d97..e05510a03038 100644 --- a/samples/bluetooth/peripheral_nfc_pairing/src/main.c +++ b/samples/bluetooth/peripheral_nfc_pairing/src/main.c @@ -213,8 +213,7 @@ static void advertising_continue(void) } else { int err; - adv_param = *BT_LE_ADV_CONN; - adv_param.options |= BT_LE_ADV_OPT_ONE_TIME; + adv_param = *BT_LE_ADV_CONN_FAST_2; err = bt_le_adv_start(&adv_param, ad, ARRAY_SIZE(ad), NULL, 0); diff --git a/samples/bluetooth/peripheral_power_profiling/prj.conf b/samples/bluetooth/peripheral_power_profiling/prj.conf index 7e3bce03328b..551f72a50c5d 100644 --- a/samples/bluetooth/peripheral_power_profiling/prj.conf +++ b/samples/bluetooth/peripheral_power_profiling/prj.conf @@ -6,6 +6,7 @@ CONFIG_BT=y CONFIG_BT_SMP=y +CONFIG_BT_SMP_SC_PAIR_ONLY=n CONFIG_BT_PERIPHERAL=y CONFIG_BT_DEVICE_NAME="Nordic_Power_Profiling" CONFIG_BT_EXT_ADV=y diff --git a/samples/bluetooth/peripheral_power_profiling/src/main.c b/samples/bluetooth/peripheral_power_profiling/src/main.c index b59d6d303b80..b7ee17e679f4 100644 --- a/samples/bluetooth/peripheral_power_profiling/src/main.c +++ b/samples/bluetooth/peripheral_power_profiling/src/main.c @@ -98,7 +98,7 @@ static const struct bt_data non_connectable_sd_data[] = { }; static const struct bt_le_adv_param *connectable_ad_params = - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, CONNECTABLE_ADV_INTERVAL_MIN, CONNECTABLE_ADV_INTERVAL_MAX, NULL); diff --git a/samples/bluetooth/peripheral_rscs/src/main.c b/samples/bluetooth/peripheral_rscs/src/main.c index 0bc742383630..f01e07c43f79 100644 --- a/samples/bluetooth/peripheral_rscs/src/main.c +++ b/samples/bluetooth/peripheral_rscs/src/main.c @@ -288,7 +288,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return 0; diff --git a/samples/bluetooth/peripheral_status/src/main.c b/samples/bluetooth/peripheral_status/src/main.c index f78be8652570..6f7b3776e64f 100644 --- a/samples/bluetooth/peripheral_status/src/main.c +++ b/samples/bluetooth/peripheral_status/src/main.c @@ -218,7 +218,7 @@ int main(void) settings_load(); } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { printk("Advertising failed to start (err %d)\n", err); return 0; diff --git a/samples/bluetooth/peripheral_status/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf b/samples/bluetooth/peripheral_status/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf index e1065667897d..c584aa911a24 100644 --- a/samples/bluetooth/peripheral_status/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf +++ b/samples/bluetooth/peripheral_status/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf @@ -47,6 +47,7 @@ CONFIG_USB_CDC_ACM=y CONFIG_CBPRINTF_NANO=y CONFIG_TIMESLICING=n CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n CONFIG_CONSOLE=n CONFIG_CONSOLE_HANDLER=n CONFIG_UART_CONSOLE=n diff --git a/samples/bluetooth/peripheral_uart/src/main.c b/samples/bluetooth/peripheral_uart/src/main.c index 7e2d657891b5..efd2481c6830 100644 --- a/samples/bluetooth/peripheral_uart/src/main.c +++ b/samples/bluetooth/peripheral_uart/src/main.c @@ -621,7 +621,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { LOG_ERR("Advertising failed to start (err %d)", err); diff --git a/samples/bluetooth/peripheral_with_multiple_identities/src/main.c b/samples/bluetooth/peripheral_with_multiple_identities/src/main.c index a9416ea7f493..d39062acedff 100644 --- a/samples/bluetooth/peripheral_with_multiple_identities/src/main.c +++ b/samples/bluetooth/peripheral_with_multiple_identities/src/main.c @@ -126,7 +126,7 @@ static int setup_advertiser(uint8_t id_adv) /* Initialize the parameters for each connecable advertiser. */ struct bt_le_adv_param adv_param = - BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONNECTABLE, + BT_LE_ADV_PARAM_INIT(BT_LE_ADV_OPT_CONN, MIN_ADV_INTERVAL, MAX_ADV_INTERVAL, NULL); diff --git a/samples/bluetooth/radio_notification_cb/src/peripheral.c b/samples/bluetooth/radio_notification_cb/src/peripheral.c index a4f4bc91c7ad..98ee323df5ce 100644 --- a/samples/bluetooth/radio_notification_cb/src/peripheral.c +++ b/samples/bluetooth/radio_notification_cb/src/peripheral.c @@ -16,7 +16,7 @@ void adv_start(void) { int err; - err = bt_le_adv_start(BT_LE_ADV_CONN_ONE_TIME, ad, ARRAY_SIZE(ad), NULL, 0); + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), NULL, 0); if (err) { printk("Advertising failed to start (err %d)\n", err); return; diff --git a/samples/bluetooth/shell_bt_nus/src/main.c b/samples/bluetooth/shell_bt_nus/src/main.c index ab4ce3e40a40..48302a24afa4 100644 --- a/samples/bluetooth/shell_bt_nus/src/main.c +++ b/samples/bluetooth/shell_bt_nus/src/main.c @@ -151,7 +151,7 @@ int main(void) return 0; } - err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, + err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (err) { LOG_ERR("Advertising failed to start (err %d)", err); diff --git a/samples/bluetooth/subrating/src/main.c b/samples/bluetooth/subrating/src/main.c index 9940c8c4b99d..1ec935746ad2 100644 --- a/samples/bluetooth/subrating/src/main.c +++ b/samples/bluetooth/subrating/src/main.c @@ -162,8 +162,7 @@ static void adv_start(void) int err; const struct bt_le_adv_param *adv_param = - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | - BT_LE_ADV_OPT_ONE_TIME, + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL); diff --git a/samples/bluetooth/throughput/src/main.c b/samples/bluetooth/throughput/src/main.c index 40698a307bac..b499a7952341 100644 --- a/samples/bluetooth/throughput/src/main.c +++ b/samples/bluetooth/throughput/src/main.c @@ -281,8 +281,7 @@ static void scan_start(void) static void adv_start(void) { const struct bt_le_adv_param *adv_param = - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | - BT_LE_ADV_OPT_ONE_TIME, + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL); diff --git a/samples/cellular/battery/prj.conf b/samples/cellular/battery/prj.conf index 38f05f94e5c5..01a707f321c3 100644 --- a/samples/cellular/battery/prj.conf +++ b/samples/cellular/battery/prj.conf @@ -12,6 +12,7 @@ CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y +CONFIG_POSIX_API=y # Modem library CONFIG_NRF_MODEM_LIB=y diff --git a/samples/cellular/gnss/src/assistance_minimal.c b/samples/cellular/gnss/src/assistance_minimal.c index 1ab9390646e7..64f31bc6fe6a 100644 --- a/samples/cellular/gnss/src/assistance_minimal.c +++ b/samples/cellular/gnss/src/assistance_minimal.c @@ -25,8 +25,6 @@ LOG_MODULE_DECLARE(gnss_sample, CONFIG_GNSS_SAMPLE_LOG_LEVEL); #define GPS_TO_UNIX_UTC_OFFSET_SECONDS (315964800UL) /* UTC/GPS time offset as of 1st of January 2017. */ #define GPS_TO_UTC_LEAP_SECONDS (18UL) -#define SEC_PER_HOUR (MIN_PER_HOUR * SEC_PER_MIN) -#define SEC_PER_DAY (HOUR_PER_DAY * SEC_PER_HOUR) #define DAYS_PER_WEEK (7UL) #define PLMN_STR_MAX_LEN 8 /* MCC + MNC + quotes */ diff --git a/samples/cellular/lwm2m_client/prj.conf b/samples/cellular/lwm2m_client/prj.conf index 3dee8af0e080..a4dda6d90de5 100644 --- a/samples/cellular/lwm2m_client/prj.conf +++ b/samples/cellular/lwm2m_client/prj.conf @@ -164,3 +164,7 @@ CONFIG_NET_SOCKETPAIR=y CONFIG_LWM2M_TICKLESS=y # Enable Release Assistance Indication CONFIG_LWM2M_CLIENT_UTILS_RAI=y + +# Enable Zephyr's ZVFS event file descriptor +CONFIG_ZVFS_EVENTFD=y +CONFIG_ZVFS_EVENTFD_MAX=2 diff --git a/samples/cellular/modem_shell/prj.conf b/samples/cellular/modem_shell/prj.conf index 566219fcf8e3..31734950f5a0 100644 --- a/samples/cellular/modem_shell/prj.conf +++ b/samples/cellular/modem_shell/prj.conf @@ -69,7 +69,6 @@ CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y -CONFIG_NET_SOCKETS_POSIX_NAMES=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y diff --git a/samples/cellular/modem_shell/src/gnss/gnss_supl_support.c b/samples/cellular/modem_shell/src/gnss/gnss_supl_support.c index 240151e4162d..060ee745e8fc 100644 --- a/samples/cellular/modem_shell/src/gnss/gnss_supl_support.c +++ b/samples/cellular/modem_shell/src/gnss/gnss_supl_support.c @@ -7,15 +7,11 @@ #include #include #include -#if !defined(CONFIG_NET_SOCKETS_POSIX_NAMES) #include #include #include #include #include -#else -#include -#endif #include #include "mosh_print.h" diff --git a/samples/cellular/nidd/prj.conf b/samples/cellular/nidd/prj.conf index 60a49e091705..9f145fdf4714 100644 --- a/samples/cellular/nidd/prj.conf +++ b/samples/cellular/nidd/prj.conf @@ -12,6 +12,7 @@ CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y +CONFIG_POSIX_API=y # LTE link control CONFIG_LTE_LINK_CONTROL=y diff --git a/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_coap_no_lte.conf b/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_coap_no_lte.conf index 585dc1d67f16..f41b0e42a06f 100644 --- a/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_coap_no_lte.conf +++ b/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_coap_no_lte.conf @@ -107,7 +107,6 @@ CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=4850 ## Enable WIFI_MGMT_EXT and WIFI_CREDENTIALS for simplified Wi-Fi connection setup CONFIG_WIFI_CREDENTIALS=y -CONFIG_WIFI_MGMT_EXT=y ## Enable flash and NVS settings, required by WIFI_CREDENTIALS CONFIG_SETTINGS=y diff --git a/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_mqtt_no_lte.conf b/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_mqtt_no_lte.conf index fe0aad1a5da1..f1affe143ad1 100644 --- a/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_mqtt_no_lte.conf +++ b/samples/cellular/nrf_cloud_multi_service/overlay_nrf700x_wifi_mqtt_no_lte.conf @@ -106,7 +106,6 @@ CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=4850 ## Enable WIFI_MGMT_EXT and WIFI_CREDENTIALS for simplified Wi-Fi connection setup CONFIG_WIFI_CREDENTIALS=y -CONFIG_WIFI_MGMT_EXT=y ## Use compile-time client ID for nRF Cloud CONFIG_NRF_CLOUD_CLIENT_ID_SRC_COMPILE_TIME=y diff --git a/samples/cellular/udp/prj.conf b/samples/cellular/udp/prj.conf index 9307ea553abf..62ca562a16d8 100644 --- a/samples/cellular/udp/prj.conf +++ b/samples/cellular/udp/prj.conf @@ -14,6 +14,7 @@ CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y +CONFIG_POSIX_API=y # LTE link control CONFIG_LTE_LINK_CONTROL=y diff --git a/samples/common/mcumgr_bt_ota_dfu/Kconfig b/samples/common/mcumgr_bt_ota_dfu/Kconfig index f35e51406a88..16fd21a3e50d 100644 --- a/samples/common/mcumgr_bt_ota_dfu/Kconfig +++ b/samples/common/mcumgr_bt_ota_dfu/Kconfig @@ -116,7 +116,7 @@ endif # NCS_SAMPLE_MCUMGR_BT_OTA_DFU config NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP bool "MCUmgr OTA DFU speedup" - depends on BT_CTLR || BT_HCI_HOST + depends on HAS_BT_CTLR || BT_HCI_HOST help Enable this option to speed up the OTA DFU transfer over Bluetooth. This option extends the Bluetooth buffers to extend Bluetooth MTU @@ -139,7 +139,7 @@ config BT_BUF_ACL_RX_SIZE default 502 config BT_CTLR_DATA_LENGTH_MAX - default 251 if BT_CTLR + default 251 if HAS_BT_CTLR endif # NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP diff --git a/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf b/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf index 79c0bcae3e1e..d41acfbe815c 100644 --- a/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf +++ b/samples/debug/memfault/boards/nrf7002dk_nrf5340_cpuapp.conf @@ -59,7 +59,6 @@ CONFIG_NET_TC_TX_COUNT=1 # Wi-Fi CONFIG_WIFI=y CONFIG_WIFI_NRF70=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_NET_L2_WIFI_SHELL=y CONFIG_NET_SHELL=y CONFIG_WIFI_CREDENTIALS=y diff --git a/samples/matter/common/dts/nrf54h20/nrf54h20_ram_allocation.dtsi b/samples/matter/common/dts/nrf54h20/nrf54h20_ram_allocation.dtsi index 4974d98bcfe0..c427b864f06f 100644 --- a/samples/matter/common/dts/nrf54h20/nrf54h20_ram_allocation.dtsi +++ b/samples/matter/common/dts/nrf54h20/nrf54h20_ram_allocation.dtsi @@ -10,9 +10,9 @@ &cpuapp_ram0x_region{ status = "okay"; - reg = <0x2f010000 DT_SIZE_K(512)>; - ranges = <0x0 0x2f010000 0x6e000>; + reg = <0x2f011000 DT_SIZE_K(516)>; + ranges = <0x0 0x2f011000 0x6e000>; cpuapp_data: memory@1000 { - reg = <0x1000 DT_SIZE_K(508)>; + reg = <0x1000 DT_SIZE_K(512)>; }; }; diff --git a/samples/matter/common/src/bt_nus/bt_nus_service.cpp b/samples/matter/common/src/bt_nus/bt_nus_service.cpp index 216160011754..af067d107139 100644 --- a/samples/matter/common/src/bt_nus/bt_nus_service.cpp +++ b/samples/matter/common/src/bt_nus/bt_nus_service.cpp @@ -18,7 +18,7 @@ LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); namespace { -constexpr uint32_t kAdvertisingOptions = BT_LE_ADV_OPT_CONNECTABLE; +constexpr uint32_t kAdvertisingOptions = BT_LE_ADV_OPT_CONN; constexpr uint8_t kAdvertisingFlags = BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR; constexpr uint8_t kBTUuid[] = { BT_UUID_NUS_VAL }; } /* namespace */ diff --git a/samples/matter/common/src/dfu/smp/dfu_over_smp.cpp b/samples/matter/common/src/dfu/smp/dfu_over_smp.cpp index 33a46e656673..e14b15f6e878 100644 --- a/samples/matter/common/src/dfu/smp/dfu_over_smp.cpp +++ b/samples/matter/common/src/dfu/smp/dfu_over_smp.cpp @@ -33,7 +33,7 @@ using namespace ::chip; using namespace ::chip::DeviceLayer; constexpr static uint8_t kAdvertisingPriority = UINT8_MAX; -constexpr static uint32_t kAdvertisingOptions = BT_LE_ADV_OPT_CONNECTABLE; +constexpr static uint32_t kAdvertisingOptions = BT_LE_ADV_OPT_CONN; constexpr static uint16_t kAdvertisingIntervalMin = 400; constexpr static uint16_t kAdvertisingIntervalMax = 500; constexpr static uint8_t kAdvertisingFlags = BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR; diff --git a/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay index 77d60d7e72ee..2b5e970e0e6f 100644 --- a/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_bulb/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -28,11 +28,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - &pwm0 { pinctrl-0 = <&pwm0_default_alt>; pinctrl-1 = <&pwm0_sleep_alt>; diff --git a/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay index fe746730297a..5d12a3842fb8 100644 --- a/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_bulb/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -29,11 +29,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - &pwm0 { pinctrl-0 = <&pwm0_default_alt>; pinctrl-1 = <&pwm0_sleep_alt>; diff --git a/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay index b2f9923aa7e7..6f64906bedb1 100644 --- a/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -12,11 +12,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay index 280120007ef4..91e8cd7a3411 100644 --- a/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/light_switch/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -15,8 +15,3 @@ watchdog0 = &wdt0; }; }; - -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; diff --git a/samples/matter/lock/CMakeLists.txt b/samples/matter/lock/CMakeLists.txt index a9b5746bd5d2..3e06c01b38a6 100644 --- a/samples/matter/lock/CMakeLists.txt +++ b/samples/matter/lock/CMakeLists.txt @@ -48,6 +48,11 @@ if(CONFIG_THREAD_WIFI_SWITCHING) ) endif() +# Do not treat warnings as errors while the variable may be uninitialized for this sample. +# In the door-lock-server implementation, there is a warning that the C++ "optional" +# variable may be uninitialized, but actually, it is wrongly interpreted by the Zephyr toolchain. +target_compile_options(app PRIVATE -Wno-error=maybe-uninitialized) + chip_configure_data_model(app INCLUDE_SERVER BYPASS_IDL diff --git a/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay index b2f9923aa7e7..6f64906bedb1 100644 --- a/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/lock/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -12,11 +12,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay index 280120007ef4..91e8cd7a3411 100644 --- a/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -15,8 +15,3 @@ watchdog0 = &wdt0; }; }; - -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; diff --git a/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp_nrf7001.overlay b/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp_nrf7001.overlay index 837e117d126a..91e8cd7a3411 100644 --- a/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp_nrf7001.overlay +++ b/samples/matter/lock/boards/nrf7002dk_nrf5340_cpuapp_nrf7001.overlay @@ -15,8 +15,3 @@ watchdog0 = &wdt0; }; }; - -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; diff --git a/samples/matter/smoke_co_alarm/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/smoke_co_alarm/boards/nrf5340dk_nrf5340_cpuapp.overlay index fe200de812e0..87390a483316 100644 --- a/samples/matter/smoke_co_alarm/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/smoke_co_alarm/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -12,11 +12,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay index b2f9923aa7e7..6f64906bedb1 100644 --- a/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/template/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -12,11 +12,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay b/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay index 79e4b79812f0..1f222f086634 100644 --- a/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay +++ b/samples/matter/template/boards/nrf7002dk_nrf5340_cpuapp.overlay @@ -16,8 +16,3 @@ }; }; - -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; diff --git a/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay b/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay index 765764531f5e..dda97825f5d1 100644 --- a/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ b/samples/matter/window_covering/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -31,11 +31,6 @@ }; }; -/* Set IPC thread priority to the highest value to not collide with other threads. */ -&ipc0 { - zephyr,priority = <0 PRIO_COOP>; -}; - /* Disable unused peripherals to reduce power consumption */ &adc { status = "disabled"; diff --git a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 619550810638..c4cbedac7128 100644 --- a/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/aws_iot/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -25,7 +25,6 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=4 # Wi-Fi CONFIG_WIFI=y CONFIG_WIFI_NRF70=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y diff --git a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 6c86a1fb3f29..6aaf757239a8 100644 --- a/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/azure_iot_hub/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -26,7 +26,6 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=4 CONFIG_WIFI=y CONFIG_WIFI_NRF70=y CONFIG_WIFI_NRF70_LOG_LEVEL_ERR=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_FLASH_PAGE_LAYOUT=y diff --git a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 13a147d44647..001f13b7c1c0 100644 --- a/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/coap_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -28,7 +28,6 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=4 # Wi-Fi CONFIG_WIFI=y CONFIG_WIFI_NRF70=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_NET_L2_WIFI_SHELL=y CONFIG_FLASH=y diff --git a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 0b588e594f65..30aa95a84d66 100644 --- a/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/download/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -26,7 +26,6 @@ CONFIG_L2_WIFI_CONNECTIVITY_AUTO_CONNECT=n CONFIG_WIFI=y CONFIG_WIFI_NRF70=y CONFIG_WIFI_NRF70_LOG_LEVEL_ERR=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y # Shell diff --git a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index 9eb362cb1681..16c2419291db 100644 --- a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -20,7 +20,6 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=4 CONFIG_WIFI=y CONFIG_WIFI_NRF70=y CONFIG_WIFI_NRF70_LOG_LEVEL_ERR=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y # Shell diff --git a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index e826936d5160..e43b1fbb6511 100644 --- a/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/mqtt/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -28,7 +28,6 @@ CONFIG_NRF70_MAX_TX_AGGREGATION=4 CONFIG_WIFI=y CONFIG_WIFI_NRF70=y CONFIG_WIFI_NRF70_LOG_LEVEL_ERR=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y # Shell diff --git a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf index a74c6f1af18a..4e02c91301cd 100644 --- a/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf +++ b/samples/net/udp/boards/nrf7002dk_nrf5340_cpuapp_ns.conf @@ -13,7 +13,6 @@ CONFIG_MAIN_STACK_SIZE=6144 # Wi-Fi CONFIG_WIFI=y CONFIG_WIFI_NRF70=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y # Optimize Wi-Fi stack to save some memory diff --git a/samples/nrf5340/empty_app_core/src/main.c b/samples/nrf5340/empty_app_core/src/main.c index df490a7a8e35..764f7bdfe69e 100644 --- a/samples/nrf5340/empty_app_core/src/main.c +++ b/samples/nrf5340/empty_app_core/src/main.c @@ -10,6 +10,8 @@ #include #include +#define LFXO_NODE DT_NODELABEL(lfxo) + /** @brief Power OFF entire RAM and suspend CPU forever. * * Function operates only on `register` variables, so GCC will not use @@ -59,7 +61,11 @@ static int network_gpio_allow(void) * and P0.01 (XL2), as they need to stay configured with the value * Peripheral. */ - uint32_t start_pin = (IS_ENABLED(CONFIG_SOC_ENABLE_LFXO) ? 2 : 0); +#if DT_NODE_HAS_PROP(LFXO_NODE, load_capacitors) || defined(CONFIG_SOC_ENABLE_LFXO) + uint32_t start_pin = 2; +#else + uint32_t start_pin = 0; +#endif /* Allow the network core to use all GPIOs. */ for (uint32_t i = start_pin; i < P0_PIN_NUM; i++) { diff --git a/samples/nrf_rpc/protocols_serialization/client/Kconfig b/samples/nrf_rpc/protocols_serialization/client/Kconfig index d4fbfd8ff3d4..40b1feb1452b 100644 --- a/samples/nrf_rpc/protocols_serialization/client/Kconfig +++ b/samples/nrf_rpc/protocols_serialization/client/Kconfig @@ -6,9 +6,6 @@ menu "Protocols serialization client" -config BT_CTLR - default n - choice BT_NUS_LOG_LEVEL_CHOICE default BT_NUS_LOG_LEVEL_DBG if DEBUG endchoice diff --git a/samples/nrf_rpc/protocols_serialization/client/snippets/ble/ble.conf b/samples/nrf_rpc/protocols_serialization/client/snippets/ble/ble.conf index e5a65b429746..8616047183a5 100644 --- a/samples/nrf_rpc/protocols_serialization/client/snippets/ble/ble.conf +++ b/samples/nrf_rpc/protocols_serialization/client/snippets/ble/ble.conf @@ -17,6 +17,7 @@ CONFIG_BT_DEVICE_APPEARANCE=833 CONFIG_BT_MAX_CONN=1 CONFIG_BT_MAX_PAIRED=1 CONFIG_BT_CTLR=n +CONFIG_BT_HCI=y CONFIG_BT_SHELL=y # Enable the NUS service diff --git a/samples/nrf_rpc/protocols_serialization/server/Kconfig b/samples/nrf_rpc/protocols_serialization/server/Kconfig index 75df033f0a66..169c705f228b 100644 --- a/samples/nrf_rpc/protocols_serialization/server/Kconfig +++ b/samples/nrf_rpc/protocols_serialization/server/Kconfig @@ -27,12 +27,8 @@ if SOC_NRF54L15 config BT_CTLR_ECDH default n -config BT_USE_PSA_API - default y if BT_TINYCRYPT_ECC - select PSA_WANT_ALG_ECB_NO_PADDING - config BT_LONG_WQ_STACK_SIZE - default 2048 if BT_USE_PSA_API + default 2048 endif diff --git a/samples/nrf_rpc/protocols_serialization/server/snippets/ble/ble.conf b/samples/nrf_rpc/protocols_serialization/server/snippets/ble/ble.conf index f92938c4daa6..0fb6ff35f8c9 100644 --- a/samples/nrf_rpc/protocols_serialization/server/snippets/ble/ble.conf +++ b/samples/nrf_rpc/protocols_serialization/server/snippets/ble/ble.conf @@ -14,7 +14,6 @@ CONFIG_BT_PERIPHERAL=y CONFIG_BT_MAX_CONN=1 CONFIG_BT_MAX_PAIRED=1 CONFIG_BT_SMP=n -CONFIG_BT_ECC=n CONFIG_BT_DEVICE_APPEARANCE=833 # BT Device name must be the same as on the client side diff --git a/samples/openthread/cli/src/ble.c b/samples/openthread/cli/src/ble.c index 6ad0c996f1a8..64a4a8c3a847 100644 --- a/samples/openthread/cli/src/ble.c +++ b/samples/openthread/cli/src/ble.c @@ -25,7 +25,7 @@ static struct bt_conn_cb conn_callbacks; void ble_enable(void) { const struct bt_le_adv_param *adv_param = BT_LE_ADV_PARAM( - BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, ADV_INT_MIN, ADV_INT_MAX, NULL); + BT_LE_ADV_OPT_CONN, ADV_INT_MIN, ADV_INT_MAX, NULL); bt_enable(NULL); bt_conn_cb_register(&conn_callbacks); diff --git a/samples/openthread/coap_client/src/ble_utils.c b/samples/openthread/coap_client/src/ble_utils.c index fd1f655a6ff5..cdb63c700e3b 100644 --- a/samples/openthread/coap_client/src/ble_utils.c +++ b/samples/openthread/coap_client/src/ble_utils.c @@ -175,7 +175,7 @@ int ble_utils_init(struct bt_nus_cb *nus_clbs, ble_connection_cb_t on_connect, goto end; } - ret = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, + ret = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (ret) { LOG_ERR("Advertising failed to start (error: %d)", ret); diff --git a/samples/openthread/coprocessor/README.rst b/samples/openthread/coprocessor/README.rst index 1120e62bf34b..0f1cc1e21675 100644 --- a/samples/openthread/coprocessor/README.rst +++ b/samples/openthread/coprocessor/README.rst @@ -10,7 +10,7 @@ Thread: Co-processor The :ref:`Thread ` Co-processor sample demonstrates how to implement OpenThread's :ref:`thread_architectures_designs_cp` inside the Zephyr environment. The sample uses the :ref:`thread_architectures_designs_cp_rcp` architecture. -The sample is based on Zephyr's :zephyr:code-sample:`coprocessor` sample. +The sample is based on Zephyr's :zephyr:code-sample:`openthread-coprocessor` sample. However, it customizes Zephyr's sample to fulfill the |NCS| requirements (for example, by increasing the stack size dedicated for the user application), and also extends it with features such as: * Increased Mbed TLS heap size. diff --git a/samples/openthread/coprocessor/boards/nrf52840dongle_nrf52840.overlay b/samples/openthread/coprocessor/boards/nrf52840dongle_nrf52840.overlay index ef3ccdd0cba5..7ed19b5a85a3 100644 --- a/samples/openthread/coprocessor/boards/nrf52840dongle_nrf52840.overlay +++ b/samples/openthread/coprocessor/boards/nrf52840dongle_nrf52840.overlay @@ -16,6 +16,6 @@ }; chosen { - zephyr,ot-uart = &cdc_acm_uart; + zephyr,ot-uart = &board_cdc_acm_uart; }; }; diff --git a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf index e029d65ce7bf..0e189be2079b 100644 --- a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l05_cpuapp.conf @@ -9,4 +9,3 @@ CONFIG_NRFX_TIMER0=n # Enable the necessary drivers CONFIG_NRFX_TIMER10=y -CONFIG_NRFX_GPPI=y diff --git a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf index e029d65ce7bf..0e189be2079b 100644 --- a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l10_cpuapp.conf @@ -9,4 +9,3 @@ CONFIG_NRFX_TIMER0=n # Enable the necessary drivers CONFIG_NRFX_TIMER10=y -CONFIG_NRFX_GPPI=y diff --git a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf index e029d65ce7bf..0e189be2079b 100644 --- a/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/peripheral/radio_test/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -9,4 +9,3 @@ CONFIG_NRFX_TIMER0=n # Enable the necessary drivers CONFIG_NRFX_TIMER10=y -CONFIG_NRFX_GPPI=y diff --git a/samples/peripheral/radio_test/prj.conf b/samples/peripheral/radio_test/prj.conf index c130dc5293b8..5b73af78fff9 100644 --- a/samples/peripheral/radio_test/prj.conf +++ b/samples/peripheral/radio_test/prj.conf @@ -10,6 +10,7 @@ CONFIG_SHELL=y CONFIG_DYNAMIC_INTERRUPTS=y CONFIG_NRFX_TIMER0=y +CONFIG_NRFX_GPPI=y CONFIG_CLOCK_CONTROL=y CONFIG_ENTROPY_GENERATOR=y diff --git a/samples/suit/flash_companion/prj.conf b/samples/suit/flash_companion/prj.conf index 24223dfcadf2..02c6f19412f3 100644 --- a/samples/suit/flash_companion/prj.conf +++ b/samples/suit/flash_companion/prj.conf @@ -63,7 +63,7 @@ CONFIG_USE_DT_CODE_PARTITION=y CONFIG_SUIT_LOCAL_ENVELOPE_GENERATE=n CONFIG_SUIT_ENVELOPE_TARGET="" CONFIG_NRF_REGTOOL_GENERATE_UICR=n -CONFIG_NRF_REGTOOL_GENERATE_BICR=n +CONFIG_SOC_NRF54H20_GENERATE_BICR=n # Enable canonical zcbor encoding CONFIG_ZCBOR_CANONICAL=y diff --git a/samples/suit/recovery/prj.conf b/samples/suit/recovery/prj.conf index 59cb90b07d6a..0344ebbb466b 100644 --- a/samples/suit/recovery/prj.conf +++ b/samples/suit/recovery/prj.conf @@ -11,7 +11,7 @@ CONFIG_SUIT_RECOVERY=y # It is the main application which is responsible for flashing and generating the UICR # configuration - the recovery application should not do it. CONFIG_NRF_REGTOOL_GENERATE_UICR=n -CONFIG_NRF_REGTOOL_GENERATE_BICR=n +CONFIG_SOC_NRF54H20_GENERATE_BICR=n ############ @@ -95,7 +95,7 @@ CONFIG_EARLY_CONSOLE=n CONFIG_ARM_MPU=n CONFIG_TIMESLICING=n -CONFIG_COMMON_LIBC_MALLOC=n +CONFIG_COMMON_LIBC_MALLOC=y CONFIG_LOG=n CONFIG_ASSERT=n @@ -115,3 +115,5 @@ CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n CONFIG_BT_CTLR_PRIVACY=n CONFIG_BT_CTLR_PHY_2M=n + +CONFIG_MBEDTLS_PSA_CRYPTO_LEGACY_RNG=y diff --git a/samples/suit/recovery/sysbuild/hci_ipc.conf b/samples/suit/recovery/sysbuild/hci_ipc.conf index c2f546c93beb..9dcfcfa57d18 100644 --- a/samples/suit/recovery/sysbuild/hci_ipc.conf +++ b/samples/suit/recovery/sysbuild/hci_ipc.conf @@ -11,7 +11,7 @@ CONFIG_SUIT_RECOVERY=y # It is the main application which is responsible for flashing and generating the UICR # configuration - the recovery application should not do it. CONFIG_NRF_REGTOOL_GENERATE_UICR=n -CONFIG_NRF_REGTOOL_GENERATE_BICR=n +CONFIG_SOC_NRF54H20_GENERATE_BICR=n ########### CONFIG_BT_BUF_ACL_RX_SIZE=502 diff --git a/samples/suit/smp_transfer/sysbuild/recovery_hci_ipc.overlay b/samples/suit/smp_transfer/sysbuild/recovery_hci_ipc.overlay index 5d0abbea4925..b06fa93c52ef 100644 --- a/samples/suit/smp_transfer/sysbuild/recovery_hci_ipc.overlay +++ b/samples/suit/smp_transfer/sysbuild/recovery_hci_ipc.overlay @@ -6,6 +6,24 @@ #include "nrf54h20dk_nrf54h20_memory_map.dtsi" +/ { + chosen { + zephyr,entropy = &prng; + }; + + /delete-node/ psa-rng; + + prng: prng { + compatible = "nordic,entropy-prng"; + status = "okay"; + }; + +}; + +&cpusec_cpurad_ipc { + status = "disabled"; +}; + &uart135 { status = "disabled"; }; diff --git a/samples/suit/smp_transfer/sysbuild/smp_transfer_bt.conf b/samples/suit/smp_transfer/sysbuild/smp_transfer_bt.conf index cfd9a3dc3857..91d48e221b3d 100644 --- a/samples/suit/smp_transfer/sysbuild/smp_transfer_bt.conf +++ b/samples/suit/smp_transfer/sysbuild/smp_transfer_bt.conf @@ -20,6 +20,9 @@ CONFIG_MCUMGR_TRANSPORT_BT_CONN_PARAM_CONTROL=y # Enable logs over UART CONFIG_LOG=y +# Enable entropy source +CONFIG_NRF_SECURITY=y + # Enable the mcumgr Packet Reassembly feature over Bluetooth and its configuration dependencies. # MCUmgr buffer size is optimized to fit one SMP packet divided into five Bluetooth Write Commands, # transmitted with the maximum possible MTU value: 498 bytes. diff --git a/samples/wifi/ble_coex/prj.conf b/samples/wifi/ble_coex/prj.conf index b52485d1a7cf..0451c48134e2 100644 --- a/samples/wifi/ble_coex/prj.conf +++ b/samples/wifi/ble_coex/prj.conf @@ -66,7 +66,6 @@ CONFIG_NET_BUF_RX_COUNT=2 CONFIG_NET_BUF_TX_COUNT=48 CONFIG_HEAP_MEM_POOL_SIZE=230000 -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_STATIC=y CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid" diff --git a/samples/wifi/ble_coex/src/bt_throughput_test.c b/samples/wifi/ble_coex/src/bt_throughput_test.c index cb64e14f98c5..f28b32570fa2 100644 --- a/samples/wifi/ble_coex/src/bt_throughput_test.c +++ b/samples/wifi/ble_coex/src/bt_throughput_test.c @@ -262,8 +262,7 @@ static void scan_start(void) static void adv_start(void) { const struct bt_le_adv_param *adv_param = - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE | - BT_LE_ADV_OPT_ONE_TIME, + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL); diff --git a/samples/wifi/ble_coex/src/main.c b/samples/wifi/ble_coex/src/main.c index 782ca2d73732..71c4a89b6a59 100644 --- a/samples/wifi/ble_coex/src/main.c +++ b/samples/wifi/ble_coex/src/main.c @@ -34,7 +34,6 @@ LOG_MODULE_REGISTER(coex, CONFIG_LOG_DEFAULT_LEVEL); #include #include -#include /* For net_sprint_ll_addr_buf */ #include "net_private.h" diff --git a/samples/wifi/promiscuous/prj.conf b/samples/wifi/promiscuous/prj.conf index 80b3e1efd156..49245a83c879 100644 --- a/samples/wifi/promiscuous/prj.conf +++ b/samples/wifi/promiscuous/prj.conf @@ -13,7 +13,6 @@ CONFIG_WIFI_NM_WPA_SUPPLICANT=y CONFIG_NET_PROMISCUOUS_MODE=y CONFIG_NRF70_PROMISC_DATA_RX=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_STATIC=y CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid" diff --git a/samples/wifi/promiscuous/src/wifi_connection.c b/samples/wifi/promiscuous/src/wifi_connection.c index 1a335973154d..624058b30e6e 100644 --- a/samples/wifi/promiscuous/src/wifi_connection.c +++ b/samples/wifi/promiscuous/src/wifi_connection.c @@ -16,7 +16,6 @@ LOG_MODULE_REGISTER(wifi_connect, CONFIG_LOG_DEFAULT_LEVEL); #include #include "net_private.h" -#include #define WIFI_SHELL_MGMT_EVENTS (NET_EVENT_WIFI_CONNECT_RESULT | \ NET_EVENT_WIFI_DISCONNECT_RESULT) diff --git a/samples/wifi/provisioning/ble/prj.conf b/samples/wifi/provisioning/ble/prj.conf index b2f27e40f2a5..dcb7132aea54 100644 --- a/samples/wifi/provisioning/ble/prj.conf +++ b/samples/wifi/provisioning/ble/prj.conf @@ -98,7 +98,6 @@ CONFIG_NANOPB=y CONFIG_BT_WIFI_PROV=y CONFIG_BT_WIFI_PROV_LOG_LEVEL_INF=y -CONFIG_WIFI_MGMT_EXT=y # Setting BT supervision timeout to 75units (750ms) to avoid timeout of BT connection when radio is granted to Wi-Fi during scan. CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=75 diff --git a/samples/wifi/provisioning/ble/src/main.c b/samples/wifi/provisioning/ble/src/main.c index 6f695013efc0..8c400de4ccda 100644 --- a/samples/wifi/provisioning/ble/src/main.c +++ b/samples/wifi/provisioning/ble/src/main.c @@ -17,8 +17,7 @@ #include #include -#include -#include +#include #include @@ -34,11 +33,11 @@ #define ADV_DATA_FLAG_CONN_STATUS_BIT BIT(1) #define ADV_DATA_RSSI_IDX (BT_UUID_SIZE_128 + 3) -#define PROV_BT_LE_ADV_PARAM_FAST BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, \ +#define PROV_BT_LE_ADV_PARAM_FAST BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, \ BT_GAP_ADV_FAST_INT_MIN_2, \ BT_GAP_ADV_FAST_INT_MAX_2, NULL) -#define PROV_BT_LE_ADV_PARAM_SLOW BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONNECTABLE, \ +#define PROV_BT_LE_ADV_PARAM_SLOW BT_LE_ADV_PARAM(BT_LE_ADV_OPT_CONN, \ BT_GAP_ADV_SLOW_INT_MIN, \ BT_GAP_ADV_SLOW_INT_MAX, NULL) diff --git a/samples/wifi/raw_tx_packet/prj.conf b/samples/wifi/raw_tx_packet/prj.conf index e0ebcd5a0ff1..69d1087f930a 100644 --- a/samples/wifi/raw_tx_packet/prj.conf +++ b/samples/wifi/raw_tx_packet/prj.conf @@ -11,7 +11,6 @@ CONFIG_NRF70_RAW_DATA_TX=y # WPA supplicant CONFIG_WIFI_NM_WPA_SUPPLICANT=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_STATIC=y CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid" diff --git a/samples/wifi/raw_tx_packet/src/wifi_connection.c b/samples/wifi/raw_tx_packet/src/wifi_connection.c index 621960d49132..c101bc80e4fb 100644 --- a/samples/wifi/raw_tx_packet/src/wifi_connection.c +++ b/samples/wifi/raw_tx_packet/src/wifi_connection.c @@ -15,7 +15,6 @@ LOG_MODULE_REGISTER(wifi_connect, CONFIG_LOG_DEFAULT_LEVEL); #include #include "net_private.h" -#include #define WIFI_SHELL_MGMT_EVENTS (NET_EVENT_WIFI_CONNECT_RESULT | \ NET_EVENT_WIFI_DISCONNECT_RESULT) diff --git a/samples/wifi/shell/boards/thingy91x_nrf5340_cpuapp.conf b/samples/wifi/shell/boards/thingy91x_nrf5340_cpuapp.conf index 8e8e6e36b7fb..c02f67e58778 100644 --- a/samples/wifi/shell/boards/thingy91x_nrf5340_cpuapp.conf +++ b/samples/wifi/shell/boards/thingy91x_nrf5340_cpuapp.conf @@ -17,6 +17,7 @@ CONFIG_NFCT_PINS_AS_GPIOS=y CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_PRODUCT="Thingy:91 X Wi-Fi Shell" CONFIG_USB_CDC_ACM=y +CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y CONFIG_USB_COMPOSITE_DEVICE=y CONFIG_USB_MASS_STORAGE=n CONFIG_USB_DEVICE_MANUFACTURER="Nordic Semiconductor" diff --git a/samples/wifi/shell/prj.conf b/samples/wifi/shell/prj.conf index fc27d8b7c1a9..ba70efee554d 100644 --- a/samples/wifi/shell/prj.conf +++ b/samples/wifi/shell/prj.conf @@ -80,7 +80,6 @@ CONFIG_DATE_SHELL=y CONFIG_NET_CONFIG_AUTO_INIT=n CONFIG_POSIX_API=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y diff --git a/samples/wifi/shell/sample.yaml b/samples/wifi/shell/sample.yaml index 4a65894da504..cba7961f0802 100644 --- a/samples/wifi/shell/sample.yaml +++ b/samples/wifi/shell/sample.yaml @@ -224,19 +224,6 @@ tests: - ci_build - sysbuild - ci_samples_wifi - sample.nrf7002.shell.posix_names: - sysbuild: true - build_only: true - extra_args: - - CONFIG_POSIX_API=n - - CONIFG_NET_SOCKETS_POSIX_NAMES=y - integration_platforms: - - nrf7002dk/nrf5340/cpuapp - platform_allow: nrf7002dk/nrf5340/cpuapp - tags: - - ci_build - - sysbuild - - ci_samples_wifi sample.nrf7002_ns.shell: sysbuild: true build_only: true diff --git a/samples/wifi/shell/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf b/samples/wifi/shell/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf index a181ad338238..3e5337b86d9f 100644 --- a/samples/wifi/shell/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf +++ b/samples/wifi/shell/sysbuild/mcuboot/boards/thingy53_nrf5340_cpuapp.conf @@ -55,6 +55,7 @@ CONFIG_USB_CDC_ACM=y CONFIG_CBPRINTF_NANO=y CONFIG_TIMESLICING=n CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n CONFIG_CONSOLE=n CONFIG_CONSOLE_HANDLER=n CONFIG_UART_CONSOLE=n diff --git a/samples/wifi/sta/prj.conf b/samples/wifi/sta/prj.conf index 5a0d3a111f6b..0c227514fa44 100644 --- a/samples/wifi/sta/prj.conf +++ b/samples/wifi/sta/prj.conf @@ -11,7 +11,6 @@ CONFIG_WIFI_NM_WPA_SUPPLICANT=y CONFIG_WIFI_READY_LIB=y CONFIG_NRF_WIFI_RPU_RECOVERY=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_STATIC=y CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid" diff --git a/samples/wifi/sta/src/main.c b/samples/wifi/sta/src/main.c index fdfb3ae458f5..5134003c752d 100644 --- a/samples/wifi/sta/src/main.c +++ b/samples/wifi/sta/src/main.c @@ -23,7 +23,6 @@ LOG_MODULE_REGISTER(sta, CONFIG_LOG_DEFAULT_LEVEL); #include #include -#include #include #if defined(CONFIG_BOARD_NRF7002DK_NRF7001_NRF5340_CPUAPP) || \ diff --git a/samples/wifi/thread_coex/prj.conf b/samples/wifi/thread_coex/prj.conf index ce4d8c92d72f..03e2012c850c 100644 --- a/samples/wifi/thread_coex/prj.conf +++ b/samples/wifi/thread_coex/prj.conf @@ -59,7 +59,6 @@ CONFIG_NET_TC_TX_COUNT=1 CONFIG_HEAP_MEM_POOL_SIZE=230000 # Below Wi-Fi configs need to be modified based on security -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_STATIC=y CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid" diff --git a/samples/wifi/thread_coex/src/ot_coex_functions.h b/samples/wifi/thread_coex/src/ot_coex_functions.h index e57653950a56..d9242c8e7566 100644 --- a/samples/wifi/thread_coex/src/ot_coex_functions.h +++ b/samples/wifi/thread_coex/src/ot_coex_functions.h @@ -29,7 +29,6 @@ LOG_MODULE_REGISTER(ot_coex_functions, CONFIG_LOG_DEFAULT_LEVEL); #include #include -#include /* For net_sprint_ll_addr_buf */ #include "net_private.h" diff --git a/samples/wifi/throughput/prj.conf b/samples/wifi/throughput/prj.conf index b30da5bbd5f1..783b92c70d60 100644 --- a/samples/wifi/throughput/prj.conf +++ b/samples/wifi/throughput/prj.conf @@ -80,7 +80,6 @@ CONFIG_POSIX_CLOCK=y CONFIG_DATE_SHELL=y CONFIG_NET_CONFIG_AUTO_INIT=n -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y diff --git a/samples/wifi/twt/prj.conf b/samples/wifi/twt/prj.conf index 3aa53e680e66..1e1db3148d27 100644 --- a/samples/wifi/twt/prj.conf +++ b/samples/wifi/twt/prj.conf @@ -9,7 +9,6 @@ CONFIG_WIFI_NRF70=y # WPA supplicant CONFIG_WIFI_NM_WPA_SUPPLICANT=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_WIFI_CREDENTIALS_STATIC=y CONFIG_WIFI_CREDENTIALS_STATIC_SSID="Myssid" @@ -37,7 +36,6 @@ CONFIG_HEAP_MEM_POOL_SIZE=210000 CONFIG_NET_TC_TX_COUNT=1 # Below configs will increase tcp connection timeout -CONFIG_NET_TCP_ACK_TIMEOUT=60000 CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT=1000 CONFIG_NET_SOCKETS_CONNECT_TIMEOUT=10000 CONFIG_NET_TCP_RETRY_COUNT=10 diff --git a/samples/wifi/twt/src/main.c b/samples/wifi/twt/src/main.c index 6b49a5fc74c3..40140108e4ec 100644 --- a/samples/wifi/twt/src/main.c +++ b/samples/wifi/twt/src/main.c @@ -30,7 +30,6 @@ LOG_MODULE_REGISTER(twt, CONFIG_LOG_DEFAULT_LEVEL); #include #include -#include #include "net_private.h" #include "traffic_gen.h" diff --git a/samples/wifi/wfa_qt_app/prj.conf b/samples/wifi/wfa_qt_app/prj.conf index a80a33e48c89..841cc6116926 100644 --- a/samples/wifi/wfa_qt_app/prj.conf +++ b/samples/wifi/wfa_qt_app/prj.conf @@ -84,7 +84,6 @@ CONFIG_DATE_SHELL=y CONFIG_NET_CONFIG_AUTO_INIT=n CONFIG_NET_CONFIG_SETTINGS=y -CONFIG_WIFI_MGMT_EXT=y CONFIG_WIFI_CREDENTIALS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y diff --git a/samples/zigbee/light_switch/src/nus_cmd.c b/samples/zigbee/light_switch/src/nus_cmd.c index c7325661bcac..43e1291559a7 100644 --- a/samples/zigbee/light_switch/src/nus_cmd.c +++ b/samples/zigbee/light_switch/src/nus_cmd.c @@ -177,7 +177,7 @@ static int ble_utils_init(struct bt_nus_cb *nus_clbs, goto end; } - ret = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, + ret = bt_le_adv_start(BT_LE_ADV_CONN_FAST_2, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (ret) { LOG_ERR("Advertising failed to start (error: %d)", ret); diff --git a/samples/zigbee/ncp/boards/nrf52840dongle_nrf52840_dongle.overlay b/samples/zigbee/ncp/boards/nrf52840dongle_nrf52840_dongle.overlay index e8ebc4a851a5..163f04fb5285 100644 --- a/samples/zigbee/ncp/boards/nrf52840dongle_nrf52840_dongle.overlay +++ b/samples/zigbee/ncp/boards/nrf52840dongle_nrf52840_dongle.overlay @@ -6,7 +6,7 @@ / { chosen { - ncs,zigbee-uart = &cdc_acm_uart; + ncs,zigbee-uart = &board_cdc_acm_uart; }; buttons { diff --git a/samples/zigbee/shell/prj_usb.conf b/samples/zigbee/shell/prj_usb.conf index a4620f4c569b..8e5b9d97f844 100644 --- a/samples/zigbee/shell/prj_usb.conf +++ b/samples/zigbee/shell/prj_usb.conf @@ -58,6 +58,7 @@ CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_REMOTE_WAKEUP=n CONFIG_USB_DEVICE_PRODUCT="Zigbee Shell" CONFIG_USB_CDC_ACM=y +CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y CONFIG_UART_LINE_CTRL=y # Initialize USB device as soon as possible as the USB CDC ACM is used # as backend for both Shell and Logging subsystems. diff --git a/scripts/quarantine.yaml b/scripts/quarantine.yaml index feeca7d83cee..373206858b01 100644 --- a/scripts/quarantine.yaml +++ b/scripts/quarantine.yaml @@ -45,3 +45,10 @@ platforms: - nrf54h20dk/nrf54h20/cpuapp comment: "https://nordicsemi.atlassian.net/browse/NCSDK-31493" + +- scenarios: + - sample.bluetooth.mesh.light_ctrl + - sample.bluetooth.mesh.light_ctrl.emds + platforms: + - nrf52dk/nrf52832 + comment: "To be fixed after upmerge. Footprint should be reduced. NCSDK-31428" diff --git a/scripts/quarantine_integration.yaml b/scripts/quarantine_integration.yaml index 347cc5404cd4..52cd17fab999 100644 --- a/scripts/quarantine_integration.yaml +++ b/scripts/quarantine_integration.yaml @@ -120,7 +120,7 @@ - applications.matter_bridge.lto.br_ble.memory_profiling - applications.matter_bridge.release.br_ble.nrf54h20.wifi platforms: - - nrf54h20dk/nrf54h20/cpuapp + - nrf54h20dk@0.9.0/nrf54h20/cpuapp comment: "Configurations excluded to limit resources usage in integration builds" @@ -251,7 +251,7 @@ - sample.cellular.modem_shell_debug - sample.cellular.modem_shell_modem_uart_trace platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -277,7 +277,7 @@ - sample.cellular.location.nrf7002ek_wifi - sample.cellular.location.pgps platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -294,7 +294,7 @@ - sample.cellular.http_update.full_modem_update - sample.cellular.http_update.modem_delta_update platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -308,7 +308,7 @@ - samples.cellular.nidd - sample.cellular.udp platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - thingy91/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" @@ -318,28 +318,28 @@ - sample.cellular.battery - sample.cellular.modem_callbacks platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.net.azure_iot_hub platforms: - nrf7002dk/nrf5340/cpuapp - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - nrf9161dk/nrf9161/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.net.azure_iot_hub.dps platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.net.coap_client platforms: - nrf7002dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - thingy91/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" @@ -363,20 +363,20 @@ - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.hw_id.device_id platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.debug.memfault - sample.debug.memfault.etb platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - thingy91/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" @@ -410,7 +410,7 @@ - applications.serial_lte_modem - applications.serial_lte_modem.lwm2m_carrier platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -578,7 +578,7 @@ - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp - - nrf54h20dk/nrf54h20/cpuapp + - nrf54h20dk@0.9.0/nrf54h20/cpuapp comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -590,7 +590,7 @@ - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp - - nrf54h20dk/nrf54h20/cpuapp + - nrf54h20dk@0.9.0/nrf54h20/cpuapp comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -602,7 +602,7 @@ - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp - - nrf54h20dk/nrf54h20/cpuapp + - nrf54h20dk@0.9.0/nrf54h20/cpuapp comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -647,7 +647,7 @@ - scenarios: - sample.cellular.nrf7002ek_wifi.scan platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -665,19 +665,19 @@ - scenarios: - sample.cellular.nrf_cloud_rest_device_message platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.cellular.nrf_cloud_rest_cell_pos platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - sample.cellular.nrf_cloud_rest_fota platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -698,7 +698,7 @@ - examples.nrfx_pwm.common_mode - examples.nrfx_gppi.fork platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - nrf5340dk/nrf5340/cpuapp comment: "Configurations excluded to limit resources usage in integration builds" @@ -721,7 +721,7 @@ - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -729,7 +729,7 @@ platforms: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -737,7 +737,7 @@ platforms: - nrf5340dk/nrf5340/cpuapp - nrf52dk/nrf52832 - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -986,8 +986,8 @@ - applications.asset_tracker_v2.memfault-low-power - applications.asset_tracker_v2.memfault.sysbuild - applications.asset_tracker_v2.nrf7002ek_wifi-debug.sysbuild - - applications.asset_tracker_v2.nrf7002ek_wifi.nrf9160dk - - applications.asset_tracker_v2.nrf7002ek_wifi.nrf9160dk.sysbuild + - applications.asset_tracker_v2.nrf7002ek_wifi.nrf9160dk@0.14.0 + - applications.asset_tracker_v2.nrf7002ek_wifi.nrf9160dk@0.14.0.sysbuild - applications.asset_tracker_v2.nrf_cloud - applications.asset_tracker_v2.nrf_cloud-no-agnss - applications.asset_tracker_v2.nrf_cloud-no-agnss.sysbuild @@ -996,7 +996,7 @@ - applications.asset_tracker_v2.nrf7002ek_wifi-debug - applications.asset_tracker_v2.nrf7002ek_wifi.nrf9161dk platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1030,7 +1030,7 @@ - applications.asset_tracker_v2.cloud.cloud_codec.json_common.aws - applications.asset_tracker_v2.cloud.cloud_codec.json_common.azure platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - qemu_cortex_m3 comment: "Configurations excluded to limit resources usage in integration builds" @@ -1042,7 +1042,7 @@ - asset_tracker_v2.lwm2m_integration - asset_tracker_v2.ui_module_test.tester platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - qemu_cortex_m3 comment: "Configurations excluded to limit resources usage in integration builds" @@ -1117,7 +1117,7 @@ - tfm.psa_test_storage_lvl1 platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1137,7 +1137,7 @@ - tfm.regression_ipc_lvl2.oberon - tfm.regression_sfn_lvl1 platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1175,7 +1175,7 @@ - net.lib.aws_fota.aws_fota_json platforms: - nrf52840dk/nrf52840 - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - qemu_cortex_m3 comment: "Configurations excluded to limit resources usage in integration builds" @@ -1193,7 +1193,7 @@ - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1202,7 +1202,7 @@ - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1217,7 +1217,7 @@ - lpuart.two_chip_test_busy_sim - lpuart.two_chip_test_debug platforms: - - nrf9160dk/nrf52840 + - nrf9160dk@0.14.0/nrf52840 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1227,7 +1227,7 @@ - lpuart.two_chip_test_busy_sim - lpuart.two_chip_test_debug platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1270,7 +1270,7 @@ - sample.nrf7002_eks.raw_scan - sample.nrf7002_eks.scan platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1301,7 +1301,7 @@ - dfu.target_stream.store_progress platforms: - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -1433,13 +1433,13 @@ - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpuapp - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: - bootloader.bl_validation.negative platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - nrf5340dk/nrf5340/cpuapp comment: "Configurations excluded to limit resources usage in integration builds" diff --git a/scripts/quarantine_windows_mac.yaml b/scripts/quarantine_windows_mac.yaml index 2b27e31b2193..14f2429a75e0 100644 --- a/scripts/quarantine_windows_mac.yaml +++ b/scripts/quarantine_windows_mac.yaml @@ -28,7 +28,7 @@ - scenarios: - applications.asset_tracker_v2.*.sysbuild platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "https://nordicsemi.atlassian.net/browse/NCSDK-26461" - scenarios: diff --git a/scripts/quarantine_zephyr.yaml b/scripts/quarantine_zephyr.yaml index d6a0ab97ebf4..9cea7440dec9 100644 --- a/scripts/quarantine_zephyr.yaml +++ b/scripts/quarantine_zephyr.yaml @@ -80,14 +80,14 @@ - sample.mgmt.osdp.peripheral_device_sc platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - nrf54l15dk/nrf54l15/cpuapp comment: "https://nordicsemi.atlassian.net/browse/NCSDK-24928" - scenarios: - examples.nrfx_uarte.tx_rx_non_blocking platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - nrf52840dk/nrf52840 comment: "https://nordicsemi.atlassian.net/browse/NRFX-3395" @@ -95,7 +95,7 @@ - examples.nrfx_uarte.rx_double_buffered platforms: - nrf52840dk/nrf52840 - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - nrf5340dk/nrf5340/cpuapp - nrf52833dk/nrf52833 comment: "https://nordicsemi.atlassian.net/browse/NRFX-3468" @@ -112,7 +112,7 @@ platforms: - nrf52840dk/nrf52840 - nrf52833dk/nrf52833 - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "https://nordicsemi.atlassian.net/browse/NRFX-3813" - scenarios: @@ -130,7 +130,7 @@ - scenarios: - arch.interrupt.gen_isr_table.riscv_no_direct platforms: - - nrf54h20dk/nrf54h20/cpuppr + - nrf54h20dk@0.9.0/nrf54h20/cpuppr - nrf54l15dk/nrf54l15/cpuflpr comment: "https://nordicsemi.atlassian.net/browse/NCSDK-27981" @@ -144,7 +144,7 @@ - scenarios: - sample.net.sockets.http.server platforms: - - nrf54h20dk/nrf54h20/cpurad + - nrf54h20dk@0.9.0/nrf54h20/cpurad comment: "to be fixed in https://github.com/zephyrproject-rtos/zephyr/pull/73777" - scenarios: @@ -155,14 +155,14 @@ comment: "Test not aligned for nrf54l15 but selected due to jedec,spi-nor" - scenarios: - - llext.simple.* + - llext.* platforms: - - nrf54h20dk/nrf54h20/cpurad + - nrf54h20dk@0.9.0/nrf54h20/cpurad - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpunet - - nrf54h20dk/nrf54h20/cpuppr + - nrf54h20dk@0.9.0/nrf54h20/cpuppr - nrf54l15dk/nrf54l15/cpuflpr - - qemu_cortex_m3 + - qemu_cortex_m3/ti_lm3s6965 comment: "overflow, to report/fix in the upstream @permac and put ticket # here" - scenarios: @@ -172,7 +172,7 @@ - scenarios: - storage.flash_map platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "https://nordicsemi.atlassian.net/browse/NCSDK-29462" - scenarios: @@ -209,14 +209,14 @@ - libraries.encoding.jwt platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - nrf54l15dk/nrf54l15/cpuapp comment: "Won't be fixed - https://nordicsemi.atlassian.net/browse/NCSDK-15508" - scenarios: - net.mqtt.tls platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - nrf5340dk/nrf5340/cpuapp/ns comment: "Won't be fixed - https://nordicsemi.atlassian.net/browse/NCSDK-24922" @@ -224,7 +224,7 @@ - net.socket.register.tls platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Won't be fixed - https://nordicsemi.atlassian.net/browse/NCSDK-18853" - scenarios: @@ -244,7 +244,7 @@ - scenarios: - sample.drivers.crypto.mbedtls platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - nrf5340dk/nrf5340/cpuapp/ns comment: "Won't be fixed - https://nordicsemi.atlassian.net/browse/NCSDK-15306" @@ -252,21 +252,21 @@ - sample.net.sockets.websocket_client platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Won't be fixed - https://nordicsemi.atlassian.net/browse/NCSDK-24929" - scenarios: - sample.psa_crypto platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Won't be fixed - https://nordicsemi.atlassian.net/browse/NCSDK-22771" - scenarios: - sample.net.sockets.http.server platforms: - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Same reason as in https://nordicsemi.atlassian.net/browse/NCSDK-22771" - scenarios: @@ -360,7 +360,7 @@ - drivers.gpio.build - sample.perf platforms: - - nrf54h20dk/nrf54h20/cpuppr + - nrf54h20dk@0.9.0/nrf54h20/cpuppr comment: "region RAM/FLASH overflowed" - scenarios: @@ -419,16 +419,16 @@ - libraries.libc.newlib_nano.thread_safety.userspace.stress - libraries.libc.newlib.thread_safety.userspace.stress platforms: - - nrf54h20dk/nrf54h20/cpurad - - nrf54h20dk/nrf54h20/cpuapp + - nrf54h20dk@0.9.0/nrf54h20/cpurad + - nrf54h20dk@0.9.0/nrf54h20/cpuapp comment: "region FLASH overflowed" - scenarios: - libraries.cmsis_dsp.matrix.unary_f64 - libraries.cmsis_dsp.matrix.unary_f64.fpu platforms: - - nrf54h20dk/nrf54h20/cpuapp - - nrf54h20dk/nrf54h20/cpurad + - nrf54h20dk@0.9.0/nrf54h20/cpuapp + - nrf54h20dk@0.9.0/nrf54h20/cpurad comment: "Won't be fixed, 'rodata will not fit in region FLASH' - no ticket" - scenarios: @@ -449,5 +449,5 @@ - scenarios: - drivers.hwinfo.api platforms: - - nrf54h20dk/nrf54h20/cpuppr + - nrf54h20dk@0.9.0/nrf54h20/cpuppr comment: Unsupported device diff --git a/scripts/quarantine_zephyr_integration.yaml b/scripts/quarantine_zephyr_integration.yaml index 262c32cba4b9..88d19f43c080 100644 --- a/scripts/quarantine_zephyr_integration.yaml +++ b/scripts/quarantine_zephyr_integration.yaml @@ -24,7 +24,7 @@ - net.lwm2m.lwm2m_registry - net.lwm2m.block_transfer platforms: - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 - native_sim comment: "Configurations excluded to limit resources usage in integration builds" @@ -40,7 +40,7 @@ - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpuapp - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -100,8 +100,8 @@ - nrf5340dk/nrf5340/cpuapp - nrf5340dk/nrf5340/cpuapp/ns - nrf5340dk/nrf5340/cpunet - - nrf9160dk/nrf9160 - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160 + - nrf9160dk@0.14.0/nrf9160/ns - qemu_cortex_m3 comment: "Configurations excluded to limit resources usage in integration builds" @@ -131,8 +131,8 @@ platforms: - nrf52840dk/nrf52840 - nrf52dk/nrf52832 - - nrf9160dk/nrf9160 - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160 + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -140,7 +140,7 @@ - sample.tfm.secure_partition - sample.tfm_ipc platforms: - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns - nrf5340dk/nrf5340/cpuapp/ns comment: "Configurations excluded to limit resources usage in integration builds" @@ -199,7 +199,7 @@ platforms: - nrf52dk/nrf52832 - nrf5340dk/nrf5340/cpunet - - nrf9160dk/nrf9160 + - nrf9160dk@0.14.0/nrf9160 comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -211,7 +211,7 @@ platforms: - nrf5340dk/nrf5340/cpuapp - nrf5340dk/nrf5340/cpuapp/ns - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -224,8 +224,8 @@ - nrf5340dk/nrf5340/cpuapp - nrf5340dk/nrf5340/cpuapp/ns - nrf5340dk/nrf5340/cpunet - - nrf9160dk/nrf9160 - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160 + - nrf9160dk@0.14.0/nrf9160/ns - qemu_cortex_m3 comment: "Configurations excluded to limit resources usage in integration builds" @@ -238,8 +238,8 @@ - nrf5340dk/nrf5340/cpuapp - nrf5340dk/nrf5340/cpuapp/ns - nrf5340dk/nrf5340/cpunet - - nrf9160dk/nrf9160 - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160 + - nrf9160dk@0.14.0/nrf9160/ns comment: "Configurations excluded to limit resources usage in integration builds" - scenarios: @@ -250,8 +250,8 @@ - nrf5340dk/nrf5340/cpuapp - nrf5340dk/nrf5340/cpuapp/ns - nrf5340dk/nrf5340/cpunet - - nrf9160dk/nrf9160 - - nrf9160dk/nrf9160/ns + - nrf9160dk@0.14.0/nrf9160 + - nrf9160dk@0.14.0/nrf9160/ns - qemu_cortex_m3 comment: "Configurations excluded to limit resources usage in integration builds" diff --git a/scripts/west_commands/create_board/ncs_create_board.py b/scripts/west_commands/create_board/ncs_create_board.py index aa6d7b8fde08..4855c4c74607 100644 --- a/scripts/west_commands/create_board/ncs_create_board.py +++ b/scripts/west_commands/create_board/ncs_create_board.py @@ -5,7 +5,7 @@ import json import shutil -from jinja2 import Environment, FileSystemLoader +from jinja2 import Environment, FileSystemLoader, TemplateNotFound from west.commands import WestCommand from west import log from yaml import load @@ -167,9 +167,12 @@ def do_run(self, args, unknown_args): with open(out_dir / f"board.yml", "w") as f: f.write(tmpl.render()) - tmpl = env.get_template("Kconfig.defconfig.jinja2") - with open(out_dir / f"Kconfig.defconfig", "w") as f: - f.write(tmpl.render(config)) + try: + tmpl = env.get_template("Kconfig.defconfig.jinja2") + with open(out_dir / f"Kconfig.defconfig", "w") as f: + f.write(tmpl.render(config)) + except TemplateNotFound: + pass # nrf53 specific files if series == "nrf53": diff --git a/scripts/west_commands/create_board/templates/nrf52/Kconfig.defconfig.jinja2 b/scripts/west_commands/create_board/templates/nrf52/Kconfig.defconfig.jinja2 deleted file mode 100644 index 7bc3de6dccf9..000000000000 --- a/scripts/west_commands/create_board/templates/nrf52/Kconfig.defconfig.jinja2 +++ /dev/null @@ -1,6 +0,0 @@ -if BOARD_{{ board | upper }} - -config BT_CTLR - default BT - -endif # BOARD_{{ board | upper }} diff --git a/scripts/west_commands/create_board/templates/nrf53/Kconfig.defconfig.jinja2 b/scripts/west_commands/create_board/templates/nrf53/Kconfig.defconfig.jinja2 index 88294c603e0e..2f322bffa177 100644 --- a/scripts/west_commands/create_board/templates/nrf53/Kconfig.defconfig.jinja2 +++ b/scripts/west_commands/create_board/templates/nrf53/Kconfig.defconfig.jinja2 @@ -54,10 +54,3 @@ config HEAP_MEM_POOL_ADD_SIZE_BOARD default 4096 if BT_HCI_IPC endif # BOARD_{{ board | upper }}_NRF5340_CPUAPP || BOARD_{{ board | upper }}_NRF5340_CPUAPP_NS - -if BOARD_{{ board | upper }}_NRF5340_CPUNET - -config BT_CTLR - default y if BT - -endif # BOARD_{{ board | upper }}_NRF5340_CPUNET diff --git a/scripts/west_commands/create_board/templates/nrf54l/Kconfig.defconfig.jinja2 b/scripts/west_commands/create_board/templates/nrf54l/Kconfig.defconfig.jinja2 index bdb12bdfd778..de016bde0ab9 100644 --- a/scripts/west_commands/create_board/templates/nrf54l/Kconfig.defconfig.jinja2 +++ b/scripts/west_commands/create_board/templates/nrf54l/Kconfig.defconfig.jinja2 @@ -1,8 +1,5 @@ if BOARD_{{ board | upper }}_CPUAPP -config BT_CTLR - default BT - config ROM_START_OFFSET default 0x800 if BOOTLOADER_MCUBOOT diff --git a/scripts/west_commands/ncs_west_helpers.py b/scripts/west_commands/ncs_west_helpers.py index 7f1cf377ead6..46ab4faacb38 100644 --- a/scripts/west_commands/ncs_west_helpers.py +++ b/scripts/west_commands/ncs_west_helpers.py @@ -233,9 +233,37 @@ def _downstream_outstanding_commits(self) -> list[pygit2.Commit]: # Temporary workaround for any commit(s) that are known # to specify incorrect SHAs of the commits they revert. - if self.downstream_repo.name == 'trusted-firmware-m': - if rsha == '74ebcb636cb39b498a2ac05f7587f8ee9158bba9': - rsha = 'af7b2f48e88bd3f260347138f87e5c4f7819b273' + if self.downstream_repo.name == 'zephyr': + if rsha == '8027617116b66548dc6d115af8cca84282adc87e': + rsha = 'd269d6fcc54c9f03bb19419120ce3a57f69a6a88' + if rsha == 'a278ee4af1397201e4b9a8431d601c3e64d34a6b': + rsha = '4f9ab7947c5214f837d806b33d3cb5262ff9bc83' + if rsha == '9a0b81bf553b937f2ecb729a4ae9dff6df93919f': + rsha = '9a675fa35fbd88a3464aaf015f68dff3fa22090a' + if rsha == '500609863634bf00a675146dcb78f5137aed330a': + rsha = '188ec35dc3785cf4e498434ebb55bdf47b08061b' + if rsha == 'e02f019aaac99993da5e39a986c2345eeac22dfc': + rsha = '045899a31200e2b57627442ced7cb80916270fb2' + if rsha == '8d6a853718ee5be65221d5187fa32793e44b8bdb': + rsha = '7db6fe0372890ceb24f9c644203261ba242f5792' + if rsha == '38f2104a801b1db40ab4596f972c0178f21821c5': + rsha = 'f787d7b1dd2cd768dd849c95f00ecac6b399b005' + if rsha == 'b0ce7fe23a0c83ce3038baf2b8899e0e6b1497fc': + rsha = 'ccd2f6324256a9dd7cdba83b1b4b8f5627df77ac' + if rsha == '687cefae54d14d19010ec95b6a6a89eedb6da5b0': + rsha = 'eefa2fee0b36fb0a502e7b44fc4a2d90e5cf23bb' + # Commit 34ac0f01d11fd78304df355cc139479bb32e511e that + # contains this incorrect SHA reference reverts in fact + # only a part of 29b9b3e2052e7022ce8a5c197612e08d75796535, + # so just ignore it. + if rsha == '330eb8146a5b694fb90d738cc04e6ef76d80f636': + continue + # Commit 08b6e7604926f6a2ec5eca9d4058f2f3fbc11e6e that + # contains this incorrect SHA reference reverts in fact + # only a part of 5eec5ca2ac59038194a91b7086edc50949ed83c9, + # so just ignore it. + if rsha == 'fe339b14b3effd069458f5e4710f17cda8295229': + continue if rsha in downstream_out: log.dbg('** commit {} ("{}") was reverted in {}'. diff --git a/subsys/bluetooth/Kconfig b/subsys/bluetooth/Kconfig index ec2310816b1a..9c511009251d 100644 --- a/subsys/bluetooth/Kconfig +++ b/subsys/bluetooth/Kconfig @@ -32,16 +32,14 @@ config BT_MAX_CONN config BT_LL_SOFTDEVICE_HEADERS_INCLUDE bool depends on (SOC_SERIES_BSIM_NRFXX || SOC_FAMILY_NORDIC_NRF) - default y if !BT_CTLR + default y if !HAS_BT_CTLR help Include SoftDevice header files provided with the library. config BT_LL_SOFTDEVICE_HEADERS_INCLUDE_PATH_OVERRIDE bool -if BT_CTLR rsource "controller/Kconfig" -endif rsource "host_extensions/Kconfig" comment "BLE Libraries" diff --git a/subsys/bluetooth/Kconfig.discovery b/subsys/bluetooth/Kconfig.discovery index 376fc3980192..3bcffa2f37a9 100644 --- a/subsys/bluetooth/Kconfig.discovery +++ b/subsys/bluetooth/Kconfig.discovery @@ -39,7 +39,6 @@ config BT_GATT_DM_WORKQ_STACK_SIZE # requirements. int default 1300 if BT_GATT_CACHING - default 1140 if BT_TINYCRYPT_ECC default 1024 config BT_GATT_DM_WORKQ_PRIO diff --git a/subsys/bluetooth/adv_prov/providers/Kconfig.tx_power b/subsys/bluetooth/adv_prov/providers/Kconfig.tx_power index 803750eec231..cb6f8882d407 100644 --- a/subsys/bluetooth/adv_prov/providers/Kconfig.tx_power +++ b/subsys/bluetooth/adv_prov/providers/Kconfig.tx_power @@ -6,7 +6,7 @@ menuconfig BT_ADV_PROV_TX_POWER bool "TX power" - select BT_CTLR_TX_PWR_DYNAMIC_CONTROL if BT_CTLR + select BT_CTLR_TX_PWR_DYNAMIC_CONTROL if HAS_BT_CTLR help Adds TX power to advertising data. Provider reads the advertising TX power from Bluetooth controller and adds predefined correction value diff --git a/subsys/bluetooth/controller/Kconfig b/subsys/bluetooth/controller/Kconfig index a5397c7458a8..bb4c40ec1c85 100644 --- a/subsys/bluetooth/controller/Kconfig +++ b/subsys/bluetooth/controller/Kconfig @@ -4,12 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -choice BT_LL_CHOICE - prompt "Bluetooth Link Layer Selection" - default BT_LL_SOFTDEVICE - config BT_LL_SOFTDEVICE bool "SoftDevice Link Layer" + default y + select HAS_BT_CTLR select MPSL select ZERO_LATENCY_IRQS if !SOC_SERIES_BSIM_NRFXX select BT_CTLR_CRYPTO_SUPPORT @@ -52,8 +50,6 @@ config BT_LL_SOFTDEVICE help Use SoftDevice Link Layer implementation. -endchoice - config BT_CTLR_DF_SUPPORT select BT_CTLR_DF_CTE_TX_SUPPORT diff --git a/subsys/bluetooth/controller/hci_internal.c b/subsys/bluetooth/controller/hci_internal.c index ac0770d792e6..8dbdcb26f92f 100644 --- a/subsys/bluetooth/controller/hci_internal.c +++ b/subsys/bluetooth/controller/hci_internal.c @@ -572,7 +572,7 @@ void hci_internal_supported_commands(sdc_hci_ip_supported_commands_t *cmds) cmds->hci_le_request_peer_sca = 1; #endif -#if (defined(CONFIG_BT_HCI_RAW) && defined(CONFIG_BT_TINYCRYPT_ECC)) || defined(CONFIG_BT_CTLR_ECDH) +#if defined(CONFIG_BT_CTLR_ECDH) cmds->hci_le_read_local_p256_public_key = 1; cmds->hci_le_generate_dhkey_v1 = 1; cmds->hci_le_generate_dhkey_v2 = 1; diff --git a/subsys/bluetooth/mesh/Kconfig b/subsys/bluetooth/mesh/Kconfig index 55cca2e5a97e..caa9d7c993c6 100644 --- a/subsys/bluetooth/mesh/Kconfig +++ b/subsys/bluetooth/mesh/Kconfig @@ -15,6 +15,44 @@ config BT_MESH_SETTINGS_WORKQ_STACK_SIZE endif +if BT_MESH_USES_MBEDTLS_PSA + +config BT_MESH_MBEDTLS_BACKEND_ENABLE + bool + default y + imply NRF_SECURITY + imply MBEDTLS_ENABLE_HEAP + imply PSA_WANT_GENERATE_RANDOM + +config MBEDTLS_HEAP_SIZE + default 1024 + +if BT_SETTINGS + +config BT_MESH_PSA_CRYPTO_STORAGE + bool + default y + imply TRUSTED_STORAGE + select MBEDTLS_PSA_CRYPTO_STORAGE_C + +choice TRUSTED_STORAGE_BACKEND_AEAD_KEY + default TRUSTED_STORAGE_BACKEND_AEAD_KEY_HASH_UID + +endchoice # TRUSTED_STORAGE_BACKEND_AEAD_KEY + +endif # BT_SETTINGS + +if BT_LONG_WQ +# There is no clear undestanding where this parameter should be adapted for ble mesh purposes. +# This place has been chosen as temporary solution. +# JIRA task NCSDK-31391 was created to solve the issue later. +config BT_LONG_WQ_STACK_SIZE + default 4096 + +endif # BT_LONG_WQ + +endif # BT_MESH_USES_MBEDTLS_PSA + if BT_MESH_ADV_EXT # Set the optimal advertiser configuration to improve performance of the Relay, GATT and Friend diff --git a/subsys/bluetooth/mesh/time_util.c b/subsys/bluetooth/mesh/time_util.c index fd024e17ee42..dc0af3d088c0 100644 --- a/subsys/bluetooth/mesh/time_util.c +++ b/subsys/bluetooth/mesh/time_util.c @@ -41,7 +41,7 @@ int ts_to_tai(struct bt_mesh_time_tai *tai, const struct tm *timeptr) days += timeptr->tm_mday - 1; - tai->sec = (days * SEC_PER_DAY); + tai->sec = ((uint64_t)days * SEC_PER_DAY); tai->sec += ((uint64_t)timeptr->tm_hour * SEC_PER_HOUR); tai->sec += ((uint64_t)timeptr->tm_min * SEC_PER_MIN); tai->sec += (uint64_t)timeptr->tm_sec; diff --git a/subsys/bluetooth/mesh/time_util.h b/subsys/bluetooth/mesh/time_util.h index 281c7344287a..82aba2487c28 100644 --- a/subsys/bluetooth/mesh/time_util.h +++ b/subsys/bluetooth/mesh/time_util.h @@ -20,8 +20,6 @@ extern "C" { #define DAYS_YEAR 365ULL #define DAYS_LEAP_YEAR 366ULL -#define SEC_PER_HOUR (60ULL * SEC_PER_MIN) -#define SEC_PER_DAY (24ULL * SEC_PER_HOUR) #define SEC_PER_YEAR (DAYS_YEAR * SEC_PER_DAY) #define SEC_PER_LEAP_YEAR (DAYS_LEAP_YEAR * SEC_PER_DAY) diff --git a/subsys/bluetooth/rpc/Kconfig b/subsys/bluetooth/rpc/Kconfig index dd1e54434f60..df0db70a78b5 100644 --- a/subsys/bluetooth/rpc/Kconfig +++ b/subsys/bluetooth/rpc/Kconfig @@ -72,10 +72,6 @@ if BT_RPC_CLIENT config HEAP_MEM_POOL_SIZE default 4096 -config BT_DRIVERS - bool "Bluetooth Drivers" - default n - endif # BT_RPC_CLIENT if BT_RPC_HOST @@ -184,6 +180,5 @@ source "$(ZEPHYR_BASE)/subsys/bluetooth/services/Kconfig" source "$(ZEPHYR_BASE)/subsys/bluetooth/common/Kconfig" source "$(ZEPHYR_BASE)/subsys/bluetooth/host/Kconfig" source "$(ZEPHYR_BASE)/subsys/bluetooth/crypto/Kconfig" -source "$(ZEPHYR_BASE)/subsys/bluetooth/shell/Kconfig" endif # BT_RPC_STACK diff --git a/subsys/bluetooth/services/cgms/cgms.c b/subsys/bluetooth/services/cgms/cgms.c index 273944933114..24511bfc9a40 100644 --- a/subsys/bluetooth/services/cgms/cgms.c +++ b/subsys/bluetooth/services/cgms/cgms.c @@ -23,8 +23,6 @@ LOG_MODULE_REGISTER(cgms, CONFIG_BT_CGMS_LOG_LEVEL); -#define SEC_PER_DAY 86400 - #define CGMS_SVC_MEAS_ATTR_IDX 1 #define CGMS_SVC_RACP_ATTR_IDX 12 #define CGMS_SVC_SOCP_ATTR_IDX 15 diff --git a/subsys/bluetooth/services/fast_pair/Kconfig.fast_pair b/subsys/bluetooth/services/fast_pair/Kconfig.fast_pair index fc5ba76b6d62..80addec4dd0b 100644 --- a/subsys/bluetooth/services/fast_pair/Kconfig.fast_pair +++ b/subsys/bluetooth/services/fast_pair/Kconfig.fast_pair @@ -122,7 +122,7 @@ config BT_BUF_ACL_RX_SIZE If Fast Pair is enabled, use MTU value of 83 (recommended by the specification). config BT_CTLR_DATA_LENGTH_MAX - default 87 if BT_CTLR + default 87 if HAS_BT_CTLR help If Fast Pair is enabled, use MTU value of 83 (recommended by the specification). diff --git a/subsys/bluetooth/services/fast_pair/fmdn/state.c b/subsys/bluetooth/services/fast_pair/fmdn/state.c index ba94a9fae76f..df0b57f24f2c 100644 --- a/subsys/bluetooth/services/fast_pair/fmdn/state.c +++ b/subsys/bluetooth/services/fast_pair/fmdn/state.c @@ -125,7 +125,7 @@ static struct bt_le_adv_param fmdn_adv_param = { .options = /* Enable Extended Advertising for the SECP256R1 ECC variant. */ (IS_ENABLED(CONFIG_BT_FAST_PAIR_FMDN_ECC_SECP256R1) * BT_LE_ADV_OPT_EXT_ADV) | - BT_LE_ADV_OPT_CONNECTABLE, + BT_LE_ADV_OPT_CONN, }; static int8_t fmdn_adv_set_tx_power; diff --git a/subsys/bluetooth/services/wifi_prov/wifi_prov_ble.c b/subsys/bluetooth/services/wifi_prov/wifi_prov_ble.c index dcef86be04f1..b4d492233554 100644 --- a/subsys/bluetooth/services/wifi_prov/wifi_prov_ble.c +++ b/subsys/bluetooth/services/wifi_prov/wifi_prov_ble.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include "wifi_prov_internal.h" diff --git a/subsys/bluetooth/services/wifi_prov/wifi_prov_handler.c b/subsys/bluetooth/services/wifi_prov/wifi_prov_handler.c index 86addc12e2dd..efc34eeaf8f1 100644 --- a/subsys/bluetooth/services/wifi_prov/wifi_prov_handler.c +++ b/subsys/bluetooth/services/wifi_prov/wifi_prov_handler.c @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/caf/modules/Kconfig.ble_adv b/subsys/caf/modules/Kconfig.ble_adv index 30b81089837e..3a35431d972e 100644 --- a/subsys/caf/modules/Kconfig.ble_adv +++ b/subsys/caf/modules/Kconfig.ble_adv @@ -110,8 +110,8 @@ endif config CAF_BLE_ADV_FILTER_ACCEPT_LIST bool "Enable filter accept list" select BT_FILTER_ACCEPT_LIST - select BT_CTLR_FILTER_ACCEPT_LIST if BT_CTLR - select BT_CTLR_PRIVACY if BT_CTLR + select BT_CTLR_FILTER_ACCEPT_LIST if HAS_BT_CTLR + select BT_CTLR_PRIVACY if HAS_BT_CTLR help If the used local identity already has bond, the device will filter incoming scan response data requests and connection requests. In diff --git a/subsys/caf/modules/Kconfig.ble_state b/subsys/caf/modules/Kconfig.ble_state index 97f1b7c50856..1f9cee53b562 100644 --- a/subsys/caf/modules/Kconfig.ble_state +++ b/subsys/caf/modules/Kconfig.ble_state @@ -58,9 +58,9 @@ config CAF_BLE_STATE_EXCHANGE_MTU config CAF_BLE_USE_LLPM bool "Enable Low Latency Packet Mode (LLPM)" - depends on (BT_CTLR_SDC_LLPM || !BT_CTLR) + depends on (BT_CTLR_SDC_LLPM || !HAS_BT_CTLR) depends on !SOC_SERIES_NRF53X - default y if BT_CTLR + default y if HAS_BT_CTLR help LLPM is a proprietary Bluetooth extension from Nordic Semiconductor. It is designed for applications in which the interface response time is critical for the user. It introduces diff --git a/subsys/caf/modules/ble_adv.c b/subsys/caf/modules/ble_adv.c index 760f63987873..7bada34d7090 100644 --- a/subsys/caf/modules/ble_adv.c +++ b/subsys/caf/modules/ble_adv.c @@ -358,7 +358,7 @@ static int setup_accept_list(uint8_t local_id) static int ble_adv_start_undirected(void) { struct bt_le_adv_param adv_param = { - .options = BT_LE_ADV_OPT_CONNECTABLE | BT_LE_ADV_OPT_ONE_TIME, + .options = BT_LE_ADV_OPT_CONN, }; __ASSERT_NO_MSG((state == STATE_ACTIVE) || (state == STATE_GRACE_PERIOD)); diff --git a/subsys/esb/Kconfig b/subsys/esb/Kconfig index 3daea5b389fa..44edf81a75d2 100644 --- a/subsys/esb/Kconfig +++ b/subsys/esb/Kconfig @@ -132,7 +132,8 @@ endmenu config ESB_DYNAMIC_INTERRUPTS bool "Use direct dynamic interrupts" - depends on DYNAMIC_INTERRUPTS && DYNAMIC_DIRECT_INTERRUPTS + select DYNAMIC_INTERRUPTS + select DYNAMIC_DIRECT_INTERRUPTS help This option configures ESB IRQ handlers using direct dynamic interrupts. This allows reconfiguring ESB_SYS_TIMER_IRQn, ESB_EVT_IRQ, diff --git a/subsys/net/l2_wifi_if_conn/l2_wifi_conn.c b/subsys/net/l2_wifi_if_conn/l2_wifi_conn.c index c04692dfe6c1..8af948e1061a 100644 --- a/subsys/net/l2_wifi_if_conn/l2_wifi_conn.c +++ b/subsys/net/l2_wifi_if_conn/l2_wifi_conn.c @@ -9,7 +9,6 @@ LOG_MODULE_REGISTER(l2_wifi_mgr_conn); #include #include #include -#include #include #include #include diff --git a/subsys/net/lib/CMakeLists.txt b/subsys/net/lib/CMakeLists.txt index 8dfefee5e712..eb2543b04063 100644 --- a/subsys/net/lib/CMakeLists.txt +++ b/subsys/net/lib/CMakeLists.txt @@ -29,9 +29,7 @@ add_subdirectory_ifdef(CONFIG_ICAL_PARSER icalendar_parser) add_subdirectory_ifdef(CONFIG_FTP_CLIENT ftp_client) add_subdirectory_ifdef(CONFIG_COAP_UTILS coap_utils) add_subdirectory_ifdef(CONFIG_LWM2M_CLIENT_UTILS lwm2m_client_utils) -add_subdirectory_ifdef(CONFIG_WIFI_CREDENTIALS wifi_credentials) add_subdirectory_ifdef(CONFIG_SOFTAP_WIFI_PROVISION softap_wifi_provision) -add_subdirectory_ifdef(CONFIG_WIFI_MGMT_EXT wifi_mgmt_ext) add_subdirectory_ifdef(CONFIG_WIFI_READY_LIB wifi_ready) add_subdirectory_ifdef(CONFIG_MQTT_HELPER mqtt_helper) add_subdirectory_ifdef(CONFIG_NRF_PROVISIONING nrf_provisioning) diff --git a/subsys/net/lib/Kconfig b/subsys/net/lib/Kconfig index 1f8ea1aba3e7..2f846c2c7212 100644 --- a/subsys/net/lib/Kconfig +++ b/subsys/net/lib/Kconfig @@ -41,9 +41,7 @@ rsource "icalendar_parser/Kconfig" rsource "ftp_client/Kconfig" rsource "coap_utils/Kconfig" rsource "lwm2m_client_utils/Kconfig" -rsource "wifi_credentials/Kconfig" rsource "softap_wifi_provision/Kconfig" -rsource "wifi_mgmt_ext/Kconfig" rsource "wifi_ready/Kconfig" rsource "mqtt_helper/Kconfig" rsource "nrf_provisioning/Kconfig" diff --git a/subsys/net/lib/downloader/src/dl_socket.c b/subsys/net/lib/downloader/src/dl_socket.c index 92c648f0bbe1..57b425c1c8c8 100644 --- a/subsys/net/lib/downloader/src/dl_socket.c +++ b/subsys/net/lib/downloader/src/dl_socket.c @@ -4,11 +4,7 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#if defined(CONFIG_POSIX_API) -#include -#else #include -#endif #include #include #include @@ -48,15 +44,16 @@ static int socket_sectag_set(int fd, const int *const sec_tag_list, uint8_t sec_ verify = TLS_PEER_VERIFY_REQUIRED; - err = setsockopt(fd, SOL_TLS, TLS_PEER_VERIFY, &verify, sizeof(verify)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_PEER_VERIFY, &verify, + sizeof(verify)); if (err) { LOG_ERR("Failed to setup peer verification, errno %d", errno); return -errno; } LOG_INF("Setting up TLS credentials, sec tag count %u", sec_tag_count); - err = setsockopt(fd, SOL_TLS, TLS_SEC_TAG_LIST, sec_tag_list, - sizeof(sec_tag_t) * sec_tag_count); + err = zsock_setsockopt(fd, SOL_TLS, TLS_SEC_TAG_LIST, sec_tag_list, + sizeof(sec_tag_t) * sec_tag_count); if (err) { LOG_ERR("Failed to setup socket security tag list, errno %d", errno); return -errno; @@ -71,7 +68,8 @@ static int socket_tls_hostname_set(int fd, const char *const hostname) int err; - err = setsockopt(fd, SOL_TLS, TLS_HOSTNAME, hostname, strlen(hostname)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_HOSTNAME, hostname, + strlen(hostname)); if (err) { LOG_ERR("Failed to setup TLS hostname (%s), errno %d", hostname, errno); return -errno; @@ -85,7 +83,8 @@ static int socket_pdn_id_set(int fd, uint32_t pdn_id) int err; LOG_INF("Binding to PDN ID: %d", pdn_id); - err = setsockopt(fd, SOL_SOCKET, SO_BINDTOPDN, &pdn_id, sizeof(pdn_id)); + err = zsock_setsockopt(fd, SOL_SOCKET, SO_BINDTOPDN, &pdn_id, + sizeof(pdn_id)); if (err) { LOG_ERR("Failed to bind socket to PDN ID %d, err %d", pdn_id, errno); return -ENETDOWN; @@ -99,7 +98,8 @@ static int socket_dtls_cid_enable(int fd) int err; uint32_t dtls_cid = TLS_DTLS_CID_ENABLED; - err = setsockopt(fd, SOL_TLS, TLS_DTLS_CID, &dtls_cid, sizeof(dtls_cid)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_DTLS_CID, &dtls_cid, + sizeof(dtls_cid)); if (err) { err = -errno; LOG_ERR("Failed to enable TLS_DTLS_CID: %d", err); @@ -128,8 +128,8 @@ static int dl_socket_host_lookup(const char *const hostname, uint32_t pdn_id, st int err; char pdnserv[4]; char *servname = NULL; - struct addrinfo *ai; - struct addrinfo hints = { + struct zsock_addrinfo *ai; + struct zsock_addrinfo hints = { .ai_family = family, }; @@ -147,7 +147,7 @@ static int dl_socket_host_lookup(const char *const hostname, uint32_t pdn_id, st servname = pdnserv; } - err = getaddrinfo(hostname, servname, &hints, &ai); + err = zsock_getaddrinfo(hostname, servname, &hints, &ai); if (err) { /* We expect this to fail on IPv6 sometimes */ LOG_INF("Failed to resolve hostname %s on %s, err %d", hostname, @@ -156,7 +156,7 @@ static int dl_socket_host_lookup(const char *const hostname, uint32_t pdn_id, st } memcpy(sa, ai->ai_addr, ai->ai_addrlen); - freeaddrinfo(ai); + zsock_freeaddrinfo(ai); return 0; } @@ -184,7 +184,7 @@ static int dl_socket_create_and_connect(int *fd, int proto, int type, uint16_t p LOG_DBG("family: %d, type: %d, proto: %d", remote_addr->sa_family, type, proto); - *fd = socket(remote_addr->sa_family, type, proto); + *fd = zsock_socket(remote_addr->sa_family, type, proto); if (*fd < 0) { err = -errno; LOG_ERR("Failed to create socket, errno %d", -err); @@ -232,13 +232,14 @@ static int dl_socket_create_and_connect(int *fd, int proto, int type, uint16_t p } else { sin_addr = &((struct sockaddr_in *)remote_addr)->sin_addr; } - inet_ntop(remote_addr->sa_family, sin_addr, ip_addr_str, sizeof(ip_addr_str)); + zsock_inet_ntop(remote_addr->sa_family, sin_addr, ip_addr_str, + sizeof(ip_addr_str)); LOG_INF("Connecting to %s", ip_addr_str); } LOG_DBG("fd %d, addrlen %d, fam %s, port %d", *fd, addrlen, str_family(remote_addr->sa_family), port); - err = connect(*fd, remote_addr, addrlen); + err = zsock_connect(*fd, remote_addr, addrlen); if (err) { err = -errno; /* Make sure that ECONNRESET is not returned as it has a special meaning @@ -310,7 +311,7 @@ int dl_socket_close(int *fd) int err = 0; if (*fd >= 0) { - err = close(*fd); + err = zsock_close(*fd); if (err && errno != EBADF) { err = -errno; LOG_ERR("Failed to close socket, errno %d", -err); @@ -329,7 +330,7 @@ int dl_socket_send(int fd, void *buf, size_t len) size_t off = 0; while (len) { - sent = send(fd, (uint8_t *)buf + off, len, 0); + sent = zsock_send(fd, (uint8_t *)buf + off, len, 0); if (sent < 0) { return -errno; } @@ -352,7 +353,7 @@ int dl_socket_send_timeout_set(int fd, uint32_t timeout_ms) return 0; } - err = setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeo, sizeof(timeo)); + err = zsock_setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeo, sizeof(timeo)); if (err) { LOG_WRN("Failed to set socket timeout, errno %d", errno); return -errno; @@ -372,7 +373,7 @@ int dl_socket_recv_timeout_set(int fd, uint32_t timeout_ms) return -EINVAL; } - err = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); + err = zsock_setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); if (err) { LOG_WRN("Failed to set socket timeout, errno %d", errno); return -errno; @@ -389,7 +390,7 @@ ssize_t dl_socket_recv(int fd, void *buf, size_t len) return -EINVAL; } - err = recv(fd, buf, len, 0); + err = zsock_recv(fd, buf, len, 0); if (err < 0) { return -errno; } diff --git a/subsys/net/lib/ftp_client/src/ftp_client.c b/subsys/net/lib/ftp_client/src/ftp_client.c index fa7aed86b1db..de13604c1f08 100644 --- a/subsys/net/lib/ftp_client/src/ftp_client.c +++ b/subsys/net/lib/ftp_client/src/ftp_client.c @@ -127,9 +127,9 @@ static int establish_data_channel(const char *pasv_msg) /* open data socket */ if (client.sec_tag <= 0) { - client.data_sock = socket(client.family, SOCK_STREAM, IPPROTO_TCP); + client.data_sock = zsock_socket(client.family, SOCK_STREAM, IPPROTO_TCP); } else { - client.data_sock = socket(client.family, SOCK_STREAM, IPPROTO_TLS_1_2); + client.data_sock = zsock_socket(client.family, SOCK_STREAM, IPPROTO_TLS_1_2); } if (client.data_sock < 0) { LOG_ERR("socket(data) failed: %d", -errno); @@ -138,11 +138,11 @@ static int establish_data_channel(const char *pasv_msg) if (client.sec_tag != INVALID_SEC_TAG) { sec_tag_t sec_tag_list[] = { client.sec_tag }; - ret = setsockopt(client.data_sock, SOL_TLS, TLS_SEC_TAG_LIST, - sec_tag_list, sizeof(sec_tag_t)); + ret = zsock_setsockopt(client.data_sock, SOL_TLS, TLS_SEC_TAG_LIST, + sec_tag_list, sizeof(sec_tag_t)); if (ret) { LOG_ERR("set tag list failed: %d", -errno); - close(client.data_sock); + zsock_close(client.data_sock); return -errno; } @@ -151,16 +151,16 @@ static int establish_data_channel(const char *pasv_msg) /* Connect to remote host */ if (client.family == AF_INET) { client.remote.sin_port = htons(data_port); - ret = connect(client.data_sock, (struct sockaddr *)&client.remote, - sizeof(struct sockaddr_in)); + ret = zsock_connect(client.data_sock, (struct sockaddr *)&client.remote, + sizeof(struct sockaddr_in)); } else { client.remote6.sin6_port = htons(data_port); - ret = connect(client.data_sock, (struct sockaddr *)&client.remote6, - sizeof(struct sockaddr_in6)); + ret = zsock_connect(client.data_sock, (struct sockaddr *)&client.remote6, + sizeof(struct sockaddr_in6)); } if (ret < 0) { LOG_ERR("connect(data) failed: %d", -errno); - close(client.data_sock); + zsock_close(client.data_sock); return -errno; } @@ -194,10 +194,10 @@ static void close_connection(int code, int error) } /* Should be impossble, just in case */ if (client.data_sock != INVALID_SOCKET) { - close(client.data_sock); + zsock_close(client.data_sock); } if (client.cmd_sock != INVALID_SOCKET) { - close(client.cmd_sock); + zsock_close(client.cmd_sock); client.cmd_sock = INVALID_SOCKET; client.data_sock = INVALID_SOCKET; client.connected = false; @@ -214,7 +214,7 @@ static int do_ftp_send_ctrl(const uint8_t *message, int length) LOG_DBG("%s", (char *)message); while (offset < length) { - ret = send(client.cmd_sock, message + offset, length - offset, 0); + ret = zsock_send(client.cmd_sock, message + offset, length - offset, 0); if (ret < 0) { LOG_ERR("send cmd failed: %d", -errno); ret = -errno; @@ -247,7 +247,7 @@ static int do_ftp_send_data(const char *pasv_msg, uint8_t *message, uint16_t len } while (offset < length) { - ret = send(client.data_sock, message + offset, length - offset, 0); + ret = zsock_send(client.data_sock, message + offset, length - offset, 0); if (ret < 0) { LOG_ERR("send data failed: %d", -errno); ret = -errno; @@ -258,7 +258,7 @@ static int do_ftp_send_data(const char *pasv_msg, uint8_t *message, uint16_t len ret = 0; } - close(client.data_sock); + zsock_close(client.data_sock); ftp_inactivity = false; return ret; } @@ -268,12 +268,12 @@ static int do_ftp_send_data(const char *pasv_msg, uint8_t *message, uint16_t len static int do_ftp_recv_ctrl(bool post_result, int success_code) { int ret; - struct pollfd fds[1]; + struct zsock_pollfd fds[1]; /* Receive FTP control message */ fds[0].fd = client.cmd_sock; - fds[0].events = POLLIN; - ret = poll(fds, 1, MSEC_PER_SEC * CONFIG_FTP_CLIENT_LISTEN_TIME); + fds[0].events = ZSOCK_POLLIN; + ret = zsock_poll(fds, 1, MSEC_PER_SEC * CONFIG_FTP_CLIENT_LISTEN_TIME); if (ret < 0) { LOG_ERR("poll(ctrl) failed: (%d)", -errno); close_connection(FTP_CODE_903, -errno); @@ -283,22 +283,22 @@ static int do_ftp_recv_ctrl(bool post_result, int success_code) LOG_DBG("poll(ctrl) timeout"); return -ETIMEDOUT; /* allow retry */ } - if ((fds[0].revents & POLLHUP) == POLLHUP) { + if ((fds[0].revents & ZSOCK_POLLHUP) == ZSOCK_POLLHUP) { LOG_ERR("POLLHUP"); close_connection(FTP_CODE_901, -ECONNRESET); return -ECONNRESET; } - if ((fds[0].revents & POLLNVAL) == POLLNVAL) { + if ((fds[0].revents & ZSOCK_POLLNVAL) == ZSOCK_POLLNVAL) { LOG_ERR("POLLNVAL"); close_connection(FTP_CODE_902, -ECONNABORTED); return -ECONNABORTED; } - if ((fds[0].revents & POLLIN) != POLLIN) { + if ((fds[0].revents & ZSOCK_POLLIN) != ZSOCK_POLLIN) { LOG_ERR("POLL 0x%08x", fds[0].revents); close_connection(FTP_CODE_904, -EAGAIN); return -EAGAIN; } - ret = recv(client.cmd_sock, ctrl_buf, sizeof(ctrl_buf), 0); + ret = zsock_recv(client.cmd_sock, ctrl_buf, sizeof(ctrl_buf), 0); if (ret <= 0) { LOG_ERR("recv(ctrl) failed: (%d)", -errno); return -errno; /* allow retry */ @@ -319,7 +319,7 @@ static int do_ftp_recv_ctrl(bool post_result, int success_code) static void do_ftp_recv_data(const char *pasv_msg) { int ret; - struct pollfd fds[1]; + struct zsock_pollfd fds[1]; char data_buf[FTP_MAX_BUFFER_SIZE]; /* Establish data channel */ @@ -330,18 +330,18 @@ static void do_ftp_recv_data(const char *pasv_msg) /* Receive FTP data message */ fds[0].fd = client.data_sock; - fds[0].events = POLLIN; + fds[0].events = ZSOCK_POLLIN; do { - ret = poll(fds, 1, MSEC_PER_SEC * CONFIG_FTP_CLIENT_LISTEN_TIME); + ret = zsock_poll(fds, 1, MSEC_PER_SEC * CONFIG_FTP_CLIENT_LISTEN_TIME); if (ret <= 0) { LOG_ERR("poll(data) failed: (%d)", -errno); break; } - if ((fds[0].revents & POLLIN) != POLLIN) { + if ((fds[0].revents & ZSOCK_POLLIN) != ZSOCK_POLLIN) { LOG_DBG("No more data"); break; } - ret = recv(client.data_sock, data_buf, sizeof(data_buf), 0); + ret = zsock_recv(client.data_sock, data_buf, sizeof(data_buf), 0); if (ret < 0) { LOG_ERR("recv(data) failed: (%d)", -errno); break; @@ -354,7 +354,7 @@ static void do_ftp_recv_data(const char *pasv_msg) LOG_DBG("DATA received %d", ret); } while (true); - close(client.data_sock); + zsock_close(client.data_sock); ftp_inactivity = false; } @@ -442,12 +442,13 @@ int ftp_open(const char *hostname, uint16_t port, int sec_tag) return -EINVAL; } int ret; - struct addrinfo *ai; + struct zsock_addrinfo *ai; /* Resolve the hostname in the preferred IP version .*/ - ret = getaddrinfo(hostname, NULL, NULL, &ai); + ret = zsock_getaddrinfo(hostname, NULL, NULL, &ai); if (ret) { - LOG_ERR("Failed to resolve hostname (\"%s\"): %s", hostname, gai_strerror(ret)); + LOG_ERR("Failed to resolve hostname (\"%s\"): %s", + hostname, zsock_gai_strerror(ret)); return -EHOSTUNREACH; } client.family = ai->ai_family; @@ -456,13 +457,13 @@ int ftp_open(const char *hostname, uint16_t port, int sec_tag) } else { memcpy(&client.remote6, ai->ai_addr, sizeof(client.remote6)); } - freeaddrinfo(ai); + zsock_freeaddrinfo(ai); /* open control socket */ if (sec_tag == INVALID_SEC_TAG) { - client.cmd_sock = socket(client.family, SOCK_STREAM, IPPROTO_TCP); + client.cmd_sock = zsock_socket(client.family, SOCK_STREAM, IPPROTO_TCP); } else { - client.cmd_sock = socket(client.family, SOCK_STREAM, IPPROTO_TLS_1_2); + client.cmd_sock = zsock_socket(client.family, SOCK_STREAM, IPPROTO_TLS_1_2); } if (client.cmd_sock < 0) { LOG_ERR("socket(ctrl) failed: %d", -errno); @@ -471,11 +472,11 @@ int ftp_open(const char *hostname, uint16_t port, int sec_tag) if (sec_tag != INVALID_SEC_TAG) { sec_tag_t sec_tag_list[] = { sec_tag }; - ret = setsockopt(client.cmd_sock, SOL_TLS, TLS_SEC_TAG_LIST, - sec_tag_list, sizeof(sec_tag_t)); + ret = zsock_setsockopt(client.cmd_sock, SOL_TLS, TLS_SEC_TAG_LIST, + sec_tag_list, sizeof(sec_tag_t)); if (ret) { LOG_ERR("set tag list failed: %d", -errno); - close(client.cmd_sock); + zsock_close(client.cmd_sock); return -errno; } client.sec_tag = sec_tag; @@ -484,23 +485,25 @@ int ftp_open(const char *hostname, uint16_t port, int sec_tag) /* Connect to remote host */ if (client.family == AF_INET) { client.remote.sin_port = htons(port); - ret = connect(client.cmd_sock, (struct sockaddr *)&client.remote, - sizeof(struct sockaddr_in)); + ret = zsock_connect(client.cmd_sock, + (struct sockaddr *)&client.remote, + sizeof(struct sockaddr_in)); } else { client.remote6.sin6_port = htons(port); - ret = connect(client.cmd_sock, (struct sockaddr *)&client.remote6, - sizeof(struct sockaddr_in6)); + ret = zsock_connect(client.cmd_sock, + (struct sockaddr *)&client.remote6, + sizeof(struct sockaddr_in6)); } if (ret < 0) { LOG_ERR("connect(ctrl) failed: %d", -errno); - close(client.cmd_sock); + zsock_close(client.cmd_sock); return -errno; } /* Receive server greeting */ ret = do_ftp_recv_ctrl(true, FTP_CODE_220); if (ret != FTP_CODE_220) { - close(client.cmd_sock); + zsock_close(client.cmd_sock); return ret; } @@ -508,7 +511,7 @@ int ftp_open(const char *hostname, uint16_t port, int sec_tag) sprintf(ctrl_buf, CMD_OPTS, "UTF8 ON"); ret = do_ftp_send_ctrl(ctrl_buf, strlen(ctrl_buf)); if (ret) { - close(client.cmd_sock); + zsock_close(client.cmd_sock); return ret; } (void)do_ftp_recv_ctrl(true, FTP_CODE_ANY); diff --git a/subsys/net/lib/hostap_crypto/CMakeLists.txt b/subsys/net/lib/hostap_crypto/CMakeLists.txt index 0cfb8518d772..8b3968ab0e82 100644 --- a/subsys/net/lib/hostap_crypto/CMakeLists.txt +++ b/subsys/net/lib/hostap_crypto/CMakeLists.txt @@ -22,53 +22,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMISSING_SYSCALL_NAMES") # For src/utils includes target_link_libraries(hostap_crypto INTERFACE hostap) -if(DEFINED CONFIG_HOSTAP_CRYPTO_LEGACY OR - DEFINED CONFIG_HOSTAP_CRYPTO_LEGACY_PSA) - zephyr_library_sources( - ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls-bignum.c - ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls-ec.c - ${HOSTAP_SRC_BASE}/crypto/crypto_mbedtls.c - ${HOSTAP_SRC_BASE}/crypto/aes-internal.c - ${HOSTAP_SRC_BASE}/crypto/aes-wrap.c - ${HOSTAP_SRC_BASE}/crypto/aes-unwrap.c - ${HOSTAP_SRC_BASE}/crypto/rc4.c - ${HOSTAP_SRC_BASE}/crypto/sha1-internal.c - ${HOSTAP_SRC_BASE}/crypto/sha1-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha1-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha256-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha256-kdf.c - ${HOSTAP_SRC_BASE}/crypto/sha384-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha384-kdf.c - ${HOSTAP_SRC_BASE}/crypto/sha512-internal.c - ${HOSTAP_SRC_BASE}/crypto/sha512.c - ${HOSTAP_SRC_BASE}/crypto/sha512-prf.c - ${HOSTAP_SRC_BASE}/crypto/sha512-kdf.c - ) - - zephyr_library_sources_ifdef(CONFIG_HOSTAP_WPA3 - ${HOSTAP_SRC_BASE}/crypto/sha256-kdf.c - ) - - zephyr_library_sources_ifndef(CONFIG_HOSTAP_CRYPTO_ENTERPRISE - ${HOSTAP_SRC_BASE}/crypto/tls_none.c - ) - - zephyr_library_sources_ifdef(CONFIG_HOSTAP_CRYPTO_ENTERPRISE - # common - ${HOSTAP_SRC_BASE}/crypto/sha384-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha256-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha1-tlsprf.c - ${HOSTAP_SRC_BASE}/crypto/sha1-tprf.c - ${HOSTAP_SRC_BASE}/crypto/ms_funcs.c - ${HOSTAP_SRC_BASE}/crypto/aes-eax.c - # MD4 removed from MbedTLS - ${HOSTAP_SRC_BASE}/crypto/md4-internal.c - ${HOSTAP_SRC_BASE}/crypto/aes-encblock.c - ${HOSTAP_SRC_BASE}/crypto/tls_mbedtls.c - ) -endif() - -if(DEFINED CONFIG_HOSTAP_CRYPTO_ALT_LEGACY) +if(DEFINED CONFIG_HOSTAP_CRYPTO_ALT_LEGACY OR + DEFINED CONFIG_HOSTAP_CRYPTO_ALT_LEGACY_PSA) zephyr_include_directories( ${HOSTAP_BASE}/port/mbedtls ) diff --git a/subsys/net/lib/hostap_crypto/Kconfig b/subsys/net/lib/hostap_crypto/Kconfig index 440ee011d116..0f064c83450f 100644 --- a/subsys/net/lib/hostap_crypto/Kconfig +++ b/subsys/net/lib/hostap_crypto/Kconfig @@ -13,59 +13,13 @@ endchoice choice HOSTAP_CRYPTO_BACKEND prompt "WPA supplicant crypto implementation" default HOSTAP_CRYPTO_ALT_PSA if SOC_SERIES_NRF54HX - default HOSTAP_CRYPTO_LEGACY_PSA if SOC_SERIES_NRF54LX || BUILD_WITH_TFM + default HOSTAP_CRYPTO_ALT_LEGACY_PSA if SOC_SERIES_NRF54LX || BUILD_WITH_TFM default HOSTAP_CRYPTO_ALT_LEGACY help Select the crypto implementation to use for WPA supplicant. HOSTAP_CRYPTO_ALT supports enterprise mode and DPP. -config HOSTAP_CRYPTO_LEGACY - bool "Legacy Crypto support for WiFi using nRF security" - select MBEDTLS - select NRF_SECURITY - select MBEDTLS_CIPHER_MODE_CBC - select MBEDTLS_CIPHER_MODE_CTR - select MBEDTLS_LEGACY_CRYPTO_C - select MBEDTLS_SHA1_C - select MBEDTLS_ECP_C - select MBEDTLS_CTR_DRBG_C - select MBEDTLS_PK_C - select MBEDTLS_PKCS5_C - select MBEDTLS_PK_PARSE_C - select MBEDTLS_CMAC_C - select MBEDTLS_CIPHER_PADDING_PKCS7 - select MBEDTLS_PK_WRITE_C - select MBEDTLS_KEY_EXCHANGE_ALL_ENABLED - select MBEDTLS_ECP_DP_SECP256R1_ENABLED - -config HOSTAP_CRYPTO_LEGACY_PSA - bool "PSA Crypto support for WiFi using nRF security" - select MBEDTLS - select NRF_SECURITY - select PSA_WANT_GENERATE_RANDOM - # Legacy crypto, still needed - select MBEDTLS_SHA1_C - select MBEDTLS_LEGACY_CRYPTO_C - select MBEDTLS_CMAC_C - select MBEDTLS_GCM_C - select MBEDTLS_TLS_LIBRARY - select MBEDTLS_PK_C - select MBEDTLS_PK_WRITE_C - select MBEDTLS_X509_LIBRARY - select MBEDTLS_X509_CRT_PARSE_C - select MBEDTLS_CIPHER_C - select MBEDTLS_CIPHER_MODE_CTR - select MBEDTLS_CIPHER_MODE_CBC - select MBEDTLS_SSL_TLS_C - select MBEDTLS_ECP_C - select MBEDTLS_CTR_DRBG_C - select MBEDTLS_KEY_EXCHANGE_ALL_ENABLED - select MBEDTLS_MD_C - select MBEDTLS_CIPHER_PADDING_PKCS7 - select MBEDTLS_PKCS5_C - select MBEDTLS_ECP_DP_SECP256R1_ENABLED - config HOSTAP_CRYPTO_ALT_LEGACY bool "Legacy Crypto support for WiFi using nRF security" select MBEDTLS diff --git a/subsys/net/lib/lwm2m_client_utils/lwm2m/lwm2m_rai.c b/subsys/net/lib/lwm2m_client_utils/lwm2m/lwm2m_rai.c index 22a0c18366b7..7271be6db8e0 100644 --- a/subsys/net/lib/lwm2m_client_utils/lwm2m/lwm2m_rai.c +++ b/subsys/net/lib/lwm2m_client_utils/lwm2m/lwm2m_rai.c @@ -141,7 +141,7 @@ static void lwm2m_set_socket_state(int sock_fd, enum lwm2m_socket_states state) } LOG_DBG("Set socket option SO_RAI with value %s\n", opt_names[state]); - ret = setsockopt(sock_fd, SOL_SOCKET, SO_RAI, &optval, sizeof(optval)); + ret = zsock_setsockopt(sock_fd, SOL_SOCKET, SO_RAI, &optval, sizeof(optval)); if (ret < 0) { ret = -errno; diff --git a/subsys/net/lib/mqtt_helper/Kconfig b/subsys/net/lib/mqtt_helper/Kconfig index ec4bc282b906..b272166d77c8 100644 --- a/subsys/net/lib/mqtt_helper/Kconfig +++ b/subsys/net/lib/mqtt_helper/Kconfig @@ -5,7 +5,6 @@ menuconfig MQTT_HELPER bool "MQTT helper library" - select NET_SOCKETS_POSIX_NAMES if !POSIX_API select MQTT_LIB help Convenience library that simplifies Zephyr MQTT API and socket handling. diff --git a/subsys/net/lib/mqtt_helper/mqtt_helper.c b/subsys/net/lib/mqtt_helper/mqtt_helper.c index 7c55fed9d9cf..7d463f09eab7 100644 --- a/subsys/net/lib/mqtt_helper/mqtt_helper.c +++ b/subsys/net/lib/mqtt_helper/mqtt_helper.c @@ -3,17 +3,9 @@ * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ - #include #include -#if defined(CONFIG_POSIX_API) -#include -#include -#include -#include -#else #include -#endif /* CONFIG_POSIX_API */ #include #include @@ -386,9 +378,9 @@ static int broker_init(struct sockaddr_storage *broker, struct mqtt_helper_conn_params *conn_params) { int err; - struct addrinfo *result; - struct addrinfo *addr; - struct addrinfo hints = { + struct zsock_addrinfo *result; + struct zsock_addrinfo *addr; + struct zsock_addrinfo hints = { .ai_socktype = SOCK_STREAM }; char addr_str[NET_IPV6_ADDR_LEN]; @@ -401,7 +393,7 @@ static int broker_init(struct sockaddr_storage *broker, LOG_DBG("Resolving IP address for %s", conn_params->hostname.ptr); } - err = getaddrinfo(conn_params->hostname.ptr, NULL, &hints, &result); + err = zsock_getaddrinfo(conn_params->hostname.ptr, NULL, &hints, &result); if (err) { LOG_ERR("getaddrinfo() failed, error %d", err); return -err; @@ -418,8 +410,8 @@ static int broker_init(struct sockaddr_storage *broker, broker6->sin6_family = addr->ai_family; broker6->sin6_port = htons(CONFIG_MQTT_HELPER_PORT); - inet_ntop(addr->ai_family, &broker6->sin6_addr, addr_str, - sizeof(addr_str)); + zsock_inet_ntop(addr->ai_family, &broker6->sin6_addr, + addr_str, sizeof(addr_str)); LOG_DBG("IPv6 Address found %s (%s)", addr_str, net_family2str(addr->ai_family)); break; @@ -431,8 +423,8 @@ static int broker_init(struct sockaddr_storage *broker, broker4->sin_family = addr->ai_family; broker4->sin_port = htons(CONFIG_MQTT_HELPER_PORT); - inet_ntop(addr->ai_family, &broker4->sin_addr, addr_str, - sizeof(addr_str)); + zsock_inet_ntop(addr->ai_family, &broker4->sin_addr, + addr_str, sizeof(addr_str)); LOG_DBG("IPv4 Address found %s (%s)", addr_str, net_family2str(addr->ai_family)); break; @@ -443,7 +435,7 @@ static int broker_init(struct sockaddr_storage *broker, addr = addr->ai_next; } - freeaddrinfo(result); + zsock_freeaddrinfo(result); return err; } @@ -552,7 +544,8 @@ static int client_connect(struct mqtt_helper_conn_params *conn_params) int sock = mqtt_client.transport.tcp.sock; #endif /* CONFIG_MQTT_LIB_TLS */ - err = setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); + err = zsock_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, + sizeof(timeout)); if (err == -1) { LOG_WRN("Failed to set timeout, errno: %d", errno); @@ -730,13 +723,13 @@ int mqtt_helper_deinit(void) MQTT_HELPER_STATIC void mqtt_helper_poll_loop(void) { int ret; - struct pollfd fds[1] = {0}; + struct zsock_pollfd fds[1] = {0}; LOG_DBG("Waiting for connection_poll_sem"); k_sem_take(&connection_poll_sem, K_FOREVER); LOG_DBG("Took connection_poll_sem"); - fds[0].events = POLLIN; + fds[0].events = ZSOCK_POLLIN; #if defined(CONFIG_MQTT_LIB_TLS) fds[0].fd = mqtt_client.transport.tls.sock; #else @@ -754,7 +747,8 @@ MQTT_HELPER_STATIC void mqtt_helper_poll_loop(void) LOG_DBG("Polling on socket fd: %d", fds[0].fd); } - ret = poll(fds, ARRAY_SIZE(fds), mqtt_keepalive_time_left(&mqtt_client)); + ret = zsock_poll(fds, ARRAY_SIZE(fds), + mqtt_keepalive_time_left(&mqtt_client)); if (ret < 0) { LOG_ERR("poll() returned an error (%d), errno: %d", ret, -errno); break; @@ -773,7 +767,7 @@ MQTT_HELPER_STATIC void mqtt_helper_poll_loop(void) continue; } - if ((fds[0].revents & POLLIN) == POLLIN) { + if ((fds[0].revents & ZSOCK_POLLIN) == ZSOCK_POLLIN) { ret = mqtt_input(&mqtt_client); if (ret) { LOG_ERR("Cloud MQTT input error: %d", ret); @@ -791,9 +785,9 @@ MQTT_HELPER_STATIC void mqtt_helper_poll_loop(void) } } - if ((fds[0].revents & POLLNVAL) == POLLNVAL) { + if ((fds[0].revents & ZSOCK_POLLNVAL) == ZSOCK_POLLNVAL) { if (mqtt_state_verify(MQTT_STATE_DISCONNECTING)) { - /* POLLNVAL is to be expected while + /* ZSOCK_POLLNVAL is to be expected while * disconnecting, as the socket will be closed * by the MQTT library and become invalid. */ @@ -807,13 +801,13 @@ MQTT_HELPER_STATIC void mqtt_helper_poll_loop(void) break; } - if ((fds[0].revents & POLLHUP) == POLLHUP) { + if ((fds[0].revents & ZSOCK_POLLHUP) == ZSOCK_POLLHUP) { LOG_ERR("Socket error: POLLHUP"); LOG_ERR("Connection was unexpectedly closed"); break; } - if ((fds[0].revents & POLLERR) == POLLERR) { + if ((fds[0].revents & ZSOCK_POLLERR) == ZSOCK_POLLERR) { LOG_ERR("Socket error: POLLERR"); LOG_ERR("Connection was unexpectedly closed"); break; diff --git a/subsys/net/lib/nrf_cloud/include/nrf_cloud_dns.h b/subsys/net/lib/nrf_cloud/include/nrf_cloud_dns.h index 3f2e45d4d58a..5fb58aebebd9 100644 --- a/subsys/net/lib/nrf_cloud/include/nrf_cloud_dns.h +++ b/subsys/net/lib/nrf_cloud/include/nrf_cloud_dns.h @@ -10,12 +10,7 @@ #define NRF_CLOUD_NET_UTIL_H_ #include - -#if defined(CONFIG_POSIX_API) -#include -#else #include -#endif #ifdef __cplusplus extern "C" { @@ -60,7 +55,7 @@ typedef int (*nrf_cloud_connect_host_cb)(struct sockaddr *const addr); * socket ID of the successful connection. * @return int Either a negative error code on failure, or a nonnegative socket ID on success. */ -int nrf_cloud_connect_host(const char *host_name, uint16_t port, struct addrinfo *hints, +int nrf_cloud_connect_host(const char *host_name, uint16_t port, struct zsock_addrinfo *hints, nrf_cloud_connect_host_cb connect_cb); /** @endcond */ diff --git a/subsys/net/lib/nrf_cloud/include/nrf_cloud_pgps_utils.h b/subsys/net/lib/nrf_cloud/include/nrf_cloud_pgps_utils.h index 38adc879b9da..910492145ca4 100644 --- a/subsys/net/lib/nrf_cloud/include/nrf_cloud_pgps_utils.h +++ b/subsys/net/lib/nrf_cloud/include/nrf_cloud_pgps_utils.h @@ -17,8 +17,6 @@ extern "C" { /* (6.1.1980 UTC - 1.1.1970 UTC) */ #define GPS_TO_UNIX_UTC_OFFSET_SECONDS (315964800UL) #define GPS_TO_UTC_LEAP_SECONDS (18UL) -#define SEC_PER_HOUR (MIN_PER_HOUR * SEC_PER_MIN) -#define SEC_PER_DAY (HOUR_PER_DAY * SEC_PER_HOUR) #define DAYS_PER_WEEK (7UL) #define SECONDS_PER_WEEK (SEC_PER_DAY * DAYS_PER_WEEK) diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud.c index e39bd1032707..28918f503ff2 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud.c @@ -3,11 +3,7 @@ * * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -#if defined(CONFIG_POSIX_API) -#include -#else #include -#endif #include #include #include @@ -587,7 +583,7 @@ static int start_connection_poll(void) void nrf_cloud_run(void) { int ret; - struct pollfd fds[1]; + struct zsock_pollfd fds[1]; struct nrf_cloud_evt evt; start: @@ -611,7 +607,7 @@ void nrf_cloud_run(void) } fds[0].fd = nct_socket_get(); - fds[0].events = POLLIN; + fds[0].events = ZSOCK_POLLIN; /* Only disconnect events will occur below */ evt.type = NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED; @@ -619,7 +615,7 @@ void nrf_cloud_run(void) while (true) { fds[0].revents = 0; - ret = poll(fds, ARRAY_SIZE(fds), nct_keepalive_time_left()); + ret = zsock_poll(fds, ARRAY_SIZE(fds), nct_keepalive_time_left()); /* If poll returns 0 the timeout has expired. */ if (ret == 0) { @@ -640,7 +636,7 @@ void nrf_cloud_run(void) break; } - if ((fds[0].revents & POLLIN) == POLLIN) { + if ((fds[0].revents & ZSOCK_POLLIN) == ZSOCK_POLLIN) { ret = nrf_cloud_process(); if ((ret < 0) && (ret != -EAGAIN)) { LOG_DBG("Disconnecting; nrf_cloud_process returned an error: %d", @@ -657,7 +653,7 @@ void nrf_cloud_run(void) continue; } - if ((fds[0].revents & POLLNVAL) == POLLNVAL) { + if ((fds[0].revents & ZSOCK_POLLNVAL) == ZSOCK_POLLNVAL) { LOG_DBG("Socket error: POLLNVAL"); if (nfsm_get_disconnect_requested()) { LOG_DBG("The cloud socket was disconnected by request"); @@ -670,14 +666,14 @@ void nrf_cloud_run(void) break; } - if ((fds[0].revents & POLLHUP) == POLLHUP) { + if ((fds[0].revents & ZSOCK_POLLHUP) == ZSOCK_POLLHUP) { LOG_DBG("Socket error: POLLHUP"); LOG_DBG("Connection was closed by the cloud"); evt.status = NRF_CLOUD_DISCONNECT_CLOSED_BY_REMOTE; break; } - if ((fds[0].revents & POLLERR) == POLLERR) { + if ((fds[0].revents & ZSOCK_POLLERR) == ZSOCK_POLLERR) { LOG_DBG("Socket error: POLLERR"); LOG_DBG("Cloud connection was unexpectedly closed"); evt.status = NRF_CLOUD_DISCONNECT_MISC; diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_dns.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_dns.c index 23d12787d8bf..e2ff840908ad 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_dns.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_dns.c @@ -15,13 +15,14 @@ LOG_MODULE_REGISTER(nrf_cloud_dns, CONFIG_NRF_CLOUD_LOG_LEVEL); static int nrf_cloud_try_addresses(const char *const host_name, uint16_t port, - struct addrinfo *hints, nrf_cloud_connect_host_cb connect_cb) + struct zsock_addrinfo *hints, + nrf_cloud_connect_host_cb connect_cb) { int err = 0; - struct addrinfo *info; - struct addrinfo *result; + struct zsock_addrinfo *info; + struct zsock_addrinfo *result; - err = getaddrinfo(host_name, NULL, hints, &info); + err = zsock_getaddrinfo(host_name, NULL, hints, &info); if (err) { LOG_DBG("getaddrinfo for %s, port: %d failed: %d, errno: %d", host_name, port, err, errno); @@ -47,8 +48,9 @@ static int nrf_cloud_try_addresses(const char *const host_name, uint16_t port, break; } - inet_ntop(sa->sa_family, (void *)&((struct sockaddr_in *)sa)->sin_addr, - ip, sizeof(ip)); + zsock_inet_ntop(sa->sa_family, + (void *)&((struct sockaddr_in *)sa)->sin_addr, + ip, sizeof(ip)); LOG_DBG("Trying IP address and port for server %s: %s, port: %d", host_name, ip, port); @@ -66,15 +68,16 @@ static int nrf_cloud_try_addresses(const char *const host_name, uint16_t port, /* Pass the socket back to the initial caller, if creating/connecting it was * successful. */ - freeaddrinfo(result); + zsock_freeaddrinfo(result); return sock; } - freeaddrinfo(result); + zsock_freeaddrinfo(result); return -ECONNREFUSED; } -int nrf_cloud_connect_host(const char *hostname, uint16_t port, struct addrinfo *hints, +int nrf_cloud_connect_host(const char *hostname, uint16_t port, + struct zsock_addrinfo *hints, nrf_cloud_connect_host_cb connect_cb) { int sock; diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_rest.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_rest.c index 4beec1177a5a..7ebd8b83ad3b 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_rest.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_rest.c @@ -994,7 +994,7 @@ int nrf_cloud_rest_disconnect(struct nrf_cloud_rest_context *const rest_ctx) return -ENOTCONN; } - int err = close(rest_ctx->connect_socket); + int err = zsock_close(rest_ctx->connect_socket); if (err) { LOG_ERR("Failed to close socket, error: %d", errno); err = -EIO; diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_transport.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_transport.c index 2705c48fbc31..fadd1b312931 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_transport.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_transport.c @@ -20,14 +20,7 @@ #include #include #include - -#if defined(CONFIG_POSIX_API) -#include -#include -#include -#else #include -#endif /* defined(CONFIG_POSIX_API) */ LOG_MODULE_REGISTER(nrf_cloud_transport, CONFIG_NRF_CLOUD_LOG_LEVEL); @@ -968,7 +961,7 @@ int nct_connect(void) int err = 0; const char *const host_name = NRF_CLOUD_HOSTNAME; uint16_t port = htons(NRF_CLOUD_PORT); - struct addrinfo hints = { + struct zsock_addrinfo hints = { .ai_socktype = SOCK_STREAM }; int sock = nrf_cloud_connect_host(host_name, port, &hints, &nct_connect_host_cb); @@ -994,7 +987,7 @@ int nct_connect(void) .tv_sec = CONFIG_NRF_CLOUD_SEND_TIMEOUT_SEC }; - err = setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); + err = zsock_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); if (err == -1) { LOG_ERR("Failed to set timeout, errno: %d", errno); err = 0; diff --git a/subsys/net/lib/rest_client/src/rest_client.c b/subsys/net/lib/rest_client/src/rest_client.c index 4cff6745b501..04a8002ee6ea 100644 --- a/subsys/net/lib/rest_client/src/rest_client.c +++ b/subsys/net/lib/rest_client/src/rest_client.c @@ -10,14 +10,7 @@ #include #include -#if defined(CONFIG_POSIX_API) -#include -#include -#include -#include -#else #include -#endif #include #include #include @@ -87,13 +80,15 @@ static int rest_client_sckt_tls_setup(int fd, const char *const tls_hostname, verify = tls_peer_verify; } - err = setsockopt(fd, SOL_TLS, TLS_PEER_VERIFY, &verify, sizeof(verify)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_PEER_VERIFY, &verify, + sizeof(verify)); if (err) { LOG_ERR("Failed to setup peer verification, error: %d", errno); return err; } - err = setsockopt(fd, SOL_TLS, TLS_SEC_TAG_LIST, tls_sec_tag, sizeof(tls_sec_tag)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_SEC_TAG_LIST, tls_sec_tag, + sizeof(tls_sec_tag)); if (err) { LOG_ERR("Failed to setup TLS sec tag, error: %d", errno); return err; @@ -105,14 +100,16 @@ static int rest_client_sckt_tls_setup(int fd, const char *const tls_hostname, cache = TLS_SESSION_CACHE_DISABLED; } - err = setsockopt(fd, SOL_TLS, TLS_SESSION_CACHE, &cache, sizeof(cache)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_SESSION_CACHE, &cache, + sizeof(cache)); if (err) { LOG_ERR("Unable to set session cache, errno %d", errno); return err; } if (tls_hostname) { - err = setsockopt(fd, SOL_TLS, TLS_HOSTNAME, tls_hostname, strlen(tls_hostname)); + err = zsock_setsockopt(fd, SOL_TLS, TLS_HOSTNAME, tls_hostname, + strlen(tls_hostname)); if (err) { LOG_ERR("Failed to setup TLS hostname, error: %d", errno); return err; @@ -130,13 +127,15 @@ static int rest_client_sckt_timeouts_set(int fd, int32_t timeout_ms) /* Send TO also affects TCP connect */ timeout.tv_sec = timeout_ms / MSEC_PER_SEC; timeout.tv_usec = (timeout_ms % MSEC_PER_SEC) * USEC_PER_MSEC; - err = setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)); + err = zsock_setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, + sizeof(timeout)); if (err) { LOG_ERR("Failed to set socket send timeout, error: %d", errno); return err; } - err = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); + err = zsock_setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, + sizeof(timeout)); if (err) { LOG_ERR("Failed to set socket recv timeout, error: %d", errno); return err; @@ -154,10 +153,10 @@ static int rest_client_sckt_connect(int *const fd, int32_t *timeout_ms) { int ret; - struct addrinfo *addr_info; + struct zsock_addrinfo *addr_info; char peer_addr[INET6_ADDRSTRLEN]; char portstr[6] = { 0 }; - struct addrinfo hints = { + struct zsock_addrinfo hints = { .ai_flags = AI_NUMERICSERV, /* Let getaddrinfo() set port to addrinfo */ .ai_family = AF_UNSPEC, /* Both IPv4 and IPv6 addresses accepted */ .ai_socktype = SOCK_STREAM, @@ -177,17 +176,17 @@ static int rest_client_sckt_connect(int *const fd, LOG_DBG("Doing getaddrinfo() with connect addr %s port %s", hostname, portstr); - ret = getaddrinfo(hostname, portstr, &hints, &addr_info); + ret = zsock_getaddrinfo(hostname, portstr, &hints, &addr_info); if (ret) { LOG_ERR("getaddrinfo() failed, error: %d", ret); return -EFAULT; } sa = addr_info->ai_addr; - inet_ntop(sa->sa_family, - (void *)&((struct sockaddr_in *)sa)->sin_addr, - peer_addr, - INET6_ADDRSTRLEN); + zsock_inet_ntop(sa->sa_family, + (void *)&((struct sockaddr_in *)sa)->sin_addr, + peer_addr, + INET6_ADDRSTRLEN); LOG_DBG("getaddrinfo() %s", peer_addr); if (*timeout_ms != SYS_FOREVER_MS) { @@ -203,7 +202,7 @@ static int rest_client_sckt_connect(int *const fd, } proto = (sec_tag == REST_CLIENT_SEC_TAG_NO_SEC) ? IPPROTO_TCP : IPPROTO_TLS_1_2; - *fd = socket(addr_info->ai_family, SOCK_STREAM, proto); + *fd = zsock_socket(addr_info->ai_family, SOCK_STREAM, proto); if (*fd == -1) { LOG_ERR("Failed to open socket, error: %d", errno); ret = -ENOTCONN; @@ -227,7 +226,7 @@ static int rest_client_sckt_connect(int *const fd, LOG_DBG("Connecting to %s port %s", hostname, portstr); - ret = connect(*fd, addr_info->ai_addr, addr_info->ai_addrlen); + ret = zsock_connect(*fd, addr_info->ai_addr, addr_info->ai_addrlen); if (ret) { LOG_ERR("Failed to connect socket, error: %d", errno); if (errno == ETIMEDOUT) { @@ -253,10 +252,10 @@ static int rest_client_sckt_connect(int *const fd, clean_up: - freeaddrinfo(addr_info); + zsock_freeaddrinfo(addr_info); if (ret) { if (*fd > -1) { - (void)close(*fd); + (void)zsock_close(*fd); *fd = -1; } } @@ -270,7 +269,7 @@ static void rest_client_close_connection(struct rest_client_req_context *const r int ret; if (!req_ctx->keep_alive) { - ret = close(req_ctx->connect_socket); + ret = zsock_close(req_ctx->connect_socket); if (ret) { LOG_WRN("Failed to close socket, error: %d", errno); } else { diff --git a/subsys/net/lib/softap_wifi_provision/softap_wifi_provision.c b/subsys/net/lib/softap_wifi_provision/softap_wifi_provision.c index e31edf595ba5..310b4a812cc3 100644 --- a/subsys/net/lib/softap_wifi_provision/softap_wifi_provision.c +++ b/subsys/net/lib/softap_wifi_provision/softap_wifi_provision.c @@ -20,8 +20,7 @@ #include #include #include -#include -#include +#include #include #include "pb_decode.h" diff --git a/subsys/net/lib/wifi_credentials/CMakeLists.txt b/subsys/net/lib/wifi_credentials/CMakeLists.txt deleted file mode 100644 index 055c57810a2a..000000000000 --- a/subsys/net/lib/wifi_credentials/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -zephyr_library_named(wifi_credentials) -zephyr_library_sources(wifi_credentials.c) - -if (CONFIG_WIFI_CREDENTIALS_BACKEND_PSA) -zephyr_library_include_directories( - $/api_ns/interface/include -) -endif() - -zephyr_library_sources_ifdef( - CONFIG_WIFI_CREDENTIALS_BACKEND_SETTINGS - wifi_credentials_backend_settings.c) - -zephyr_library_sources_ifdef( - CONFIG_WIFI_CREDENTIALS_BACKEND_PSA - wifi_credentials_backend_psa.c) - -zephyr_library_sources_ifdef( - CONFIG_WIFI_CREDENTIALS_BACKEND_NONE - wifi_credentials_backend_none.c) - -zephyr_library_sources_ifdef( - CONFIG_WIFI_CREDENTIALS_SHELL - wifi_credentials_shell.c) - -if(WIFI_CREDENTIALS_STATIC_SSID) - message(WARNING - "Static Wi-Fi configuration is used, please remove before deployment!" - ) -endif() diff --git a/subsys/net/lib/wifi_credentials/Kconfig b/subsys/net/lib/wifi_credentials/Kconfig deleted file mode 100644 index 1507da4583f7..000000000000 --- a/subsys/net/lib/wifi_credentials/Kconfig +++ /dev/null @@ -1,111 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -menuconfig WIFI_CREDENTIALS - bool "WIFI credentials management" - select EXPERIMENTAL - help - Enable WiFi credentials management subsystem. - -if WIFI_CREDENTIALS - -module = WIFI_CREDENTIALS -module-str = wifi_credentials -source "subsys/logging/Kconfig.template.log_config" - -choice WIFI_CREDENTIALS_BACKEND - prompt "WiFi credentials backend" - default WIFI_CREDENTIALS_BACKEND_PSA if BUILD_WITH_TFM && !TFM_PROFILE_TYPE_MINIMAL - default WIFI_CREDENTIALS_BACKEND_SETTINGS - default WIFI_CREDENTIALS_BACKEND_NONE if WIFI_CREDENTIALS_STATIC - help - Selects whether to use PSA Protected Storage or the Zephyr settings subsystem - for credentials storage. - -config WIFI_CREDENTIALS_BACKEND_SETTINGS - bool "Zephyr Settings" - depends on SETTINGS - depends on !SETTINGS_NONE - -config WIFI_CREDENTIALS_BACKEND_PSA - bool "PSA Protected Storage" - depends on BUILD_WITH_TFM && !TFM_PROFILE_TYPE_MINIMAL - -config WIFI_CREDENTIALS_BACKEND_NONE - bool "No credentials storage" - depends on WIFI_CREDENTIALS_STATIC - -endchoice - -config WIFI_CREDENTIALS_MAX_ENTRIES - int "Number of supported WiFi credentials" - default 2 - help - This detemines how many different WiFi networks can be configured at a time. - -config WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH - int "Max. length of SAE password" - default 128 - help - There is no official limit on SAE password length, - but for example Linux 6.0 has a hardcoded limit of 128 bytes. - -config WIFI_CREDENTIALS_SHELL - bool "Shell commands to manage Wi-Fi credentials" - default y - depends on SHELL - select SHELL_GETOPT - select GETOPT_LONG - depends on !WIFI_CREDENTIALS_BACKEND_NONE - -endif # WIFI_CREDENTIALS - -if WIFI_CREDENTIALS_BACKEND_PSA - -config WIFI_CREDENTIALS_BACKEND_PSA_OFFSET - int "PSA_KEY_ID range offset" - default 0 - help - The PSA specification mandates to set key identifiers for keys - with persistent lifetime. The users of the PSA API are responsible (WIFI credentials - management is user of PSA API) to provide correct and unique identifiers. - -endif # WIFI_CREDENTIALS_BACKEND_PSA - -config WIFI_CREDENTIALS_STATIC - bool "Static Wi-Fi network configuration" - -if WIFI_CREDENTIALS_STATIC - -config WIFI_CREDENTIALS_STATIC_SSID - string "SSID of statically configured WiFi network" - -config WIFI_CREDENTIALS_STATIC_PASSWORD - string "Password of statically configured Wi-Fi network" - default "" - -choice WIFI_CREDENTIALS_STATIC_TYPE - prompt "Static Wi-Fi network security type" - default WIFI_CREDENTIALS_STATIC_TYPE_PSK - -config WIFI_CREDENTIALS_STATIC_TYPE_OPEN - bool "OPEN" - -config WIFI_CREDENTIALS_STATIC_TYPE_PSK - bool "WPA2-PSK" - -config WIFI_CREDENTIALS_STATIC_TYPE_PSK_SHA256 - bool "WPA2-PSK-SHA256" - -config WIFI_CREDENTIALS_STATIC_TYPE_SAE - bool "SAE" - -config WIFI_CREDENTIALS_STATIC_TYPE_WPA_PSK - bool "WPA-PSK" - -endchoice - -endif diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials.c b/subsys/net/lib/wifi_credentials/wifi_credentials.c deleted file mode 100644 index b61b91a114ee..000000000000 --- a/subsys/net/lib/wifi_credentials/wifi_credentials.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include -#include -#include - -#include "wifi_credentials_internal.h" - -LOG_MODULE_REGISTER(wifi_credentials, CONFIG_WIFI_CREDENTIALS_LOG_LEVEL); - -K_MUTEX_DEFINE(wifi_credentials_mutex); - -/* SSID cache: maps SSIDs to their storage indices */ -static char ssid_cache[CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES][WIFI_SSID_MAX_LEN]; -static size_t ssid_cache_lengths[CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES]; - -/** - * @brief Finds index of given SSID if it exists. - * - * @param ssid SSID to look for (buffer of WIFI_SSID_MAX_LEN length) - * @return index if entry is found, -1 otherwise - */ -static inline ssize_t lookup_idx(const uint8_t *ssid, size_t ssid_len) -{ - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (ssid_len != ssid_cache_lengths[i]) { - continue; - } - if (strncmp(ssid, ssid_cache[i], ssid_len) == 0) { - return i; - } - } - - return -1; -} - -/** - * @brief Determine whether an index is currently used for storing network credentials. - * - * @param idx credential index - * @return true if index is used, false otherwise - */ -static inline bool is_entry_used(size_t idx) -{ - return ssid_cache_lengths[idx] != 0; -} - -/** - * @brief Finds unused index to store new entry at. - * - * @return index if empty slot is found, -1 otherwise - */ -static inline ssize_t lookup_unused_idx(void) -{ - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (!is_entry_used(i)) { - return i; - } - } - - return -1; -} - -static int init(void) -{ - - int ret; - - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - - ret = wifi_credentials_backend_init(); - if (ret) { - LOG_ERR("Initializing WiFi credentials storage backend failed, err: %d", ret); - } - - k_mutex_unlock(&wifi_credentials_mutex); - - return 0; -} - -void wifi_credentials_cache_ssid(size_t idx, const struct wifi_credentials_header *buf) -{ - memcpy(ssid_cache[idx], buf->ssid, buf->ssid_len); - ssid_cache_lengths[idx] = buf->ssid_len; -} - -/** - * @brief Clear entry in SSID cache. - * - * @param idx credential index - */ -void wifi_credentials_uncache_ssid(size_t idx) -{ - ssid_cache_lengths[idx] = 0; -} - -int wifi_credentials_get_by_ssid_personal_struct(const char *ssid, size_t ssid_len, - struct wifi_credentials_personal *buf) -{ - int ret; - - if (ssid == NULL || ssid_len > WIFI_SSID_MAX_LEN || ssid_len == 0) { - LOG_ERR("Cannot retrieve WiFi credentials, SSID has invalid format"); - return -EINVAL; - } - if (buf == NULL) { - LOG_ERR("Cannot retrieve WiFi credentials, " - "destination struct pointer cannot be NULL"); - return -EINVAL; - } - - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - - ssize_t idx = lookup_idx(ssid, ssid_len); - - if (idx == -1) { - LOG_DBG("Cannot retrieve WiFi credentials, no entry found for the provided SSID"); - ret = -ENOENT; - goto exit; - } - - ret = wifi_credentials_load_entry(idx, buf, sizeof(struct wifi_credentials_personal)); - - if (ret) { - LOG_ERR("Failed to load WiFi credentials at index %d, err: %d", idx, ret); - goto exit; - } - - if (buf->header.type != WIFI_SECURITY_TYPE_NONE && - buf->header.type != WIFI_SECURITY_TYPE_PSK && - buf->header.type != WIFI_SECURITY_TYPE_PSK_SHA256 && - buf->header.type != WIFI_SECURITY_TYPE_SAE && - buf->header.type != WIFI_SECURITY_TYPE_EAP_TLS && - buf->header.type != WIFI_SECURITY_TYPE_WPA_PSK) { - LOG_ERR("Requested WiFi credentials entry is corrupted"); - ret = -EPROTO; - goto exit; - } - -exit: - k_mutex_unlock(&wifi_credentials_mutex); - - return ret; -} - -int wifi_credentials_set_personal_struct(const struct wifi_credentials_personal *creds) -{ - int ret; - - if (creds->header.ssid_len > WIFI_SSID_MAX_LEN || - creds->header.ssid_len == 0) { - LOG_ERR("Cannot set WiFi credentials, SSID has invalid format"); - return -EINVAL; - } - if (creds == NULL) { - LOG_ERR("Cannot set WiFi credentials, provided struct pointer cannot be NULL"); - return -EINVAL; - } - - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - - ssize_t idx = lookup_idx(creds->header.ssid, creds->header.ssid_len); - - if (idx == -1) { - idx = lookup_unused_idx(); - if (idx == -1) { - LOG_ERR("Cannot store WiFi credentials, no space left"); - ret = -ENOBUFS; - goto exit; - } - } - - ret = wifi_credentials_store_entry(idx, creds, sizeof(struct wifi_credentials_personal)); - - if (ret) { - LOG_ERR("Failed to store WiFi credentials at index %d, err: %d", idx, ret); - goto exit; - } - - wifi_credentials_cache_ssid(idx, &creds->header); - -exit: - k_mutex_unlock(&wifi_credentials_mutex); - - return ret; -} - -int wifi_credentials_set_personal(const char *ssid, size_t ssid_len, enum wifi_security_type type, - const uint8_t *bssid, size_t bssid_len, const char *password, - size_t password_len, uint32_t flags, uint8_t channel, - uint32_t timeout) -{ - int ret = 0; - uint8_t buf[ENTRY_MAX_LEN] = { 0 }; - - if (ssid == NULL || ssid_len > WIFI_SSID_MAX_LEN || ssid_len == 0) { - LOG_ERR("Cannot set WiFi credentials, SSID has invalid format"); - return -EINVAL; - } - if (flags & WIFI_CREDENTIALS_FLAG_BSSID && - (bssid_len != WIFI_MAC_ADDR_LEN || bssid == NULL)) { - LOG_ERR("Cannot set WiFi credentials, " - "provided flags indicated BSSID, but no BSSID provided"); - return -EINVAL; - } - if ((type != WIFI_SECURITY_TYPE_NONE && (password_len == 0 || password == NULL)) || - (password_len > WIFI_CREDENTIALS_MAX_PASSWORD_LEN)) { - LOG_ERR("Cannot set WiFi credentials, password not provided or invalid"); - return -EINVAL; - } - - /* pack entry */ - struct wifi_credentials_header *header = (struct wifi_credentials_header *)buf; - - header->type = type; - memcpy(header->ssid, ssid, ssid_len); - header->ssid_len = ssid_len; - header->flags = flags; - header->channel = channel; - header->timeout = timeout; - - if (flags & WIFI_CREDENTIALS_FLAG_BSSID) { - memcpy(header->bssid, bssid, WIFI_MAC_ADDR_LEN); - } - - switch (type) { - case WIFI_SECURITY_TYPE_NONE: - break; - case WIFI_SECURITY_TYPE_PSK: - case WIFI_SECURITY_TYPE_PSK_SHA256: - case WIFI_SECURITY_TYPE_WPA_PSK: - case WIFI_SECURITY_TYPE_SAE: { - struct wifi_credentials_personal *header_personal = - (struct wifi_credentials_personal *)buf; - - memcpy(header_personal->password, password, password_len); - header_personal->password_len = password_len; - break; - } - default: - LOG_ERR("Cannot set WiFi credentials, " - "provided security type %d is unsupported", type); - return -ENOTSUP; - } - - /* store entry */ - ret = wifi_credentials_set_personal_struct((struct wifi_credentials_personal *)buf); - - return ret; -} - -int wifi_credentials_get_by_ssid_personal(const char *ssid, size_t ssid_len, - enum wifi_security_type *type, uint8_t *bssid_buf, - size_t bssid_buf_len, char *password_buf, - size_t password_buf_len, size_t *password_len, - uint32_t *flags, uint8_t *channel, uint32_t *timeout) -{ - int ret = 0; - uint8_t buf[ENTRY_MAX_LEN] = { 0 }; - - if (ssid == NULL || ssid_len > WIFI_SSID_MAX_LEN || ssid_len == 0) { - LOG_ERR("Cannot retrieve WiFi credentials, SSID has invalid format"); - return -EINVAL; - } - if (bssid_buf_len != WIFI_MAC_ADDR_LEN || bssid_buf == NULL) { - LOG_ERR("BSSID buffer needs to be provided"); - return -EINVAL; - } - if (password_buf == NULL || password_buf_len > WIFI_CREDENTIALS_MAX_PASSWORD_LEN || - password_buf_len == 0) { - LOG_ERR("WiFi password buffer needs to be provided"); - return -EINVAL; - } - - /* load entry */ - ret = wifi_credentials_get_by_ssid_personal_struct(ssid, ssid_len, - (struct wifi_credentials_personal *)buf); - - if (ret) { - return ret; - } - - /* unpack entry*/ - struct wifi_credentials_header *header = (struct wifi_credentials_header *)buf; - - *type = header->type; - *flags = header->flags; - *channel = header->channel; - *timeout = header->timeout; - - if (header->flags & WIFI_CREDENTIALS_FLAG_BSSID) { - memcpy(bssid_buf, header->bssid, WIFI_MAC_ADDR_LEN); - } - - switch (header->type) { - case WIFI_SECURITY_TYPE_NONE: - break; - case WIFI_SECURITY_TYPE_PSK: - case WIFI_SECURITY_TYPE_PSK_SHA256: - case WIFI_SECURITY_TYPE_WPA_PSK: - case WIFI_SECURITY_TYPE_SAE: { - struct wifi_credentials_personal *header_personal = - (struct wifi_credentials_personal *)buf; - - memcpy(password_buf, header_personal->password, header_personal->password_len); - *password_len = header_personal->password_len; - break; - } - default: - LOG_ERR("Cannot get WiFi credentials, " - "the requested credentials have invalid WIFI_SECURITY_TYPE"); - ret = -EPROTO; - } - return ret; -} - -int wifi_credentials_delete_by_ssid(const char *ssid, size_t ssid_len) -{ - int ret = 0; - - if (ssid == NULL || ssid_len > WIFI_SSID_MAX_LEN || ssid_len == 0) { - LOG_ERR("Cannot delete WiFi credentials, SSID has invalid format"); - return -EINVAL; - } - - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - ssize_t idx = lookup_idx(ssid, ssid_len); - - if (idx == -1) { - LOG_DBG("WiFi credentials entry was not found"); - goto exit; - } - - ret = wifi_credentials_delete_entry(idx); - - if (ret) { - LOG_ERR("Failed to delete WiFi credentials index %d, err: %d", idx, ret); - goto exit; - } - - wifi_credentials_uncache_ssid(idx); - -exit: - k_mutex_unlock(&wifi_credentials_mutex); - return ret; -} - -void wifi_credentials_for_each_ssid(wifi_credentials_ssid_cb cb, void *cb_arg) -{ - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (is_entry_used(i)) { - cb(cb_arg, ssid_cache[i], ssid_cache_lengths[i]); - } - } - k_mutex_unlock(&wifi_credentials_mutex); -} - -bool wifi_credentials_is_empty(void) -{ - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (is_entry_used(i)) { - k_mutex_unlock(&wifi_credentials_mutex); - return false; - } - } - k_mutex_unlock(&wifi_credentials_mutex); - return true; -} - -int wifi_credentials_delete_all(void) -{ - int ret = 0; - - k_mutex_lock(&wifi_credentials_mutex, K_FOREVER); - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (is_entry_used(i)) { - ret = wifi_credentials_delete_entry(i); - if (ret) { - LOG_ERR("Failed to delete WiFi credentials index %d, err: %d", - i, ret); - break; - } - wifi_credentials_uncache_ssid(i); - } - } - - k_mutex_unlock(&wifi_credentials_mutex); - return ret; -} - -SYS_INIT(init, POST_KERNEL, CONFIG_APPLICATION_INIT_PRIORITY); diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials_backend_none.c b/subsys/net/lib/wifi_credentials/wifi_credentials_backend_none.c deleted file mode 100644 index 750d3a1f71ad..000000000000 --- a/subsys/net/lib/wifi_credentials/wifi_credentials_backend_none.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2023 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include - -#include "wifi_credentials_internal.h" - -int wifi_credentials_store_entry(size_t idx, const void *buf, size_t buf_len) -{ - ARG_UNUSED(idx); - ARG_UNUSED(buf); - ARG_UNUSED(buf_len); - - return 0; -} - -int wifi_credentials_delete_entry(size_t idx) -{ - ARG_UNUSED(idx); - - return 0; -} - -int wifi_credentials_load_entry(size_t idx, void *buf, size_t buf_len) -{ - ARG_UNUSED(idx); - ARG_UNUSED(buf); - ARG_UNUSED(buf_len); - - return 0; -} - -int wifi_credentials_backend_init(void) -{ - return 0; -} diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials_backend_psa.c b/subsys/net/lib/wifi_credentials/wifi_credentials_backend_psa.c deleted file mode 100644 index dcee72ca1adf..000000000000 --- a/subsys/net/lib/wifi_credentials/wifi_credentials_backend_psa.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include "psa/crypto.h" - -#include "wifi_credentials_internal.h" - -LOG_MODULE_REGISTER(wifi_credentials_backend, CONFIG_WIFI_CREDENTIALS_LOG_LEVEL); - -#define WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN (PSA_KEY_ID_USER_MIN + \ - CONFIG_WIFI_CREDENTIALS_BACKEND_PSA_OFFSET) - -BUILD_ASSERT((WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN + CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES) - <= PSA_KEY_ID_USER_MAX, - "WIFI credentials management PSA key id range exceeds PSA_KEY_ID_USER_MAX."); - - -int wifi_credentials_backend_init(void) -{ - psa_status_t ret; - uint8_t buf[ENTRY_MAX_LEN]; - - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - size_t length_read = 0; - size_t key_id = i + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; - - ret = psa_export_key(key_id, buf, ARRAY_SIZE(buf), &length_read); - if (ret == PSA_SUCCESS && length_read == ENTRY_MAX_LEN) { - wifi_credentials_cache_ssid(i, (struct wifi_credentials_header *)buf); - } else if (ret != PSA_ERROR_INVALID_HANDLE) { - LOG_ERR("psa_export_key failed, err: %d", ret); - return -EFAULT; - } - } - - return 0; -} - -int wifi_credentials_store_entry(size_t idx, const void *buf, size_t buf_len) -{ - psa_status_t ret; - psa_key_attributes_t key_attributes = { 0 }; - psa_key_id_t key_id; - - psa_set_key_id(&key_attributes, idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN); - psa_set_key_usage_flags(&key_attributes, PSA_KEY_USAGE_EXPORT); - psa_set_key_lifetime(&key_attributes, PSA_KEY_LIFETIME_PERSISTENT); - psa_set_key_algorithm(&key_attributes, PSA_ALG_NONE); - psa_set_key_type(&key_attributes, PSA_KEY_TYPE_RAW_DATA); - psa_set_key_bits(&key_attributes, buf_len * 8); - - ret = psa_import_key(&key_attributes, buf, buf_len, &key_id); - if (ret == PSA_ERROR_ALREADY_EXISTS) { - LOG_ERR("psa_import_key failed, duplicate key: %d", ret); - return -EEXIST; - } else if (ret != PSA_SUCCESS) { - LOG_ERR("psa_import_key failed, err: %d", ret); - return -EFAULT; - } - - return 0; -} - -int wifi_credentials_delete_entry(size_t idx) -{ - psa_status_t ret = psa_destroy_key(idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN); - - if (ret != PSA_SUCCESS) { - LOG_ERR("psa_destroy_key failed, err: %d", ret); - return -EFAULT; - } - - return 0; -} - -int wifi_credentials_load_entry(size_t idx, void *buf, size_t buf_len) -{ - size_t length_read = 0; - size_t key_id = idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; - - psa_status_t ret = psa_export_key(key_id, buf, buf_len, &length_read); - - if (ret != PSA_SUCCESS) { - LOG_ERR("psa_export_key failed, err: %d", ret); - return -EFAULT; - } - - if (buf_len != length_read) { - return -EIO; - } - - return 0; -} diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials_backend_settings.c b/subsys/net/lib/wifi_credentials/wifi_credentials_backend_settings.c deleted file mode 100644 index 1323cdf842d0..000000000000 --- a/subsys/net/lib/wifi_credentials/wifi_credentials_backend_settings.c +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include -#include - -#include "wifi_credentials_internal.h" - -LOG_MODULE_REGISTER(wifi_credentials_backend, CONFIG_WIFI_CREDENTIALS_LOG_LEVEL); - -BUILD_ASSERT(ENTRY_MAX_LEN <= SETTINGS_MAX_VAL_LEN); - -#define WIFI_CREDENTIALS_SBE_BASE_KEY "wifi_cred" -#define WIFI_CREDENTIALS_SBE_KEY_SIZE sizeof(WIFI_CREDENTIALS_SBE_BASE_KEY "/" \ - STRINGIFY(CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES)) -#define WIFI_CREDENTIALS_SBE_KEY_FMT WIFI_CREDENTIALS_SBE_BASE_KEY "/%d" - -/* Type of the callback argument used in the function below. */ -struct zephyr_settings_backend_load_cb_arg { - uint8_t *buf; - size_t buf_len; - size_t idx; - bool found; -}; - -/* This callback function is used to retrieve credentials on demand. */ -static int zephyr_settings_backend_load_val_cb(const char *key, size_t len, - settings_read_cb read_cb, - void *cb_arg, void *param) -{ - struct zephyr_settings_backend_load_cb_arg *arg = param; - int idx = atoi(key); - - if (arg->idx != idx) { - LOG_DBG("Skipping index [%s]", key); - return 0; - } - - if (len != arg->buf_len) { - LOG_ERR("Settings error: invalid settings length"); - return -EINVAL; - } - - size_t length_read = read_cb(cb_arg, arg->buf, arg->buf_len); - - /* value validation */ - if (length_read < len) { - LOG_ERR("Settings error: entry incomplete"); - return -ENODATA; - } - - arg->found = true; - - return 0; -} - -/* This callback function is used to initialize the SSID cache. */ -static int zephyr_settings_backend_load_key_cb(const char *key, size_t len, - settings_read_cb read_cb, - void *cb_arg, void *param) -{ - ARG_UNUSED(param); - - /* key validation */ - if (!key) { - LOG_ERR("Settings error: no key"); - return -EINVAL; - } - - int idx = atoi(key); - - if ((idx == 0 && strcmp(key, "0") != 0) || idx >= CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES) { - LOG_ERR("Settings error: index too large"); - return -EINVAL; - } - - if (len < sizeof(struct wifi_credentials_header)) { - LOG_ERR("Settings error: invalid settings length"); - return -EINVAL; - } - - uint8_t buf[ENTRY_MAX_LEN]; - size_t length_read = read_cb(cb_arg, buf, ARRAY_SIZE(buf)); - - /* value validation */ - if (length_read < len) { - LOG_ERR("Settings error: entry incomplete"); - return -ENODATA; - } - - wifi_credentials_cache_ssid(idx, (struct wifi_credentials_header *)buf); - return 0; -} - -int wifi_credentials_backend_init(void) -{ - int ret = settings_subsys_init(); - - if (ret) { - LOG_ERR("Initializing settings subsystem failed: %d", ret); - return ret; - } - ret = settings_load_subtree_direct(WIFI_CREDENTIALS_SBE_BASE_KEY, - zephyr_settings_backend_load_key_cb, NULL); - - return ret; -} - -int wifi_credentials_store_entry(size_t idx, const void *buf, size_t buf_len) -{ - char settings_name_buf[WIFI_CREDENTIALS_SBE_KEY_SIZE] = { 0 }; - - int ret = snprintk(settings_name_buf, ARRAY_SIZE(settings_name_buf), - WIFI_CREDENTIALS_SBE_KEY_FMT, idx); - - if (ret < 0 || ret == ARRAY_SIZE(settings_name_buf)) { - LOG_ERR("WiFi credentials settings key could not be generated, idx: %d", idx); - return -EFAULT; - } - - return settings_save_one(settings_name_buf, buf, buf_len); -} - -int wifi_credentials_delete_entry(size_t idx) -{ - char settings_name_buf[WIFI_CREDENTIALS_SBE_KEY_SIZE] = { 0 }; - - int ret = snprintk(settings_name_buf, ARRAY_SIZE(settings_name_buf), - WIFI_CREDENTIALS_SBE_KEY_FMT, idx); - - if (ret < 0 || ret == ARRAY_SIZE(settings_name_buf)) { - LOG_ERR("WiFi credentials settings key could not be generated, idx: %d", idx); - return -EFAULT; - } - - return settings_delete(settings_name_buf); -} - -int wifi_credentials_load_entry(size_t idx, void *buf, size_t buf_len) -{ - struct zephyr_settings_backend_load_cb_arg arg = { - .buf = buf, - .buf_len = buf_len, - .idx = idx, - .found = false, - }; - int ret; - - /* Browse through the settings entries with custom callback to load the whole entry. */ - ret = settings_load_subtree_direct(WIFI_CREDENTIALS_SBE_BASE_KEY, - zephyr_settings_backend_load_val_cb, &arg); - - if (ret) { - return ret; - } - if (!arg.found) { - return -ENOENT; - } - return 0; -} diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials_internal.h b/subsys/net/lib/wifi_credentials/wifi_credentials_internal.h deleted file mode 100644 index 5bff31dc2a37..000000000000 --- a/subsys/net/lib/wifi_credentials/wifi_credentials_internal.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include - -#define ENTRY_MAX_LEN sizeof(struct wifi_credentials_personal) - -/** - * @brief Write entry to SSID cache. - * - * @param idx credential index - * @param buf encoded settings entry - * @param buf_len length of buf - */ -void wifi_credentials_cache_ssid(size_t idx, const struct wifi_credentials_header *buf); - -/** - * @brief Clear entry in SSID cache. - * - * @param idx credential index - */ -void wifi_credentials_uncache_ssid(size_t idx); - -/** - * @brief Stores settings entry in flash. - * - * @param idx credential index - * @param buf encoded settings entry - * @param buf_len length of buf - * @return 0 on success, otherwise a negative error code - */ -int wifi_credentials_store_entry(size_t idx, const void *buf, size_t buf_len); - -/** - * @brief Deletes settings entry from flash. - * - * @param idx credential index - * @return 0 on success, otherwise a negative error code - */ -int wifi_credentials_delete_entry(size_t idx); - -/** - * @brief Loads settings entry from flash. - * - * @param idx credential index - * @param buf encoded settings entry - * @param buf_len length of buf - * @return 0 on success, otherwise a negative error code - */ -int wifi_credentials_load_entry(size_t idx, void *buf, size_t buf_len); - -/** - * @brief Initialize backend. - * @note Is called by the library on system startup. - * - */ -int wifi_credentials_backend_init(void); diff --git a/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c b/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c deleted file mode 100644 index b94c23c70e8c..000000000000 --- a/subsys/net/lib/wifi_credentials/wifi_credentials_shell.c +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright (c) 2023 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#define MAX_BANDS_STR_LEN 64 - -/* Ensure 'strnlen' is available even with -std=c99. */ -size_t strnlen(const char *buf, size_t bufsz); - -#define MACSTR "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx" - -static void print_network_info(void *cb_arg, const char *ssid, size_t ssid_len) -{ - int ret = 0; - struct wifi_credentials_personal creds = {0}; - const struct shell *shell = (const struct shell *)cb_arg; - - ret = wifi_credentials_get_by_ssid_personal_struct(ssid, ssid_len, &creds); - if (ret) { - shell_error(shell, - "An error occurred when trying to load credentials for network \"%.*s\"" - ". err: %d", - ssid_len, ssid, ret); - return; - } - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, - " network ssid: \"%.*s\", ssid_len: %d, type: %s", ssid_len, ssid, ssid_len, - wifi_security_txt(creds.header.type)); - - if (creds.header.type == WIFI_SECURITY_TYPE_PSK || - creds.header.type == WIFI_SECURITY_TYPE_PSK_SHA256 || - creds.header.type == WIFI_SECURITY_TYPE_SAE || - creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, - ", password: \"%.*s\", password_len: %d", creds.password_len, - creds.password, creds.password_len); - } - -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE - if (creds.header.type == WIFI_SECURITY_TYPE_EAP_TLS) { - if (creds.header.key_passwd_length > 0) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, - ", key_passwd: \"%.*s\", key_passwd_len: %d", - creds.header.key_passwd_length, creds.header.key_passwd, - creds.header.key_passwd_length); - } - if (creds.header.aid_length > 0) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, - ", anon_id: \"%.*s\", anon_id_len: %d", - creds.header.aid_length, creds.header.anon_id, - creds.header.aid_length); - } - } -#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ - - if (creds.header.flags & WIFI_CREDENTIALS_FLAG_BSSID) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", bssid: " MACSTR, - creds.header.bssid[0], creds.header.bssid[1], creds.header.bssid[2], - creds.header.bssid[3], creds.header.bssid[4], creds.header.bssid[5]); - } - - if (creds.header.flags & WIFI_CREDENTIALS_FLAG_2_4GHz) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", band: 2.4GHz"); - } - - if (creds.header.flags & WIFI_CREDENTIALS_FLAG_5GHz) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", band: 5GHz"); - } - - if (creds.header.channel) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", channel: %d", - creds.header.channel); - } - - if (creds.header.flags & WIFI_CREDENTIALS_FLAG_FAVORITE) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", favorite"); - } - - if (creds.header.flags & WIFI_CREDENTIALS_FLAG_MFP_REQUIRED) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", MFP_REQUIRED"); - } else if (creds.header.flags & WIFI_CREDENTIALS_FLAG_MFP_DISABLED) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", MFP_DISABLED"); - } else { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", MFP_OPTIONAL"); - } - - if (creds.header.timeout) { - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, ", timeout: %d", - creds.header.timeout); - } - - shell_fprintf(shell, SHELL_VT100_COLOR_DEFAULT, "\n"); -} - -static int cmd_add_network(const struct shell *shell, size_t argc, char *argv[]) -{ - - int opt; - int opt_index = 0; - struct getopt_state *state; - static const struct option long_options[] = { - {"ssid", required_argument, 0, 's'}, {"passphrase", required_argument, 0, 'p'}, - {"key-mgmt", required_argument, 0, 'k'}, {"ieee-80211w", required_argument, 0, 'w'}, - {"bssid", required_argument, 0, 'm'}, {"band", required_argument, 0, 'b'}, - {"channel", required_argument, 0, 'c'}, {"timeout", required_argument, 0, 't'}, - {"identity", required_argument, 0, 'a'}, {"key-passwd", required_argument, 0, 'K'}, - {"help", no_argument, 0, 'h'}, {0, 0, 0, 0}}; - char *endptr; - bool secure_connection = false; - uint8_t band; - struct wifi_credentials_personal creds = {0}; - - const uint8_t all_bands[] = {WIFI_FREQ_BAND_2_4_GHZ, WIFI_FREQ_BAND_5_GHZ, - WIFI_FREQ_BAND_6_GHZ}; - bool found = false; - char bands_str[MAX_BANDS_STR_LEN] = {0}; - size_t offset = 0; - long channel; - long mfp = WIFI_MFP_OPTIONAL; - - while ((opt = getopt_long(argc, argv, "s:p:k:w:b:c:m:t:a:K:h", long_options, &opt_index)) != - -1) { - state = getopt_state_get(); - switch (opt) { - case 's': - creds.header.ssid_len = strlen(state->optarg); - if (creds.header.ssid_len > WIFI_SSID_MAX_LEN) { - shell_warn(shell, "SSID too long (max %d characters)\n", - WIFI_SSID_MAX_LEN); - return -EINVAL; - } - memcpy(creds.header.ssid, state->optarg, creds.header.ssid_len); - break; - case 'k': - creds.header.type = atoi(state->optarg); - if (creds.header.type) { - secure_connection = true; - } - break; - case 'p': - creds.password_len = strlen(state->optarg); - if (creds.password_len < WIFI_PSK_MIN_LEN) { - shell_warn(shell, "Passphrase should be minimum %d characters\n", - WIFI_PSK_MIN_LEN); - return -EINVAL; - } - if (creds.password_len > WIFI_PSK_MAX_LEN) { - shell_warn(shell, "Passphrase too long (max %d characters)\n", - WIFI_PSK_MAX_LEN); - return -EINVAL; - } - memcpy(creds.password, state->optarg, creds.password_len); - break; - case 'c': - channel = strtol(state->optarg, &endptr, 10); - if (*endptr != '\0') { - shell_error(shell, "Invalid channel: %s\n", state->optarg); - return -EINVAL; - } - - for (band = 0; band < ARRAY_SIZE(all_bands); band++) { - offset += snprintf(bands_str + offset, sizeof(bands_str) - offset, - "%s%s", band ? "," : "", - wifi_band_txt(all_bands[band])); - if (offset >= sizeof(bands_str)) { - shell_error(shell, - "Failed to parse channel: %ld: " - "band string too long\n", - channel); - return -EINVAL; - } - - if (wifi_utils_validate_chan(all_bands[band], channel)) { - found = true; - break; - } - } - - if (!found) { - shell_error(shell, "Invalid channel: %ld, checked bands: %s\n", - channel, bands_str); - return -EINVAL; - } - - creds.header.channel = channel; - break; - case 'b': - switch (atoi(state->optarg)) { - case 2: - creds.header.flags |= WIFI_CREDENTIALS_FLAG_2_4GHz; - break; - case 5: - creds.header.flags |= WIFI_CREDENTIALS_FLAG_5GHz; - break; - case 6: - creds.header.flags |= WIFI_CREDENTIALS_FLAG_6GHz; - break; - default: - shell_error(shell, "Invalid band: %d\n", atoi(state->optarg)); - return -EINVAL; - } - break; - case 'w': - if (creds.header.type == WIFI_SECURITY_TYPE_NONE || - creds.header.type == WIFI_SECURITY_TYPE_WPA_PSK) { - shell_error(shell, "MFP not supported for security type %s", - wifi_security_txt(creds.header.type)); - return -ENOTSUP; - } - mfp = strtol(state->optarg, &endptr, 10); - if (*endptr != '\0') { - shell_error(shell, "Invalid IEEE 802.11w value: %s", state->optarg); - return -EINVAL; - } - if (mfp == WIFI_MFP_DISABLE) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_DISABLED; - } else if (mfp == WIFI_MFP_REQUIRED) { - creds.header.flags |= WIFI_CREDENTIALS_FLAG_MFP_REQUIRED; - } else if (mfp > 2) { - shell_error(shell, "Invalid IEEE 802.11w value: %s", - state->optarg); - return -EINVAL; - } - break; - case 'm': - if (net_bytes_from_str(creds.header.bssid, sizeof(creds.header.bssid), - state->optarg) < 0) { - shell_warn(shell, "Invalid MAC address\n"); - return -EINVAL; - } - creds.header.flags |= WIFI_CREDENTIALS_FLAG_BSSID; - break; - case 'a': - creds.header.aid_length = strlen(state->optarg); - if (creds.header.aid_length > WIFI_ENT_IDENTITY_MAX_LEN) { - shell_warn(shell, "anon_id too long (max %d characters)\n", - WIFI_ENT_IDENTITY_MAX_LEN); - return -EINVAL; - } - memcpy(creds.header.anon_id, state->optarg, creds.header.aid_length); - creds.header.flags |= WIFI_CREDENTIALS_FLAG_ANONYMOUS_IDENTITY; - break; - case 'K': - creds.header.key_passwd_length = strlen(state->optarg); - if (creds.header.key_passwd_length > WIFI_ENT_PSWD_MAX_LEN) { - shell_warn(shell, "key_passwd too long (max %d characters)\n", - WIFI_ENT_PSWD_MAX_LEN); - return -EINVAL; - } - memcpy(creds.header.key_passwd, state->optarg, - creds.header.key_passwd_length); - creds.header.flags |= WIFI_CREDENTIALS_FLAG_KEY_PASSWORD; - break; - case 'h': - shell_help(shell); - return -ENOEXEC; - default: - shell_error(shell, "Invalid option %c\n", state->optopt); - return -EINVAL; - } - } - if (creds.password_len > 0 && !secure_connection) { - shell_warn(shell, "Passphrase provided without security configuration\n"); - } - - if (creds.header.ssid_len == 0) { - shell_error(shell, "SSID not provided\n"); - shell_help(shell); - return -EINVAL; - } - - return wifi_credentials_set_personal_struct(&creds); -} - -static int cmd_delete_network(const struct shell *shell, size_t argc, char *argv[]) -{ - if (argc != 2) { - shell_print(shell, "Usage: wifi_cred delete \"network name\""); - return -EINVAL; - } - - if (strnlen(argv[1], WIFI_SSID_MAX_LEN + 1) > WIFI_SSID_MAX_LEN) { - shell_error(shell, "SSID too long"); - return -EINVAL; - } - - shell_print(shell, "\tDeleting network ssid: \"%s\", ssid_len: %d", argv[1], - strlen(argv[1])); - return wifi_credentials_delete_by_ssid(argv[1], strlen(argv[1])); -} - -static int cmd_list_networks(const struct shell *shell, size_t argc, char *argv[]) -{ - wifi_credentials_for_each_ssid(print_network_info, (void *)shell); - return 0; -} - - -SHELL_SUBCMD_SET_CREATE(sub_wifi_cred, (nwifi_cred)); -SHELL_SUBCMD_ADD((nwifi_cred), add, NULL, - "Add network to storage.\n" - "<-s --ssid \"\">: SSID.\n" - "[-c --channel]: Channel that needs to be scanned for connection. 0:any channel.\n" - "[-b, --band] 0: any band (2:2.4GHz, 5:5GHz, 6:6GHz]\n" - "[-p, --passphrase]: Passphrase (valid only for secure SSIDs)\n" - "[-k, --key-mgmt]: Key Management type (valid only for secure SSIDs)\n" - "0:None, 1:WPA2-PSK, 2:WPA2-PSK-256, 3:SAE-HNP, 4:SAE-H2E, 5:SAE-AUTO, 6:WAPI," - " 7:EAP-TLS, 8:WEP, 9: WPA-PSK, 10: WPA-Auto-Personal, 11: DPP\n" - "[-w, --ieee-80211w]: MFP (optional: needs security type to be specified)\n" - ": 0:Disable, 1:Optional, 2:Required.\n" - "[-m, --bssid]: MAC address of the AP (BSSID).\n" - "[-t, --timeout]: Timeout for the connection attempt (in seconds).\n" - "[-a, --identity]: Identity for enterprise mode.\n" - "[-K, --key-passwd]: Private key passwd for enterprise mode.\n" - "[-h, --help]: Print out the help for the connect command.\n", - cmd_add_network, 2, 12); -SHELL_SUBCMD_ADD((nwifi_cred), delete, NULL, "Delete network from storage.", cmd_delete_network, 0, - 0); -SHELL_SUBCMD_ADD((nwifi_cred), list, NULL, "List stored networks.", cmd_list_networks, 0, 0); - - -SHELL_CMD_REGISTER(wifi_cred, &sub_wifi_cred, "Wi-Fi Credentials commands", NULL); diff --git a/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt b/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt deleted file mode 100644 index a91041aa7b35..000000000000 --- a/subsys/net/lib/wifi_mgmt_ext/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -zephyr_library() -zephyr_library_sources(wifi_mgmt_ext.c) -zephyr_library_sources_ifdef( - CONFIG_WIFI_CREDENTIALS_SHELL_AUTOCONNECT - wifi_cred_shell_autoconnect.c) - -if(DEFINED CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE AND NOT DEFINED CONFIG_NET_L2_WIFI_SHELL) - # Wi-Fi Enterprise test certificates handling - set(gen_inc_dir ${ZEPHYR_BINARY_DIR}/misc/generated) - set(gen_dir ${gen_inc_dir}/wifi_enterprise_test_certs) - # Create output directory for test certs - file(MAKE_DIRECTORY ${gen_dir}) - - # convert .pem files to array data at build time - zephyr_include_directories(${gen_inc_dir}) - - generate_inc_file_for_target( - app - ${ZEPHYR_BASE}/samples/net/wifi/test_certs/client.pem - ${gen_dir}/client.pem.inc - ) - - generate_inc_file_for_target( - app - ${ZEPHYR_BASE}/samples/net/wifi/test_certs/client-key.pem - ${gen_dir}/client-key.pem.inc - ) - - generate_inc_file_for_target( - app - ${ZEPHYR_BASE}/samples/net/wifi/test_certs/ca.pem - ${gen_dir}/ca.pem.inc - ) -endif() diff --git a/subsys/net/lib/wifi_mgmt_ext/Kconfig b/subsys/net/lib/wifi_mgmt_ext/Kconfig deleted file mode 100644 index 4d619f692a85..000000000000 --- a/subsys/net/lib/wifi_mgmt_ext/Kconfig +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2023 Nordic Semiconductor -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -config WIFI_MGMT_EXT - bool "Extended commands for Wi-Fi management" - depends on WIFI_NM_WPA_SUPPLICANT - depends on WIFI_CREDENTIALS - default y - help - Extends Wi-Fi L2 stack by commands to handle - automatic connection management. - -config WIFI_CREDENTIALS_SHELL_AUTOCONNECT - bool "Shell commands to manage Wi-Fi credentials" - default y - depends on WIFI_CREDENTIALS_SHELL - depends on WIFI_MGMT_EXT - -if WIFI_MGMT_EXT - -config WIFI_MGMT_EXT_CONNECTION_TIMEOUT - int "Connection timeout" - default 30 - help - Wait period before falling back to the next entry in the list of stored SSIDs. - -module = WIFI_MGMT_EXT -module-str = wifi_mgmt_ext -source "subsys/logging/Kconfig.template.log_config" - -endif diff --git a/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c b/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c deleted file mode 100644 index b62c7f2a9f1e..000000000000 --- a/subsys/net/lib/wifi_mgmt_ext/wifi_cred_shell_autoconnect.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include - -#include -#include -#include -#include -#include - - -static int cmd_auto_connect(const struct shell *shell, size_t argc, char *argv[]) -{ - struct net_if *iface = net_if_get_first_by_type(&NET_L2_GET_NAME(ETHERNET)); - int rc = net_mgmt(NET_REQUEST_WIFI_CONNECT_STORED, iface, NULL, 0); - - if (rc) { - shell_error(shell, - "An error occurred when trying to auto-connect to a network. err: %d", - rc); - } - return 0; -} - -SHELL_SUBCMD_ADD((nwifi_cred), - auto_connect, NULL, "Connect to any stored network.", cmd_auto_connect, 0, 0); diff --git a/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c b/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c deleted file mode 100644 index 41d78cebdc06..000000000000 --- a/subsys/net/lib/wifi_mgmt_ext/wifi_mgmt_ext.c +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) 2023 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include - -#include -#include -#include -#include -#include - -#include "wpa_cli_zephyr.h" - -/* Ensure 'strnlen' is available even with -std=c99. */ -size_t strnlen(const char *buf, size_t bufsz); - -LOG_MODULE_REGISTER(wifi_mgmt_ext, CONFIG_WIFI_MGMT_EXT_LOG_LEVEL); - -#if defined(CONFIG_WIFI_CREDENTIALS_STATIC) -BUILD_ASSERT(sizeof(CONFIG_WIFI_CREDENTIALS_STATIC_SSID) != 1, - "CONFIG_WIFI_CREDENTIALS_STATIC_SSID required"); -#endif /* defined(CONFIG_WIFI_CREDENTIALS_STATIC) */ - -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE -static const char ca_cert_test[] = { -#include - '\0'}; - -static const char client_cert_test[] = { -#include - '\0'}; - -static const char client_key_test[] = { -#include - '\0'}; - -static const char ca_cert2_test[] = { - #include - '\0'}; - -static const char client_cert2_test[] = { - #include - '\0'}; - -static const char client_key2_test[] = { - #include - '\0'}; -#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ - -static int __stored_creds_to_params(struct wifi_credentials_personal *creds, - struct wifi_connect_req_params *params) -{ - char *ssid = NULL; - char *psk = NULL; -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE - char *key_passwd = NULL; -#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ - int ret; - - /* SSID */ - ssid = (char *)k_malloc(creds->header.ssid_len + 1); - if (!ssid) { - LOG_ERR("Failed to allocate memory for SSID\n"); - ret = -ENOMEM; - goto err_out; - } - memset(ssid, 0, creds->header.ssid_len + 1); - ret = snprintf(ssid, creds->header.ssid_len + 1, "%s", creds->header.ssid); - if (ret > creds->header.ssid_len) { - LOG_ERR("SSID string truncated\n"); - ret = -EINVAL; - goto err_out; - } - params->ssid = ssid; - params->ssid_length = creds->header.ssid_len; - - /* PSK (optional) */ - if (creds->password_len > 0) { - psk = (char *)k_malloc(creds->password_len + 1); - if (!psk) { - LOG_ERR("Failed to allocate memory for PSK\n"); - ret = -ENOMEM; - goto err_out; - } - memset(psk, 0, creds->password_len + 1); - ret = snprintf(psk, creds->password_len + 1, "%s", creds->password); - if (ret > creds->password_len) { - LOG_ERR("PSK string truncated\n"); - ret = -EINVAL; - goto err_out; - } - params->psk = psk; - params->psk_length = creds->password_len; - } - - /* Defaults */ - params->security = creds->header.type; -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE - if (params->security == WIFI_SECURITY_TYPE_EAP_TLS) { - if (creds->header.key_passwd_length > 0) { - key_passwd = (char *)k_malloc(creds->header.key_passwd_length + 1); - if (!key_passwd) { - LOG_ERR("Failed to allocate memory for key_passwd\n"); - ret = -ENOMEM; - goto err_out; - } - memset(key_passwd, 0, creds->header.key_passwd_length + 1); - ret = snprintf(key_passwd, creds->header.key_passwd_length + 1, "%s", - creds->header.key_passwd); - if (ret > creds->header.key_passwd_length) { - LOG_ERR("key_passwd string truncated\n"); - ret = -EINVAL; - goto err_out; - } - params->key_passwd = key_passwd; - params->key_passwd_length = creds->header.key_passwd_length; - } - } -#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ - - /* If channel is set to 0 we default to ANY. 0 is not a valid Wi-Fi channel. */ - params->channel = (creds->header.channel != 0) ? creds->header.channel : WIFI_CHANNEL_ANY; - params->timeout = (creds->header.timeout != 0) ? creds->header.timeout - : CONFIG_WIFI_MGMT_EXT_CONNECTION_TIMEOUT; - - /* Security type (optional) */ - if (creds->header.type > WIFI_SECURITY_TYPE_MAX) { - params->security = WIFI_SECURITY_TYPE_NONE; - } - - if (creds->header.flags & WIFI_CREDENTIALS_FLAG_2_4GHz) { - params->band = WIFI_FREQ_BAND_2_4_GHZ; - } else if (creds->header.flags & WIFI_CREDENTIALS_FLAG_5GHz) { - params->band = WIFI_FREQ_BAND_5_GHZ; - } else { - params->band = WIFI_FREQ_BAND_UNKNOWN; - } - - /* MFP setting (default: optional) */ - if (creds->header.flags & WIFI_CREDENTIALS_FLAG_MFP_DISABLED) { - params->mfp = WIFI_MFP_DISABLE; - } else if (creds->header.flags & WIFI_CREDENTIALS_FLAG_MFP_REQUIRED) { - params->mfp = WIFI_MFP_REQUIRED; - } else { - params->mfp = WIFI_MFP_OPTIONAL; - } - - return 0; -err_out: - if (ssid) { - k_free(ssid); - ssid = NULL; - } - if (psk) { - k_free(psk); - psk = NULL; - } -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE - if (key_passwd) { - k_free(key_passwd); - key_passwd = NULL; - } -#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE */ - return ret; -} - -static inline const char *wpa_supp_security_txt(enum wifi_security_type security) -{ - switch (security) { - case WIFI_SECURITY_TYPE_NONE: - return "NONE"; - case WIFI_SECURITY_TYPE_PSK: - return "WPA-PSK"; - case WIFI_SECURITY_TYPE_PSK_SHA256: - return "WPA-PSK-SHA256"; - case WIFI_SECURITY_TYPE_SAE: - return "SAE"; - case WIFI_SECURITY_TYPE_UNKNOWN: - default: - return "UNKNOWN"; - } -} - -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE -static int wifi_set_enterprise_creds(struct net_if *iface) -{ - struct wifi_enterprise_creds_params params = {0}; - - params.ca_cert = (uint8_t *)ca_cert_test; - params.ca_cert_len = ARRAY_SIZE(ca_cert_test); - params.client_cert = (uint8_t *)client_cert_test; - params.client_cert_len = ARRAY_SIZE(client_cert_test); - params.client_key = (uint8_t *)client_key_test; - params.client_key_len = ARRAY_SIZE(client_key_test); - params.ca_cert2 = (uint8_t *)ca_cert2_test; - params.ca_cert2_len = ARRAY_SIZE(ca_cert2_test); - params.client_cert2 = (uint8_t *)client_cert2_test; - params.client_cert2_len = ARRAY_SIZE(client_cert2_test); - params.client_key2 = (uint8_t *)client_key2_test; - params.client_key2_len = ARRAY_SIZE(client_key2_test); - - if (net_mgmt(NET_REQUEST_WIFI_ENTERPRISE_CREDS, iface, ¶ms, sizeof(params))) { - LOG_ERR("Set enterprise credentials failed\n"); - return -1; - } - - return 0; -} -#endif - -static int add_network_from_credentials_struct_personal(struct wifi_credentials_personal *creds, - struct net_if *iface) -{ - int ret = 0; - struct wifi_connect_req_params cnx_params = {0}; - - if (__stored_creds_to_params(creds, &cnx_params)) { - ret = -ENOEXEC; - goto out; - } - -#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE - /* Load the enterprise credentials if needed */ - if (cnx_params.security == WIFI_SECURITY_TYPE_EAP_TLS) { - wifi_set_enterprise_creds(iface); - } -#endif - if (net_mgmt(NET_REQUEST_WIFI_CONNECT, iface, &cnx_params, - sizeof(struct wifi_connect_req_params))) { - LOG_ERR("Connection request failed\n"); - - return -ENOEXEC; - } - - LOG_INF("Connection requested"); - -out: - if (cnx_params.psk) { - k_free((void *)cnx_params.psk); - } - - if (cnx_params.ssid) { - k_free((void *)cnx_params.ssid); - } - - return ret; -} - -static void add_stored_network(void *cb_arg, const char *ssid, size_t ssid_len) -{ - int ret = 0; - struct wifi_credentials_personal creds; - - /* load stored data */ - ret = wifi_credentials_get_by_ssid_personal_struct(ssid, ssid_len, &creds); - - if (ret) { - LOG_ERR("Loading WiFi credentials failed for SSID [%.*s], len: %d, err: %d", - ssid_len, ssid, ssid_len, ret); - return; - } - - add_network_from_credentials_struct_personal(&creds, (struct net_if *)cb_arg); -} - -static int add_static_network_config(struct net_if *iface) -{ -#if defined(CONFIG_WIFI_CREDENTIALS_STATIC) - - struct wifi_credentials_personal creds = { - .header = { - .ssid_len = strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID), - }, - .password_len = strlen(CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD), - }; - - int ret = wifi_credentials_get_by_ssid_personal_struct( - CONFIG_WIFI_CREDENTIALS_STATIC_SSID, strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID), - &creds); - - if (!ret) { - LOG_WRN("Statically configured WiFi network was overridden by storage."); - return 0; - } - -#if defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_OPEN) - creds.header.type = WIFI_SECURITY_TYPE_NONE; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_PSK) - creds.header.type = WIFI_SECURITY_TYPE_PSK; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_PSK_SHA256) - creds.header.type = WIFI_SECURITY_TYPE_PSK_SHA256; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_SAE) - creds.header.type = WIFI_SECURITY_TYPE_SAE; -#elif defined(CONFIG_WIFI_CREDENTIALS_STATIC_TYPE_WPA_PSK) - creds.header.type = WIFI_SECURITY_TYPE_WPA_PSK; -#else -#error "invalid CONFIG_WIFI_CREDENTIALS_STATIC_TYPE" -#endif - - memcpy(creds.header.ssid, CONFIG_WIFI_CREDENTIALS_STATIC_SSID, - strlen(CONFIG_WIFI_CREDENTIALS_STATIC_SSID)); - memcpy(creds.password, CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD, - strlen(CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD)); - - LOG_DBG("Adding statically configured WiFi network [%s] to internal list.", - creds.header.ssid); - - return add_network_from_credentials_struct_personal(&creds, iface); -#else - return 0; -#endif /* defined(CONFIG_WIFI_CREDENTIALS_STATIC) */ -} - -static int wifi_ext_command(uint32_t mgmt_request, struct net_if *iface, void *data, size_t len) -{ - int ret = 0; - - ret = add_static_network_config(iface); - if (ret) { - return ret; - } - - wifi_credentials_for_each_ssid(add_stored_network, iface); - - return ret; -}; - -NET_MGMT_REGISTER_REQUEST_HANDLER(NET_REQUEST_WIFI_CONNECT_STORED, wifi_ext_command); diff --git a/subsys/net/openthread/Kconfig.defconfig b/subsys/net/openthread/Kconfig.defconfig index 6805c31e6cda..3db1380e5e0e 100644 --- a/subsys/net/openthread/Kconfig.defconfig +++ b/subsys/net/openthread/Kconfig.defconfig @@ -248,4 +248,11 @@ config OPENTHREAD_NUM_MESSAGE_BUFFERS default 96 if OPENTHREAD_FTD default 64 +# File system configuration +config ZMS + default y if SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM + +config NVS + default y if !(SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM) + endif # NET_L2_OPENTHREAD diff --git a/subsys/suit/platform/Kconfig b/subsys/suit/platform/Kconfig index e56bfbeac105..ede99f3b9407 100644 --- a/subsys/suit/platform/Kconfig +++ b/subsys/suit/platform/Kconfig @@ -64,6 +64,11 @@ config MBEDTLS_ZEPHYR_ENTROPY bool default y +# Increase the default number of key slots, to keep the same volatile key IDs +config MBEDTLS_PSA_KEY_SLOT_COUNT + int + default 32 + config SUIT_DEFAULT_MBEDTLS_CONFIG bool "Use default mbedTLS configuration file" default y diff --git a/subsys/zigbee/osif/zb_nrf_crypto.c b/subsys/zigbee/osif/zb_nrf_crypto.c index c5313dd5a440..f00e14789b80 100644 --- a/subsys/zigbee/osif/zb_nrf_crypto.c +++ b/subsys/zigbee/osif/zb_nrf_crypto.c @@ -9,7 +9,7 @@ #include #if CONFIG_CRYPTO_NRF_ECB #include -#elif CONFIG_BT_CTLR +#elif CONFIG_HAS_BT_CTLR #include #elif CONFIG_ZIGBEE_USE_SOFTWARE_AES #include @@ -59,7 +59,7 @@ static void encrypt_aes(zb_uint8_t *key, zb_uint8_t *msg, zb_uint8_t *c) out: cipher_free_session(dev, &ctx); } -#elif CONFIG_BT_CTLR +#elif CONFIG_HAS_BT_CTLR static void encrypt_aes(zb_uint8_t *key, zb_uint8_t *msg, zb_uint8_t *c) { int err; diff --git a/subsys/zigbee/osif/zb_nrf_transceiver.c b/subsys/zigbee/osif/zb_nrf_transceiver.c index 5eb9b8ed189c..46681a9b732b 100644 --- a/subsys/zigbee/osif/zb_nrf_transceiver.c +++ b/subsys/zigbee/osif/zb_nrf_transceiver.c @@ -349,7 +349,7 @@ zb_bool_t zb_trans_transmit(zb_uint8_t wait_type, zb_time_t tx_at, return ZB_FALSE; } - net_pkt_set_txtime(pkt, (uint64_t)tx_at * NSEC_PER_USEC); + net_pkt_set_timestamp_ns(pkt, (uint64_t)tx_at * NSEC_PER_USEC); state_cache.radio_state = RADIO_802154_STATE_TRANSMIT; err = radio_api->tx(radio_dev, IEEE802154_TX_MODE_TXTIME, diff --git a/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_high_usage.overlay b/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_high_usage.overlay index 1ad3bda2f5b2..c53b1d72f905 100644 --- a/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_high_usage.overlay +++ b/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_high_usage.overlay @@ -5,8 +5,8 @@ */ &cpuapp_ram0x_region { - reg = <0x2f010000 0x91000>; - ranges = <0x0 0x2f010000 0x91000>; + reg = <0x2f011000 0x91000>; + ranges = <0x0 0x2f011000 0x91000>; }; &cpuapp_data { diff --git a/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_low_usage.overlay b/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_low_usage.overlay index 9b9b89f73c24..3e05d1f1c411 100644 --- a/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_low_usage.overlay +++ b/tests/benchmarks/multicore/idle/boards/nrf54h20dk_nrf54h20_cpuapp_ram_low_usage.overlay @@ -5,8 +5,8 @@ */ &cpuapp_ram0x_region { - reg = <0x2f010000 0x21000>; - ranges = <0x0 0x2f010000 0x21000>; + reg = <0x2f011000 0x21000>; + ranges = <0x0 0x2f011000 0x21000>; }; &cpuapp_data { diff --git a/tests/benchmarks/multicore/idle_spim_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay b/tests/benchmarks/multicore/idle_spim_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay index f75dec6ad33b..c987cfb5c701 100644 --- a/tests/benchmarks/multicore/idle_spim_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay +++ b/tests/benchmarks/multicore/idle_spim_loopback/boards/nrf54h20dk_nrf54h20_cpuapp_fast.overlay @@ -69,6 +69,10 @@ }; }; +&dma_fast_region { + status = "okay"; +}; + &exmif { status = "disabled"; }; diff --git a/tests/bluetooth/bsim/nrf_auraconfig/tester/prj.conf b/tests/bluetooth/bsim/nrf_auraconfig/tester/prj.conf index 09f03ef8f00a..74172ad33195 100644 --- a/tests/bluetooth/bsim/nrf_auraconfig/tester/prj.conf +++ b/tests/bluetooth/bsim/nrf_auraconfig/tester/prj.conf @@ -24,8 +24,6 @@ CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_DEVICE_NAME="Broadcast Audio Sink" -CONFIG_BT_TINYCRYPT_ECC=y - # Shell related defines CONFIG_SHELL=y CONFIG_SHELL_BACKEND_DUMMY=y diff --git a/tests/bluetooth/iso/modules/peripheral.c b/tests/bluetooth/iso/modules/peripheral.c index fe222d1854aa..7f3410d84c1e 100644 --- a/tests/bluetooth/iso/modules/peripheral.c +++ b/tests/bluetooth/iso/modules/peripheral.c @@ -13,8 +13,7 @@ LOG_MODULE_REGISTER(peripheral, CONFIG_ACL_TEST_LOG_LEVEL); #define LE_AUDIO_EXTENDED_ADV_CONN_NAME \ - BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONNECTABLE | \ - BT_LE_ADV_OPT_USE_NAME, \ + BT_LE_ADV_PARAM(BT_LE_ADV_OPT_EXT_ADV | BT_LE_ADV_OPT_CONN | BT_LE_ADV_OPT_USE_NAME, \ 0x100, 0x200, NULL) static struct k_work adv_work; diff --git a/tests/bluetooth/tester/prj.conf b/tests/bluetooth/tester/prj.conf index 3cf8a0e34913..7ce695af62d3 100644 --- a/tests/bluetooth/tester/prj.conf +++ b/tests/bluetooth/tester/prj.conf @@ -46,7 +46,6 @@ CONFIG_BT_DEVICE_NAME="Tester" CONFIG_BT_DEVICE_NAME_MAX=32 CONFIG_BT_DEVICE_NAME_DYNAMIC=y CONFIG_BT_DEVICE_NAME_GATT_WRITABLE=y -CONFIG_BT_TINYCRYPT_ECC=y CONFIG_BT_TESTING=y # Mesh Protocol Configs diff --git a/tests/drivers/nrfx_integration_test/Kconfig b/tests/drivers/nrfx_integration_test/Kconfig index a1da4098321a..26dbc3ea32d8 100644 --- a/tests/drivers/nrfx_integration_test/Kconfig +++ b/tests/drivers/nrfx_integration_test/Kconfig @@ -148,17 +148,4 @@ config NRFX_ALL_DRIVERS select NRFX_PRS_BOX_3 select NRFX_PRS_BOX_4 -config NRFX_AND_BT_LL_SOFTDEVICE - bool "Test nrfx integration with SoftDevice BLE LL" - select BT - -config NRFX_AND_BT_LL_SW_SPLIT - bool "Test nrfx integration with Zephyr BLE LL" - select BT - -choice BT_LL_CHOICE - default BT_LL_SOFTDEVICE if NRFX_AND_BT_LL_SOFTDEVICE - default BT_LL_SW_SPLIT if NRFX_AND_BT_LL_SW_SPLIT -endchoice - source "Kconfig.zephyr" diff --git a/tests/drivers/nrfx_integration_test/testcase.yaml b/tests/drivers/nrfx_integration_test/testcase.yaml index 30df0785b0aa..0ff54a829bcc 100644 --- a/tests/drivers/nrfx_integration_test/testcase.yaml +++ b/tests/drivers/nrfx_integration_test/testcase.yaml @@ -37,8 +37,6 @@ tests: - ci_build - sysbuild - ci_tests_drivers_nrfx_integration_test - extra_configs: - - CONFIG_NRFX_AND_BT_LL_SOFTDEVICE=y platform_allow: - nrf52840dk/nrf52840 - nrf5340dk/nrf5340/cpunet @@ -54,8 +52,6 @@ tests: - ci_build - sysbuild - ci_tests_drivers_nrfx_integration_test - extra_configs: - - CONFIG_NRFX_AND_BT_LL_SW_SPLIT=y extra_args: SNIPPET="bt-ll-sw-split" platform_allow: - nrf52840dk/nrf52840 diff --git a/tests/subsys/bluetooth/mesh/models/overlay-mesh-emds.conf b/tests/subsys/bluetooth/mesh/models/overlay-mesh-emds.conf index 89bac05b4347..ad13130948ff 100644 --- a/tests/subsys/bluetooth/mesh/models/overlay-mesh-emds.conf +++ b/tests/subsys/bluetooth/mesh/models/overlay-mesh-emds.conf @@ -6,6 +6,7 @@ CONFIG_BT_SETTINGS=y CONFIG_FLASH_MAP=y +CONFIG_NVS=y CONFIG_EMDS=y CONFIG_BT_MESH_PLVL_SRV=y CONFIG_BT_MESH_LIGHT_HUE_SRV=y diff --git a/tests/subsys/event_manager_proxy/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/subsys/event_manager_proxy/boards/nrf5340dk_nrf5340_cpuapp.overlay deleted file mode 100644 index ac5d195aa7e2..000000000000 --- a/tests/subsys/event_manager_proxy/boards/nrf5340dk_nrf5340_cpuapp.overlay +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ -#include - -&ipc0 { - zephyr,priority = <0 PRIO_PREEMPT>; -}; diff --git a/tests/subsys/event_manager_proxy/remote/boards/nrf5340dk_nrf5340_cpunet.overlay b/tests/subsys/event_manager_proxy/remote/boards/nrf5340dk_nrf5340_cpunet.overlay deleted file mode 100644 index ac5d195aa7e2..000000000000 --- a/tests/subsys/event_manager_proxy/remote/boards/nrf5340dk_nrf5340_cpunet.overlay +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ -#include - -&ipc0 { - zephyr,priority = <0 PRIO_PREEMPT>; -}; diff --git a/tests/subsys/net/lib/download_client/src/mock/socket.c b/tests/subsys/net/lib/download_client/src/mock/socket.c index 1583389570a7..c9b84549179a 100644 --- a/tests/subsys/net/lib/download_client/src/mock/socket.c +++ b/tests/subsys/net/lib/download_client/src/mock/socket.c @@ -48,10 +48,10 @@ static ssize_t mock_socket_offload_write(void *obj, const void *buffer, size_t c return mock_socket_offload_sendto(obj, buffer, count, 0, NULL, 0); } -static int mock_socket_offload_close(void *obj) +static int mock_socket_offload_close2(void *obj, int fd) { k_sleep(K_MSEC(50)); - return zsock_close_ctx(obj); + return zsock_close_ctx(obj, fd); } static int mock_socket_offload_ioctl(void *obj, unsigned int request, va_list args) @@ -141,7 +141,7 @@ static const struct socket_op_vtable mock_socket_fd_op_vtable = { .fd_vtable = { .read = mock_socket_offload_read, .write = mock_socket_offload_write, - .close = mock_socket_offload_close, + .close2 = mock_socket_offload_close2, .ioctl = mock_socket_offload_ioctl, }, .bind = mock_socket_offload_bind, diff --git a/tests/subsys/net/lib/downloader/CMakeLists.txt b/tests/subsys/net/lib/downloader/CMakeLists.txt index 63a742c1ee6f..2f28fa451f46 100644 --- a/tests/subsys/net/lib/downloader/CMakeLists.txt +++ b/tests/subsys/net/lib/downloader/CMakeLists.txt @@ -38,7 +38,7 @@ target_compile_options(app -DCONFIG_DOWNLOADER_MAX_FILENAME_SIZE=256 -DCONFIG_DOWNLOADER_TRANSPORT_PARAMS_SIZE=256 -DCONFIG_DOWNLOADER_STACK_SIZE=2048 - -DCONFIG_NET_SOCKETS_POSIX_NAMES=y + -DCONFIG_POSIX_API=y -DCONFIG_NET_IPV6=y -DCONFIG_NET_IPV4=y -DCONFIG_COAP_MAX_RETRANSMIT=2 diff --git a/tests/subsys/net/lib/mqtt_helper/CMakeLists.txt b/tests/subsys/net/lib/mqtt_helper/CMakeLists.txt index d0e808fd334e..c4b9515e18ad 100644 --- a/tests/subsys/net/lib/mqtt_helper/CMakeLists.txt +++ b/tests/subsys/net/lib/mqtt_helper/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories(app PRIVATE ${ZEPHYR_NRF_MODULE_DIR}/include/zephyr/n # Options that cannot be passed through Kconfig fragments. target_compile_options(app PRIVATE -DCONFIG_MQTT_LIB_TLS=1 - -DCONFIG_NET_SOCKETS_POSIX_NAMES=1 + -DCONFIG_POSIX_API=1 -DCONFIG_MQTT_HELPER_HOSTNAME="test-some-hostname.com" -DCONFIG_MQTT_HELPER_STATIC_IP_ADDRESS="" -DCONFIG_MQTT_HELPER_PORT=8883 diff --git a/tests/subsys/net/lib/nrf_cloud/cloud/CMakeLists.txt b/tests/subsys/net/lib/nrf_cloud/cloud/CMakeLists.txt index f002e99f74e5..ae7022224ad8 100644 --- a/tests/subsys/net/lib/nrf_cloud/cloud/CMakeLists.txt +++ b/tests/subsys/net/lib/nrf_cloud/cloud/CMakeLists.txt @@ -52,8 +52,8 @@ if (CONFIG_NRF_CLOUD_MQTT OR CONFIG_NRF_CLOUD_FOTA OR CONFIG_NRF_MODEM_LIB) ) # This code file has functions/structs/variables defined when - # NET_SOCKETS_POSIX_NAMES=y in zephyr/net/socket.h, so - # it needs to be excluded when NET_SOCKETS_POSIX_NAMES=n + # POSIX_API=y in zephyr/net/socket.h, so it needs to be excluded + # when POSIX_API=n set_source_files_properties( ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/downloader/src/downloader.c DIRECTORY ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/downloader/ @@ -64,7 +64,7 @@ if (CONFIG_NRF_CLOUD_MQTT OR CONFIG_NRF_CLOUD_FOTA OR CONFIG_NRF_MODEM_LIB) if (CONFIG_NRF_MODEM_LIB) - # Similarly, these files need to be excluded when NET_SOCKETS_POSIX_NAMES=n + # Similarly, these files need to be excluded when POSIX_API=n set_source_files_properties( ${ZEPHYR_NRF_MODULE_DIR}/lib/nrf_modem_lib/sanity.c ${ZEPHYR_NRF_MODULE_DIR}/lib/nrf_modem_lib/nrf9x_sockets.c diff --git a/tests/subsys/net/lib/nrf_cloud/cloud/prj.conf b/tests/subsys/net/lib/nrf_cloud/cloud/prj.conf index b04fef6cf005..ba2ca10947dd 100644 --- a/tests/subsys/net/lib/nrf_cloud/cloud/prj.conf +++ b/tests/subsys/net/lib/nrf_cloud/cloud/prj.conf @@ -10,9 +10,8 @@ CONFIG_ZTEST=y # Network CONFIG_NETWORKING=y -# Disable sockets and POSIX wrappers +# Disable sockets CONFIG_NET_SOCKETS=n -CONFIG_NET_SOCKETS_POSIX_NAMES=n # Dependencies CONFIG_NEWLIB_LIBC=y diff --git a/tests/subsys/net/lib/nrf_cloud/fota_common/prj.conf b/tests/subsys/net/lib/nrf_cloud/fota_common/prj.conf index d6788fc07fde..7c49e0802388 100644 --- a/tests/subsys/net/lib/nrf_cloud/fota_common/prj.conf +++ b/tests/subsys/net/lib/nrf_cloud/fota_common/prj.conf @@ -11,7 +11,7 @@ CONFIG_NRF_CLOUD_MQTT=y CONFIG_NETWORKING=y CONFIG_NET_SOCKETS=y -CONFIG_NET_SOCKETS_POSIX_NAMES=y +CONFIG_POSIX_API=y CONFIG_NRF_MODEM_LIB=y CONFIG_NRF_CLOUD_CONNECTION_POLL_THREAD=n CONFIG_FLASH=y diff --git a/tests/subsys/net/lib/nrf_provisioning/CMakeLists.txt b/tests/subsys/net/lib/nrf_provisioning/CMakeLists.txt index 4edb00870ed7..a49f35c36a68 100644 --- a/tests/subsys/net/lib/nrf_provisioning/CMakeLists.txt +++ b/tests/subsys/net/lib/nrf_provisioning/CMakeLists.txt @@ -42,7 +42,7 @@ elseif(CONFIG_NRF_PROVISIONING_COAP) -DCONFIG_COAP_CLIENT_MESSAGE_HEADER_SIZE=48 -DCONFIG_COAP_CLIENT_MESSAGE_SIZE=512 -DCONFIG_COAP_CLIENT_STACK_SIZE=1024 - -DCONFIG_NET_SOCKETS_POSIX_NAMES=y + -DCONFIG_POSIX_API=y -DCONFIG_MODEM_INFO_BUFFER_SIZE=128 -DCONFIG_COAP_CLIENT_MAX_REQUESTS=2 -DCONFIG_COAP_CLIENT_BLOCK_SIZE=256 diff --git a/tests/subsys/net/lib/wifi_credentials/CMakeLists.txt b/tests/subsys/net/lib/wifi_credentials/CMakeLists.txt deleted file mode 100644 index fc30294b07dd..000000000000 --- a/tests/subsys/net/lib/wifi_credentials/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.20.0) - -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(wifi_credentials_test) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) - -test_runner_generate(src/main.c) - -target_sources(app - PRIVATE - ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/wifi_credentials.c -) - -zephyr_include_directories(${ZEPHYR_NRF_MODULE_DIR}/include/net/) -zephyr_include_directories(${ZEPHYR_BASE}/subsys/testsuite/include) -zephyr_include_directories(${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/) - - -target_compile_options(app - PRIVATE - -DCONFIG_WIFI_CREDENTIALS_MAX_ENTRIES=2 - -DCONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH=128 -) diff --git a/tests/subsys/net/lib/wifi_credentials/prj.conf b/tests/subsys/net/lib/wifi_credentials/prj.conf deleted file mode 100644 index b89c37522f86..000000000000 --- a/tests/subsys/net/lib/wifi_credentials/prj.conf +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -CONFIG_UNITY=y diff --git a/tests/subsys/net/lib/wifi_credentials/src/main.c b/tests/subsys/net/lib/wifi_credentials/src/main.c deleted file mode 100644 index d1b119175a16..000000000000 --- a/tests/subsys/net/lib/wifi_credentials/src/main.c +++ /dev/null @@ -1,370 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include -#include -#include - -#include - -#include - -#include "wifi_credentials_internal.h" - -DEFINE_FFF_GLOBALS; - -FAKE_VALUE_FUNC(int, wifi_credentials_store_entry, size_t, const void *, size_t) -FAKE_VALUE_FUNC(int, wifi_credentials_load_entry, size_t, void *, size_t) -FAKE_VALUE_FUNC(int, wifi_credentials_delete_entry, size_t) -FAKE_VALUE_FUNC(int, wifi_credentials_backend_init) - -uint8_t fake_settings_buf[CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES][ENTRY_MAX_LEN]; - -int custom_wifi_credentials_store_entry(size_t idx, const void *buf, size_t buf_len) -{ - TEST_ASSERT(idx < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES); - memcpy(fake_settings_buf[idx], buf, MIN(ENTRY_MAX_LEN, buf_len)); - return 0; -} - -int custom_wifi_credentials_load_entry(size_t idx, void *buf, size_t buf_len) -{ - TEST_ASSERT(idx < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES); - memcpy(buf, fake_settings_buf[idx], MIN(ENTRY_MAX_LEN, buf_len)); - return 0; -} - -void setUp(void) -{ - RESET_FAKE(wifi_credentials_store_entry); - RESET_FAKE(wifi_credentials_load_entry); - RESET_FAKE(wifi_credentials_delete_entry); - wifi_credentials_store_entry_fake.custom_fake = - custom_wifi_credentials_store_entry; - wifi_credentials_load_entry_fake.custom_fake = - custom_wifi_credentials_load_entry; -} - -#define SSID1 "test1" -#define PSK1 "super secret" -#define SECURITY1 WIFI_SECURITY_TYPE_PSK -#define BSSID1 "abcdef" -#define FLAGS1 WIFI_CREDENTIALS_FLAG_BSSID -#define CHANNEL1 1 - -#define SSID2 "test2" -#define SECURITY2 WIFI_SECURITY_TYPE_NONE -#define FLAGS2 0 -#define CHANNEL2 2 - -#define SSID3 "test3" -#define PSK3 "extremely secret" -#define SECURITY3 WIFI_SECURITY_TYPE_SAE -#define FLAGS3 0 -#define CHANNEL3 3 - -#define SSID4 "\0what's\0null\0termination\0anyway" -#define PSK4 PSK1 -#define SECURITY4 SECURITY1 -#define BSSID4 BSSID1 -#define FLAGS4 FLAGS1 -#define CHANNEL4 4 - -void tearDown(void) -{ - wifi_credentials_delete_by_ssid(SSID1, ARRAY_SIZE(SSID1)); - wifi_credentials_delete_by_ssid(SSID2, ARRAY_SIZE(SSID2)); - wifi_credentials_delete_by_ssid(SSID3, ARRAY_SIZE(SSID3)); - wifi_credentials_delete_by_ssid(SSID4, ARRAY_SIZE(SSID4)); - wifi_credentials_delete_by_ssid("", 0); -} - -/* Verify that attempting to retrieve a non-existent credentials entry raises -ENOENT. */ -void test_get_non_existing(void) -{ - int err; - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - err = wifi_credentials_get_by_ssid_personal(SSID1, sizeof(SSID1), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(-ENOENT, err); -} - -/* Verify that we can successfully set/get a network without a specified BSSID. */ -void test_single_no_bssid(void) -{ - int err; - - /* set network credentials without BSSID */ - err = wifi_credentials_set_personal(SSID1, sizeof(SSID1), SECURITY1, NULL, 0, - PSK1, sizeof(PSK1), 0, 0, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - /* retrieve network credentials without BSSID */ - err = wifi_credentials_get_by_ssid_personal(SSID1, sizeof(SSID1), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(0, strncmp(PSK1, psk_buf, ARRAY_SIZE(psk_buf))); - TEST_ASSERT_EQUAL(0, flags); - TEST_ASSERT_EQUAL(0, channel); - TEST_ASSERT_EQUAL(SECURITY1, security); - - err = wifi_credentials_delete_by_ssid(SSID1, sizeof(SSID1)); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); -} - -/* Verify that we can successfully set/get a network with a fixed BSSID. */ -void test_single_with_bssid(void) -{ - int err; - - /* set network credentials with BSSID */ - err = wifi_credentials_set_personal(SSID1, sizeof(SSID1), SECURITY1, BSSID1, 6, - PSK1, sizeof(PSK1), FLAGS1, CHANNEL1, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - /* retrieve network credentials with BSSID */ - err = wifi_credentials_get_by_ssid_personal(SSID1, sizeof(SSID1), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(0, strncmp(PSK1, psk_buf, ARRAY_SIZE(psk_buf))); - TEST_ASSERT_EQUAL(sizeof(PSK1), psk_len); - TEST_ASSERT_EQUAL(0, strncmp(BSSID1, bssid_buf, ARRAY_SIZE(bssid_buf))); - TEST_ASSERT_EQUAL(WIFI_CREDENTIALS_FLAG_BSSID, flags); - TEST_ASSERT_EQUAL(CHANNEL1, channel); - TEST_ASSERT_EQUAL(SECURITY1, security); - - err = wifi_credentials_delete_by_ssid(SSID1, sizeof(SSID1)); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); -} - -/* Verify that we can successfully set/get an open network. */ -void test_single_without_psk(void) -{ - int err; - - /* set network credentials without PSK/BSSID */ - err = wifi_credentials_set_personal(SSID2, sizeof(SSID2), SECURITY2, NULL, 6, - NULL, 0, FLAGS2, CHANNEL2, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - /* retrieve network credentials without PSK/BSSID */ - err = wifi_credentials_get_by_ssid_personal(SSID2, sizeof(SSID2), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, - &timeout); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(0, psk_len); - TEST_ASSERT_EQUAL(0, flags); - TEST_ASSERT_EQUAL(CHANNEL2, channel); - - err = wifi_credentials_delete_by_ssid(SSID2, sizeof(SSID2)); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); -} - -/* Verify that we can set/get a network that is only identified by a BSSID. */ -void test_single_without_ssid(void) -{ - int err; - - err = wifi_credentials_set_personal("", 0, SECURITY1, BSSID1, 6, - PSK1, sizeof(PSK1), FLAGS1, CHANNEL1, 0); - TEST_ASSERT_EQUAL(-EINVAL, err); - - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - err = wifi_credentials_get_by_ssid_personal("", 0, &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(-EINVAL, err); - - err = wifi_credentials_delete_by_ssid("", 0); - TEST_ASSERT_EQUAL(-EINVAL, err); -} - -/* Verify that we can handle SSIDs that contain NULL characters. */ -void test_single_garbled_ssid(void) -{ - int err; - - err = wifi_credentials_set_personal(SSID4, sizeof(SSID4), SECURITY4, BSSID4, 6, - PSK4, sizeof(PSK4), FLAGS4, CHANNEL4, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - err = wifi_credentials_get_by_ssid_personal(SSID4, sizeof(SSID4), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(0, strncmp(PSK4, psk_buf, ARRAY_SIZE(psk_buf))); - TEST_ASSERT_EQUAL(sizeof(PSK4), psk_len); - TEST_ASSERT_EQUAL(0, strncmp(BSSID4, bssid_buf, ARRAY_SIZE(bssid_buf))); - TEST_ASSERT_EQUAL(SECURITY4, security); - TEST_ASSERT_EQUAL(FLAGS4, flags); - TEST_ASSERT_EQUAL(CHANNEL4, channel); - - err = wifi_credentials_delete_by_ssid(SSID4, sizeof(SSID4)); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); -} - -/* Helper function for test_set_storage_limit, making sure that the SSID cache is correct. */ -void verify_ssid_cache_cb(void *cb_arg, const char *ssid, size_t ssid_len) -{ - static int call_count; - static const char *const ssids[] = {SSID3, SSID2}; - - TEST_ASSERT_EQUAL(0, strncmp(ssids[call_count++], ssid, ssid_len)); - TEST_ASSERT_EQUAL_PTR(NULL, cb_arg); - -} - -/* Verify that wifi_credentials behaves correctly when the storage limit is reached. */ -void test_storage_limit(void) -{ - int err; - - /* Set two networks */ - err = wifi_credentials_set_personal(SSID1, sizeof(SSID1), SECURITY1, BSSID1, 6, - PSK1, sizeof(PSK1), FLAGS1, CHANNEL1, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - err = wifi_credentials_set_personal(SSID2, sizeof(SSID2), SECURITY2, NULL, 6, - NULL, 0, FLAGS2, CHANNEL2, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - enum wifi_security_type security = -1; - uint8_t bssid_buf[WIFI_MAC_ADDR_LEN] = ""; - char psk_buf[WIFI_CREDENTIALS_MAX_PASSWORD_LEN] = ""; - size_t psk_len = 0; - uint32_t flags = 0; - uint8_t channel = 0; - uint32_t timeout = 0; - - /* Get two networks */ - err = wifi_credentials_get_by_ssid_personal(SSID1, sizeof(SSID1), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(0, strncmp(PSK1, psk_buf, ARRAY_SIZE(psk_buf))); - TEST_ASSERT_EQUAL(sizeof(PSK1), psk_len); - TEST_ASSERT_EQUAL(0, strncmp(BSSID1, bssid_buf, ARRAY_SIZE(bssid_buf))); - TEST_ASSERT_EQUAL(SECURITY1, security); - TEST_ASSERT_EQUAL(FLAGS1, flags); - TEST_ASSERT_EQUAL(CHANNEL1, channel); - - err = wifi_credentials_get_by_ssid_personal(SSID2, sizeof(SSID2), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(SECURITY2, security); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(FLAGS2, flags); - TEST_ASSERT_EQUAL(CHANNEL2, channel); - - /* Set third network */ - err = wifi_credentials_set_personal(SSID3, sizeof(SSID3), SECURITY3, NULL, 6, - PSK3, sizeof(PSK3), FLAGS3, CHANNEL3, 0); - TEST_ASSERT_EQUAL(-ENOBUFS, err); - - /* Not enough space? Delete the first one. */ - wifi_credentials_delete_by_ssid(SSID1, ARRAY_SIZE(SSID1)); - err = wifi_credentials_set_personal(SSID3, sizeof(SSID3), SECURITY3, NULL, 6, - PSK3, sizeof(PSK3), FLAGS3, CHANNEL3, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - err = wifi_credentials_get_by_ssid_personal(SSID3, sizeof(SSID3), &security, - bssid_buf, ARRAY_SIZE(bssid_buf), - psk_buf, ARRAY_SIZE(psk_buf), &psk_len, &flags, &channel, &timeout); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - TEST_ASSERT_EQUAL(SECURITY3, security); - TEST_ASSERT_EQUAL(sizeof(PSK3), psk_len); - TEST_ASSERT_EQUAL(0, strncmp(PSK3, psk_buf, ARRAY_SIZE(psk_buf))); - TEST_ASSERT_EQUAL(FLAGS3, flags); - TEST_ASSERT_EQUAL(CHANNEL3, channel); - - wifi_credentials_for_each_ssid(verify_ssid_cache_cb, NULL); -} - -/* Verify that all entries are deleted. */ -void test_delete_all_entries(void) -{ - /* Set two networks */ - int err = wifi_credentials_set_personal(SSID1, sizeof(SSID1), SECURITY1, BSSID1, 6, - PSK1, sizeof(PSK1), FLAGS1, CHANNEL1, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - err = wifi_credentials_set_personal(SSID2, sizeof(SSID2), SECURITY2, NULL, 6, - NULL, 0, FLAGS2, CHANNEL2, 0); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - /* Delete all networks */ - err = wifi_credentials_delete_all(); - TEST_ASSERT_EQUAL(EXIT_SUCCESS, err); - - /* Verify that the storage is empty */ - TEST_ASSERT_TRUE(wifi_credentials_is_empty()); -} - -/* It is required to be added to each test. That is because unity's - * main may return nonzero, while zephyr's main currently must - * return 0 in all cases (other values are reserved). - */ -extern int unity_main(void); - -int main(void) -{ - /* use the runner from test_runner_generate() */ - (void)unity_main(); - - return 0; -} diff --git a/tests/subsys/net/lib/wifi_credentials/testcase.yaml b/tests/subsys/net/lib/wifi_credentials/testcase.yaml deleted file mode 100644 index 4b56d5e51f0d..000000000000 --- a/tests/subsys/net/lib/wifi_credentials/testcase.yaml +++ /dev/null @@ -1,9 +0,0 @@ -tests: - net.lib.wifi_credentials: - sysbuild: true - platform_allow: native_sim - integration_platforms: - - native_sim - tags: - - sysbuild - - ci_tests_subsys_net diff --git a/tests/subsys/net/lib/wifi_credentials_backend_psa/CMakeLists.txt b/tests/subsys/net/lib/wifi_credentials_backend_psa/CMakeLists.txt deleted file mode 100644 index 1958e2642a1d..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_psa/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.20.0) - -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(wifi_credentials_test) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) - -test_runner_generate(src/main.c) - -target_sources(app - PRIVATE - ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/wifi_credentials_backend_psa.c -) - -zephyr_include_directories(${ZEPHYR_NRF_MODULE_DIR}/include/net/) -zephyr_include_directories(${ZEPHYR_BASE}/subsys/testsuite/include) -zephyr_include_directories(${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/) -zephyr_include_directories(${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/interface/include/) - -target_compile_options(app - PRIVATE - -DCONFIG_WIFI_CREDENTIALS_MAX_ENTRIES=2 - -DCONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH=128 - -DCONFIG_WIFI_CREDENTIALS_LOG_LEVEL=4 - -DCONFIG_WIFI_CREDENTIALS_BACKEND_PSA_OFFSET=5 -) - -set_property( - SOURCE ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/wifi_credentials_backend_psa.c - PROPERTY COMPILE_FLAGS "-include ${CMAKE_CURRENT_SOURCE_DIR}/src/normalized_crypto.h" - PROPERTY COMPILE_FLAGS "-include ${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls_config.h" -) diff --git a/tests/subsys/net/lib/wifi_credentials_backend_psa/include/mbedtls_config.h b/tests/subsys/net/lib/wifi_credentials_backend_psa/include/mbedtls_config.h deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/tests/subsys/net/lib/wifi_credentials_backend_psa/prj.conf b/tests/subsys/net/lib/wifi_credentials_backend_psa/prj.conf deleted file mode 100644 index b89c37522f86..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_psa/prj.conf +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -CONFIG_UNITY=y diff --git a/tests/subsys/net/lib/wifi_credentials_backend_psa/src/main.c b/tests/subsys/net/lib/wifi_credentials_backend_psa/src/main.c deleted file mode 100644 index fb1c119a5a5b..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_psa/src/main.c +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include "wifi_credentials_internal.h" -#include "psa/crypto_types.h" -#include "psa/crypto_values.h" - -#define SSID1 "test1" -#define PSK1 "super secret" -#define SECURITY1 WIFI_SECURITY_TYPE_PSK -#define BSSID1 "abcdef" -#define FLAGS1 WIFI_CREDENTIALS_FLAG_BSSID - -#define SSID2 "test2" -#define PSK2 NULL -#define SECURITY2 WIFI_SECURITY_TYPE_NONE -#define BSSID2 NULL -#define FLAGS2 0 - -#define WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN (PSA_KEY_ID_USER_MIN + \ - CONFIG_WIFI_CREDENTIALS_BACKEND_PSA_OFFSET) - -DEFINE_FFF_GLOBALS; - -K_MUTEX_DEFINE(wifi_credentials_mutex); - -FAKE_VOID_FUNC(wifi_credentials_cache_ssid, size_t, const struct wifi_credentials_header *); -FAKE_VALUE_FUNC(psa_status_t, psa_export_key, mbedtls_svc_key_id_t, uint8_t *, size_t, size_t *); -FAKE_VALUE_FUNC(psa_status_t, psa_import_key, psa_key_attributes_t *, uint8_t *, size_t, - mbedtls_svc_key_id_t *); -FAKE_VALUE_FUNC(psa_status_t, psa_destroy_key, mbedtls_svc_key_id_t); -FAKE_VOID_FUNC(psa_set_key_id, psa_key_attributes_t *, uint32_t); -FAKE_VOID_FUNC(psa_set_key_usage_flags, psa_key_attributes_t *, psa_key_usage_t); -FAKE_VOID_FUNC(psa_set_key_lifetime, psa_key_attributes_t *, psa_key_lifetime_t); -FAKE_VOID_FUNC(psa_set_key_algorithm, psa_key_attributes_t *, psa_algorithm_t); -FAKE_VOID_FUNC(psa_set_key_type, psa_key_attributes_t *, psa_key_type_t); -FAKE_VOID_FUNC(psa_set_key_bits, psa_key_attributes_t *, size_t); - -static const struct wifi_credentials_personal example1 = { - .header = { - .ssid = SSID1, - .ssid_len = strlen(SSID1), - .type = SECURITY1, - .bssid = BSSID1, - .flags = FLAGS1, - }, - .password = PSK1, - .password_len = strlen(PSK1), -}; - -static const struct wifi_credentials_personal example2 = { - .header = { - .ssid = SSID2, - .ssid_len = strlen(SSID2), - .type = SECURITY2, - .flags = FLAGS2, - }, -}; - -static size_t idx; - -psa_status_t custom_psa_export_key(mbedtls_svc_key_id_t key, uint8_t *data, size_t data_size, - size_t *data_length) -{ - /* confirm that we read the requested amount of data */ - *data_length = data_size; - return PSA_SUCCESS; -} - -static void custom_psa_set_key_id(psa_key_attributes_t *attributes, mbedtls_svc_key_id_t key) -{ - TEST_ASSERT_EQUAL(key, idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN); -} - -void custom_psa_set_key_bits(psa_key_attributes_t *attributes, size_t bits) -{ - TEST_ASSERT_EQUAL(bits, sizeof(struct wifi_credentials_personal) * 8); -} - -void custom_psa_set_key_type(psa_key_attributes_t *attributes, psa_key_type_t type) -{ - TEST_ASSERT_EQUAL(type, PSA_KEY_TYPE_RAW_DATA); -} - -void custom_psa_set_key_algorithm(psa_key_attributes_t *attributes, psa_algorithm_t alg) -{ - TEST_ASSERT_EQUAL(alg, PSA_ALG_NONE); -} - -void custom_psa_set_key_lifetime(psa_key_attributes_t *attributes, psa_key_lifetime_t lifetime) -{ - TEST_ASSERT_EQUAL(lifetime, PSA_KEY_LIFETIME_PERSISTENT); -} - -void custom_psa_set_key_usage_flags(psa_key_attributes_t *attributes, psa_key_usage_t usage_flags) -{ - TEST_ASSERT_EQUAL(usage_flags, PSA_KEY_USAGE_EXPORT); -} - -void setUp(void) -{ - RESET_FAKE(wifi_credentials_cache_ssid); - RESET_FAKE(psa_export_key); - RESET_FAKE(psa_import_key); - RESET_FAKE(psa_destroy_key); - psa_export_key_fake.custom_fake = custom_psa_export_key; - psa_set_key_id_fake.custom_fake = custom_psa_set_key_id; - psa_set_key_usage_flags_fake.custom_fake = custom_psa_set_key_usage_flags; - psa_set_key_lifetime_fake.custom_fake = custom_psa_set_key_lifetime; - psa_set_key_algorithm_fake.custom_fake = custom_psa_set_key_algorithm; - psa_set_key_type_fake.custom_fake = custom_psa_set_key_type; - psa_set_key_bits_fake.custom_fake = custom_psa_set_key_bits; - idx = 0; -} - -void tearDown(void) -{ -} - -void test_init(void) -{ - int ret; - - ret = wifi_credentials_backend_init(); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES, psa_export_key_fake.call_count); - TEST_ASSERT_EQUAL(CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES, - wifi_credentials_cache_ssid_fake.call_count); -} - -void test_add(void) -{ - int ret = wifi_credentials_store_entry(idx, &example1, - sizeof(struct wifi_credentials_personal)); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL_PTR(&example1, psa_import_key_fake.arg1_val); - TEST_ASSERT_EQUAL(sizeof(struct wifi_credentials_personal), psa_import_key_fake.arg2_val); - - idx++; - - ret = wifi_credentials_store_entry(idx, &example2, - sizeof(struct wifi_credentials_personal)); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL_PTR(&example2, psa_import_key_fake.arg1_val); - TEST_ASSERT_EQUAL(sizeof(struct wifi_credentials_personal), psa_import_key_fake.arg2_val); - - TEST_ASSERT_EQUAL(2, psa_import_key_fake.call_count); - TEST_ASSERT_EQUAL(2, psa_set_key_id_fake.call_count); - TEST_ASSERT_EQUAL(2, psa_set_key_usage_flags_fake.call_count); - TEST_ASSERT_EQUAL(2, psa_set_key_lifetime_fake.call_count); - TEST_ASSERT_EQUAL(2, psa_set_key_algorithm_fake.call_count); - TEST_ASSERT_EQUAL(2, psa_set_key_type_fake.call_count); - TEST_ASSERT_EQUAL(2, psa_set_key_bits_fake.call_count); -} - -void test_get(void) -{ - int ret; - psa_key_id_t key_id = idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; - uint8_t buf[ENTRY_MAX_LEN]; - - ret = wifi_credentials_load_entry(idx, buf, ARRAY_SIZE(buf)); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(key_id, psa_export_key_fake.arg0_val); - TEST_ASSERT_EQUAL_PTR(buf, psa_export_key_fake.arg1_val); - TEST_ASSERT_EQUAL(ARRAY_SIZE(buf), psa_export_key_fake.arg2_val); - - idx++; - key_id = idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN; - - ret = wifi_credentials_load_entry(idx, buf, ARRAY_SIZE(buf)); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(key_id, psa_export_key_fake.arg0_val); - TEST_ASSERT_EQUAL_PTR(buf, psa_export_key_fake.arg1_val); - TEST_ASSERT_EQUAL(ARRAY_SIZE(buf), psa_export_key_fake.arg2_val); - - TEST_ASSERT_EQUAL(2, psa_export_key_fake.call_count); -} - -void test_delete(void) -{ - int ret; - - ret = wifi_credentials_delete_entry(idx); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN, - psa_destroy_key_fake.arg0_val); - - idx++; - - ret = wifi_credentials_delete_entry(1); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(idx + WIFI_CREDENTIALS_BACKEND_PSA_KEY_ID_USER_MIN, - psa_destroy_key_fake.arg0_val); - - TEST_ASSERT_EQUAL(2, psa_destroy_key_fake.call_count); -} - -/* It is required to be added to each test. That is because unity's - * main may return nonzero, while zephyr's main currently must - * return 0 in all cases (other values are reserved). - */ -extern int unity_main(void); - -int main(void) -{ - /* use the runner from test_runner_generate() */ - (void)unity_main(); - - return 0; -} diff --git a/tests/subsys/net/lib/wifi_credentials_backend_psa/src/normalized_crypto.h b/tests/subsys/net/lib/wifi_credentials_backend_psa/src/normalized_crypto.h deleted file mode 100644 index eee86d56a888..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_psa/src/normalized_crypto.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2024 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#ifndef PSA_CRYPTO_H -#define PSA_CRYPTO_H - -#include "zephyr/types.h" -#include "psa/crypto_types.h" -#include "psa/crypto_values.h" - -struct psa_client_key_attributes_s { - uint16_t type; - uint16_t bits; - uint32_t lifetime; - psa_key_id_t id; - uint32_t usage; - uint32_t alg; -}; - -struct psa_key_attributes_s { - struct psa_client_key_attributes_s client; -}; - -typedef struct psa_key_attributes_s psa_key_attributes_t; - - -psa_status_t psa_import_key(const psa_key_attributes_t *attributes, - const uint8_t *data, - size_t data_length, - mbedtls_svc_key_id_t *key); - -psa_status_t psa_export_key(mbedtls_svc_key_id_t key, - uint8_t *data, - size_t data_size, - size_t *data_length); - - -psa_status_t psa_destroy_key(mbedtls_svc_key_id_t key); -void psa_set_key_id(psa_key_attributes_t *attributes, mbedtls_svc_key_id_t key); -void psa_set_key_bits(psa_key_attributes_t *attributes, size_t bits); -void psa_set_key_type(psa_key_attributes_t *attributes, psa_key_type_t type); -void psa_set_key_algorithm(psa_key_attributes_t *attributes, psa_algorithm_t alg); -void psa_set_key_lifetime(psa_key_attributes_t *attributes, psa_key_lifetime_t lifetime); -psa_status_t psa_destroy_key(mbedtls_svc_key_id_t key); -void psa_set_key_usage_flags(psa_key_attributes_t *attributes, psa_key_usage_t usage_flags); - -#endif diff --git a/tests/subsys/net/lib/wifi_credentials_backend_psa/testcase.yaml b/tests/subsys/net/lib/wifi_credentials_backend_psa/testcase.yaml deleted file mode 100644 index 0e4104567a91..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_psa/testcase.yaml +++ /dev/null @@ -1,9 +0,0 @@ -tests: - net.lib.wifi_credentials_backend_psa: - sysbuild: true - platform_allow: native_sim - integration_platforms: - - native_sim - tags: - - sysbuild - - ci_tests_subsys_net diff --git a/tests/subsys/net/lib/wifi_credentials_backend_settings/CMakeLists.txt b/tests/subsys/net/lib/wifi_credentials_backend_settings/CMakeLists.txt deleted file mode 100644 index 27ccdc2cad68..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_settings/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -cmake_minimum_required(VERSION 3.20.0) - -find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) -project(wifi_credentials_test) - -FILE(GLOB app_sources src/*.c) -target_sources(app PRIVATE ${app_sources}) - -test_runner_generate(src/main.c) - -target_sources(app - PRIVATE - ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/wifi_credentials_backend_settings.c -) - -zephyr_include_directories(${ZEPHYR_NRF_MODULE_DIR}/include/net/) -zephyr_include_directories(${ZEPHYR_BASE}/subsys/testsuite/include) -zephyr_include_directories(${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/wifi_credentials/) - -target_compile_options(app - PRIVATE - -DCONFIG_WIFI_CREDENTIALS_MAX_ENTRIES=2 - -DCONFIG_WIFI_CREDENTIALS_SAE_PASSWORD_LENGTH=128 - -DCONFIG_WIFI_CREDENTIALS_LOG_LEVEL=4 -) diff --git a/tests/subsys/net/lib/wifi_credentials_backend_settings/prj.conf b/tests/subsys/net/lib/wifi_credentials_backend_settings/prj.conf deleted file mode 100644 index b89c37522f86..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_settings/prj.conf +++ /dev/null @@ -1,7 +0,0 @@ -# -# Copyright (c) 2022 Nordic Semiconductor ASA -# -# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause -# - -CONFIG_UNITY=y diff --git a/tests/subsys/net/lib/wifi_credentials_backend_settings/src/main.c b/tests/subsys/net/lib/wifi_credentials_backend_settings/src/main.c deleted file mode 100644 index 0ee60c5ebec8..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_settings/src/main.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright (c) 2022 Nordic Semiconductor ASA - * - * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause - */ - -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include "wifi_credentials_internal.h" - -#define MAX_KEY_LEN 16 - -#define SSID1 "test1" -#define PSK1 "super secret" -#define SECURITY1 WIFI_SECURITY_TYPE_PSK -#define BSSID1 "abcdef" -#define FLAGS1 WIFI_CREDENTIALS_FLAG_BSSID - -#define SSID2 "test2" -#define PSK2 NULL -#define SECURITY2 WIFI_SECURITY_TYPE_NONE -#define BSSID2 NULL -#define FLAGS2 0 - -DEFINE_FFF_GLOBALS; - -K_MUTEX_DEFINE(wifi_credentials_mutex); - -FAKE_VALUE_FUNC(int, settings_subsys_init); -FAKE_VALUE_FUNC(int, settings_save_one, const char *, const void *, size_t); -FAKE_VALUE_FUNC(int, settings_delete, const char *); -FAKE_VALUE_FUNC(int, settings_load_subtree_direct, const char *, settings_load_direct_cb, void *); -FAKE_VOID_FUNC(wifi_credentials_cache_ssid, size_t, const struct wifi_credentials_header *); - -static uint8_t fake_settings_buf[CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES][ENTRY_MAX_LEN]; -static char fake_settings_buf_keys[CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES][MAX_KEY_LEN]; -static size_t fake_settings_buf_lens[CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES]; - -typedef int (*settings_set_cb)(const char *key, size_t len, settings_read_cb read_cb, void *cb_arg); - -static const struct wifi_credentials_personal example1 = { - .header = { - .ssid = SSID1, - .ssid_len = strlen(SSID1), - .type = SECURITY1, - .bssid = BSSID1, - .flags = FLAGS1, - }, - .password = PSK1, - .password_len = strlen(PSK1), -}; - -static const struct wifi_credentials_personal example2 = { - .header = { - .ssid = SSID2, - .ssid_len = strlen(SSID2), - .type = SECURITY2, - .flags = FLAGS2, - }, -}; - -/** - * @brief load content of given settings index to given buffer - * - * @param cb_arg size_t *idx - * @param data destination - * @param len length - * @return ssize_t MIN(length, length_available) - */ -ssize_t custom_settings_read_cb(void *cb_arg, void *data, size_t len) -{ - size_t *idx = cb_arg; - - TEST_ASSERT(len <= ENTRY_MAX_LEN); - memcpy(data, fake_settings_buf[*idx], len); - return len; -} - -static int custom_settings_save_one(const char *name, const void *value, size_t val_len) -{ - TEST_ASSERT(strlen(name) < MAX_KEY_LEN); - TEST_ASSERT(val_len <= ENTRY_MAX_LEN); - - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (strlen(fake_settings_buf_keys[i]) == 0 || - strcmp(name, fake_settings_buf_keys[i]) == 0) { - strcpy(fake_settings_buf_keys[i], name); - memcpy(fake_settings_buf[i], value, val_len); - fake_settings_buf_lens[i] = val_len; - return 0; - } - } - return -ENOBUFS; -} - -static int custom_settings_delete(const char *name) -{ - TEST_ASSERT(strlen(name) < MAX_KEY_LEN); - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (strcmp(name, fake_settings_buf_keys[i]) == 0) { - memset(fake_settings_buf_keys[i], 0, MAX_KEY_LEN); - memset(fake_settings_buf[i], 0, ENTRY_MAX_LEN); - fake_settings_buf_lens[i] = 0; - return 0; - } - } - return -ENOENT; -} - -static int custom_settings_load_subtree_direct(const char *subtree, settings_load_direct_cb cb, - void *param) -{ - size_t subtree_len = strlen(subtree); - - TEST_ASSERT(subtree_len < MAX_KEY_LEN); - - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (strncmp(subtree, fake_settings_buf_keys[i], subtree_len) == 0) { - const char *key = fake_settings_buf_keys[i] + subtree_len + 1; - - cb(key, fake_settings_buf_lens[i], custom_settings_read_cb, &i, param); - } - } - return 0; -} - -static void custom_wifi_credentials_cache_ssid(size_t idx, - const struct wifi_credentials_header *buf) -{ - char name[16] = ""; - - snprintk(name, ARRAY_SIZE(name), "wifi_cred/%d", idx); - for (size_t i = 0; i < CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES; ++i) { - if (strcmp(name, fake_settings_buf_keys[i]) == 0) { - TEST_ASSERT_EQUAL(0, memcmp(buf, &fake_settings_buf[i], - sizeof(struct wifi_credentials_header))); - return; - } - } - TEST_ASSERT(false); -} - -void setUp(void) -{ - RESET_FAKE(settings_save_one); - RESET_FAKE(settings_delete); - RESET_FAKE(settings_load_subtree_direct); - RESET_FAKE(wifi_credentials_cache_ssid); - settings_save_one_fake.custom_fake = custom_settings_save_one; - settings_delete_fake.custom_fake = custom_settings_delete; - settings_load_subtree_direct_fake.custom_fake = custom_settings_load_subtree_direct; - wifi_credentials_cache_ssid_fake.custom_fake = custom_wifi_credentials_cache_ssid; - memset(fake_settings_buf_lens, 0, ARRAY_SIZE(fake_settings_buf_lens) * sizeof(size_t)); - memset(fake_settings_buf_keys, 0, CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES * MAX_KEY_LEN); - memset(fake_settings_buf, 0, CONFIG_WIFI_CREDENTIALS_MAX_ENTRIES * ENTRY_MAX_LEN); -} - -void tearDown(void) -{ -} - -void test_init(void) -{ - int ret; - - ret = wifi_credentials_store_entry(0, &example1, sizeof(struct wifi_credentials_personal)); - TEST_ASSERT_EQUAL(0, ret); - ret = wifi_credentials_store_entry(1, &example2, sizeof(struct wifi_credentials_personal)); - TEST_ASSERT_EQUAL(0, ret); - - ret = wifi_credentials_backend_init(); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(1, settings_subsys_init_fake.call_count); - TEST_ASSERT_EQUAL(2, wifi_credentials_cache_ssid_fake.call_count); - TEST_ASSERT_EQUAL(0, wifi_credentials_cache_ssid_fake.arg0_history[0]); - TEST_ASSERT_EQUAL(1, wifi_credentials_cache_ssid_fake.arg0_history[1]); -} - -void test_add(void) -{ - int ret = wifi_credentials_store_entry(0, "abc", 3); - - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(1, settings_save_one_fake.call_count); - TEST_ASSERT_EQUAL(0, strcmp("wifi_cred/0", fake_settings_buf_keys[0])); - TEST_ASSERT_EQUAL(0, strcmp("abc", fake_settings_buf[0])); - TEST_ASSERT_EQUAL(3, fake_settings_buf_lens[0]); -} - -void test_get(void) -{ - int ret; - - ret = wifi_credentials_store_entry(0, &example1, sizeof(struct wifi_credentials_personal)); - TEST_ASSERT_EQUAL(0, ret); - ret = wifi_credentials_store_entry(1, &example2, sizeof(struct wifi_credentials_personal)); - TEST_ASSERT_EQUAL(0, ret); - - char buf[ENTRY_MAX_LEN] = { 0 }; - - ret = wifi_credentials_load_entry(0, buf, ARRAY_SIZE(buf)); - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(0, memcmp(&example1, buf, ARRAY_SIZE(buf))); - ret = wifi_credentials_load_entry(1, buf, ARRAY_SIZE(buf)); - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(0, memcmp(&example2, buf, ARRAY_SIZE(buf))); -} - -void test_delete(void) -{ - int ret; - - ret = wifi_credentials_store_entry(0, "abc", 3); - TEST_ASSERT_EQUAL(0, ret); - - ret = wifi_credentials_delete_entry(0); - TEST_ASSERT_EQUAL(0, ret); - TEST_ASSERT_EQUAL(1, settings_delete_fake.call_count); -} - -/* It is required to be added to each test. That is because unity's - * main may return nonzero, while zephyr's main currently must - * return 0 in all cases (other values are reserved). - */ -extern int unity_main(void); - -int main(void) -{ - /* use the runner from test_runner_generate() */ - (void)unity_main(); - - return 0; -} diff --git a/tests/subsys/net/lib/wifi_credentials_backend_settings/testcase.yaml b/tests/subsys/net/lib/wifi_credentials_backend_settings/testcase.yaml deleted file mode 100644 index c6efa17d6bdc..000000000000 --- a/tests/subsys/net/lib/wifi_credentials_backend_settings/testcase.yaml +++ /dev/null @@ -1,9 +0,0 @@ -tests: - net.lib.wifi_credentials_backend_settings: - sysbuild: true - platform_allow: native_sim - integration_platforms: - - native_sim - tags: - - sysbuild - - ci_tests_subsys_net diff --git a/tests/subsys/suit/unit/app_specific/suit_plat_retrieve_manifest_app/src/main.c b/tests/subsys/suit/unit/app_specific/suit_plat_retrieve_manifest_app/src/main.c index 225b338f1661..77b63c9733b2 100644 --- a/tests/subsys/suit/unit/app_specific/suit_plat_retrieve_manifest_app/src/main.c +++ b/tests/subsys/suit/unit/app_specific/suit_plat_retrieve_manifest_app/src/main.c @@ -13,8 +13,8 @@ ZTEST_SUITE(suit_platform_retrieve_manifest_tests, NULL, NULL, NULL, NULL, NULL) ZTEST(suit_platform_retrieve_manifest_tests, test_retrieve_manifest_app_specific) { struct zcbor_string dummy_component_id = {0}; - uint8_t *envelope = NULL; - size_t envelope_len = 0; + const uint8_t **envelope = NULL; + size_t *envelope_len = NULL; /* Simply return SUIT_ERR_UNSUPPORTED_COMPONENT_ID unconditionally */ zassert_equal(suit_plat_retrieve_manifest_domain_specific(&dummy_component_id, diff --git a/tests/subsys/suit/unit/suit_plat_memptr_size_update/src/main.c b/tests/subsys/suit/unit/suit_plat_memptr_size_update/src/main.c index e8d0d39f1890..02f6fd115210 100644 --- a/tests/subsys/suit/unit/suit_plat_memptr_size_update/src/main.c +++ b/tests/subsys/suit/unit/suit_plat_memptr_size_update/src/main.c @@ -18,8 +18,6 @@ #define TEST_COMPONENT_SIZE_SMALLER ((size_t)128) #define TEST_COMPONENT_SIZE_BIGGER ((size_t)512) -static size_t smaller_component_size = 128, bigger_component_size = 512; - static void test_before(void *data) { /* Reset mocks */ diff --git a/west.yml b/west.yml index 14adeaa5f1f0..d5d608f306a1 100644 --- a/west.yml +++ b/west.yml @@ -69,7 +69,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 1aa2f9d42791ff37061af43aa8fa97120f9fbeb7 + revision: pull/2411/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above @@ -130,7 +130,7 @@ manifest: compare-by-default: true - name: mcuboot repo-path: sdk-mcuboot - revision: 99d4ae97314c413208746f1fb272eb4ecf85b3ea + revision: pull/393/head path: bootloader/mcuboot - name: qcbor url: https://github.com/laurencelundblade/QCBOR @@ -147,7 +147,7 @@ manifest: - name: nrfxlib repo-path: sdk-nrfxlib path: nrfxlib - revision: b5c1a8486da16af75d36a6221d677768bc9556a6 + revision: pull/1640/head - name: trusted-firmware-m repo-path: sdk-trusted-firmware-m path: modules/tee/tf-m/trusted-firmware-m @@ -191,7 +191,7 @@ manifest: # Only for internal Nordic development repo-path: dragoon.git remote: dragoon - revision: d85f37138db71ea6376260fb3ed5819faa4b97ee + revision: develop/DRGN-23817_adapt_for_upmerge_20241220 submodules: true groups: - dragoon @@ -206,12 +206,12 @@ manifest: compare-by-default: false - name: sidewalk repo-path: sdk-sidewalk - revision: f274ce8ab97d1504de4c6b372bb98d4dc41bacc5 + revision: pull/673/head groups: - sidewalk - name: find-my repo-path: sdk-find-my - revision: 75b94d3e9b8abe038d38ed9f8b233155b9b06722 + revision: pull/260/head groups: - find-my - name: azure-sdk-for-c @@ -245,7 +245,7 @@ manifest: revision: b37972cd90c122bb8f384f2509b72fad62c3aa4b path: modules/lib/suit-generator - name: suit-processor - revision: a499bcadceff8877da63a0a140c6a91ff2f87b25 + revision: a1a9ef77c6cd7c85315ac59f1cd8b66d9bd434b5 path: modules/lib/suit-processor - name: doc-internal repo-path: doc-internal