-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples: cellular: multi_service: Support Wi-Fi connectivity
Adds overlay to use Wi-Fi conn_mgr layer instead of LTE conn_mgr layer. Also removes a couple remaining dependencies on the nrf9160 modem. IRIS-4800 Signed-off-by: Georges Oates_Larsen <georges.larsen@nordicsemi.no>
- Loading branch information
1 parent
8fde7c3
commit 9a46911
Showing
5 changed files
with
159 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
126 changes: 126 additions & 0 deletions
126
samples/cellular/nrf_cloud_multi_service/overlay_nrf7002ek_wifi_no_lte.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# | ||
# Copyright (c) 2023 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
# Note that this overlay is not compatible with nrf9160! Use something such as the nrf5340 as the | ||
# host microcontroller. | ||
|
||
## Disable Modem/LTE/nrf91-specific features | ||
CONFIG_NRF_MODEM_LIB=n | ||
CONFIG_MODEM_INFO=n | ||
CONFIG_MODEM_INFO_ADD_NETWORK=n | ||
CONFIG_AT_HOST_LIBRARY=n | ||
CONFIG_LTE_LINK_CONTROL=n | ||
|
||
## Disable offloaded sockets (we are going to switch to the native networking stack) | ||
CONFIG_NET_SOCKETS_OFFLOAD=n | ||
|
||
## Disable cloud features reliant on or specific to nrf91 modem features | ||
CONFIG_NRF_CLOUD_AGPS=n | ||
CONFIG_NRF_CLOUD_PGPS=n | ||
CONFIG_NRF_CLOUD_PGPS_REQUEST_UPON_INIT=n | ||
CONFIG_LOCATION_METHOD_GNSS=n | ||
CONFIG_LOCATION_METHOD_CELLULAR=n | ||
|
||
## Disable FOTA to conserve memory | ||
CONFIG_NRF_CLOUD_FOTA=n | ||
CONFIG_BOOTLOADER_MCUBOOT=n | ||
CONFIG_IMG_MANAGER=n | ||
CONFIG_MCUBOOT_IMG_MANAGER=n | ||
|
||
## Disable LTE-event-driven date_time updates (the date_time library will still periodically | ||
## refresh its timestamp, this setting only controls whether LTE-event-driven date_time updates | ||
## are enabled) | ||
CONFIG_DATE_TIME_AUTO_UPDATE=n | ||
|
||
## Disable LED patterns since enabling WiFi shield takes control of two LEDs | ||
CONFIG_LED_INDICATION_DISABLED=y | ||
|
||
## Disable LTE conn_mgr bindings | ||
CONFIG_LTE_CONNECTIVITY=n | ||
|
||
## These had to be disabled for LTE with conn_mgr, but there is no reason to disable them for | ||
## wifi with conn_mgr, so re-enable them. | ||
CONFIG_NET_IPV6_NBR_CACHE=y | ||
CONFIG_NET_IPV6_MLD=y | ||
CONFIG_DNS_RESOLVER=y | ||
|
||
## Enable Wi-Fi drivers, (and the native NET stack so that the location library can access them) | ||
CONFIG_WIFI=y | ||
CONFIG_WIFI_NRF700X=y | ||
|
||
## Enable Wi-Fi conn_mgr bindings | ||
CONFIG_L2_WIFI_CONNECTIVITY=y | ||
CONFIG_NET_CONNECTION_MANAGER_STACK_SIZE=4096 | ||
|
||
## Enable WIFI_MGMT_EXT and WIFI_CREDENTIALS for simplified Wi-Fi connection setup | ||
CONFIG_WIFI_CREDENTIALS=y | ||
CONFIG_WIFI_MGMT_EXT=y | ||
CONFIG_WIFI_CREDENTIALS_BACKEND_SETTINGS=y | ||
|
||
## Use compile-time client ID for nRF Cloud | ||
CONFIG_NRF_CLOUD_CLIENT_ID_SRC_COMPILE_TIME=y | ||
|
||
## Enable flash and NVS settings, required by WIFI_CREDENTIALS | ||
CONFIG_SETTINGS=y | ||
CONFIG_SETTINGS_NVS=y | ||
CONFIG_NVS=y | ||
CONFIG_FLASH=y | ||
CONFIG_FLASH_PAGE_LAYOUT=y | ||
CONFIG_FLASH_MAP=y | ||
|
||
## Enable Wi-Fi networking and native networking stack | ||
CONFIG_WPA_SUPP=y | ||
CONFIG_NET_L2_ETHERNET=y | ||
CONFIG_NET_NATIVE=y | ||
CONFIG_NRF_SECURITY=y | ||
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y | ||
CONFIG_NET_CONTEXT_SNDTIMEO=y | ||
CONFIG_NET_TCP=y | ||
CONFIG_NET_TCP_WORKQ_STACK_SIZE=2048 | ||
CONFIG_NET_DHCPV4=y | ||
|
||
## Configure native MBEDTLS to support nRF Cloud MQTT | ||
CONFIG_MQTT_LIB_TLS=y | ||
CONFIG_MBEDTLS=y | ||
CONFIG_MBEDTLS_ENABLE_HEAP=y | ||
CONFIG_MBEDTLS_RSA_C=y | ||
CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y | ||
CONFIG_MBEDTLS_HEAP_SIZE=120000 | ||
|
||
## Enable Wi-Fi location tracking | ||
CONFIG_LOCATION_TRACKING_WIFI=y | ||
CONFIG_LOCATION_METHOD_WIFI=y | ||
# Align this with CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT. | ||
# Also see comments for CONFIG_HEAP_MEM_POOL_SIZE. | ||
# We set this to 30 in this overlay (as opposed to 60 in the wifi-scan-only overlay) so that | ||
# CONFIG_HEAP_MEM_POOL_SIZE can be small enough to leave at least 24kB of unused RAM in the final | ||
# build, which is required by WPA_supp | ||
CONFIG_NRF700X_SCAN_LIMIT=30 | ||
CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT=30 | ||
|
||
## Enable shell and WIFI_CREDENTIALS shell | ||
CONFIG_SHELL=y | ||
CONFIG_WIFI_CREDENTIALS_SHELL=y | ||
# Increased stack size needed for wifi_cred auto_connect command | ||
CONFIG_SHELL_STACK_SIZE=4096 | ||
|
||
## Resource allocation tweaks needed to support Wi-Fi. | ||
CONFIG_MAIN_STACK_SIZE=2048 | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096 | ||
CONFIG_NET_MGMT_EVENT_STACK_SIZE=4096 | ||
CONFIG_NRF_CLOUD_CONNECTION_POLL_THREAD_STACK_SIZE=8192 | ||
CONFIG_APPLICATION_THREAD_STACK_SIZE=3072 | ||
CONFIG_MESSAGE_THREAD_STACK_SIZE=3072 | ||
CONFIG_DATE_TIME_THREAD_STACK_SIZE=2048 | ||
CONFIG_NET_TX_STACK_SIZE=2048 | ||
CONFIG_NET_RX_STACK_SIZE=2048 | ||
CONFIG_POSIX_MAX_FDS=16 | ||
CONFIG_NET_SOCKETS_POLL_MAX=8 | ||
# Heap allocation should be changed when CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT | ||
# and CONFIG_NRF700X_SCAN_LIMIT (which should be the same value) are changed. With the limit at 30, | ||
# this could be set as low as 130000. Add 256 bytes for each additional scanning result, assuming | ||
# sane SSID lengths. We set the heap much higher in case of long SSIDs. | ||
CONFIG_HEAP_MEM_POOL_SIZE=130000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters