Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples: mss: Fix Wi-Fi connectivity #17951

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CONFIG_NET_SOCKETS_OFFLOAD_PRIORITY=40
CONFIG_COAP_CLIENT_BLOCK_SIZE=1024
CONFIG_COAP_CLIENT_STACK_SIZE=2048
CONFIG_COAP_CLIENT_THREAD_PRIORITY=0
CONFIG_COAP_CLIENT_MAX_INSTANCES=3
# The extended options length must be increased to perform FOTA and P-GPS downloads over CoAP.
CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=192

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CONFIG_TFM_PARTITION_PROTECTED_STORAGE=y
## Configure TFM Profile. The NOT_SET profile will enable all features.
## We then reduce some settings to save flash and RAM.
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y
CONFIG_TFM_CRYPTO_CONC_OPER_NUM=1
CONFIG_TFM_CRYPTO_CONC_OPER_NUM=4
CONFIG_TFM_CRYPTO_ASYM_SIGN_MODULE_ENABLED=n

## Configure TFM partitions
Expand All @@ -62,7 +62,7 @@ CONFIG_WIFI_CREDENTIALS_SHELL=y
CONFIG_TLS_CREDENTIALS_SHELL=y
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y
# Increased stack size needed for wifi_cred auto_connect command
CONFIG_SHELL_STACK_SIZE=4500
CONFIG_SHELL_STACK_SIZE=4850
# nRFCloud credentials can exceed 1024 bytes
CONFIG_TLS_CREDENTIALS_SHELL_CRED_BUF_SIZE=3072
# Needed by the TLS credentials shell
Expand Down Expand Up @@ -103,7 +103,7 @@ CONFIG_WIFI_NRF70_SKIP_LOCAL_ADMIN_MAC=y

## Enable Wi-Fi conn_mgr bindings
CONFIG_L2_WIFI_CONNECTIVITY=y
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=4096
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
Expand Down Expand Up @@ -160,13 +160,13 @@ CONFIG_LOCATION_METHOD_WIFI=y
CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT=10
CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT=10
# Add 256 bytes for each additional scanning result, assuming sane SSID lengths
CONFIG_HEAP_MEM_POOL_SIZE=138000
CONFIG_HEAP_MEM_POOL_SIZE=153000
CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y

## Miscellaneous resource allocation tweaks needed to support Wi-Fi.
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=20
CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=30
CONFIG_APPLICATION_THREAD_STACK_SIZE=3072
CONFIG_MESSAGE_THREAD_STACK_SIZE=3072
CONFIG_CONNECTION_THREAD_STACK_SIZE=4500
Expand All @@ -175,6 +175,7 @@ CONFIG_NET_TX_STACK_SIZE=2048
CONFIG_NET_RX_STACK_SIZE=2048
CONFIG_ZVFS_OPEN_MAX=16
CONFIG_NET_SOCKETS_POLL_MAX=8
CONFIG_NET_MGMT_EVENT_STACK_SIZE=3700

# nRF Cloud: CoAP
CONFIG_NRF_CLOUD_MQTT=n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ CONFIG_TFM_PARTITION_PROTECTED_STORAGE=y
## Configure TFM Profile. The NOT_SET profile will enable all features.
## We then reduce some settings to save flash and RAM.
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y
CONFIG_TFM_CRYPTO_CONC_OPER_NUM=1
CONFIG_TFM_CRYPTO_CONC_OPER_NUM=4
CONFIG_TFM_CRYPTO_ASYM_SIGN_MODULE_ENABLED=n

## Configure TFM partitions
Expand All @@ -61,7 +61,7 @@ CONFIG_WIFI_CREDENTIALS_SHELL=y
CONFIG_TLS_CREDENTIALS_SHELL=y
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y
# Increased stack size needed for wifi_cred auto_connect command
CONFIG_SHELL_STACK_SIZE=4500
CONFIG_SHELL_STACK_SIZE=4850
# nRFCloud credentials can exceed 1024 bytes
CONFIG_TLS_CREDENTIALS_SHELL_CRED_BUF_SIZE=2048
# Needed by the TLS credentials shell
Expand Down Expand Up @@ -102,7 +102,7 @@ CONFIG_WIFI_NRF70_SKIP_LOCAL_ADMIN_MAC=y

## Enable Wi-Fi conn_mgr bindings
CONFIG_L2_WIFI_CONNECTIVITY=y
CONFIG_NET_CONNECTION_MANAGER_MONITOR_STACK_SIZE=4096
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
Expand Down Expand Up @@ -158,7 +158,7 @@ CONFIG_LOCATION_METHOD_WIFI=y
CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT=10
CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT=10
# Add 256 bytes for each additional scanning result, assuming sane SSID lengths
CONFIG_HEAP_MEM_POOL_SIZE=136000
CONFIG_HEAP_MEM_POOL_SIZE=153000
CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y

## Miscellaneous resource allocation tweaks needed to support Wi-Fi.
Expand All @@ -173,3 +173,5 @@ CONFIG_NET_TX_STACK_SIZE=2048
CONFIG_NET_RX_STACK_SIZE=2048
CONFIG_ZVFS_OPEN_MAX=16
CONFIG_NET_SOCKETS_POLL_MAX=8
CONFIG_NET_MGMT_EVENT_QUEUE_SIZE=30
CONFIG_NET_MGMT_EVENT_STACK_SIZE=3700
4 changes: 4 additions & 0 deletions samples/net/mqtt/overlay-tls-nrf70.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ CONFIG_NET_SOCKETS_SOCKOPT_TLS=y

# TLS credentials
CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y

# Temporarily disable Wi-Fi conn_mgr integration;
# Memory allocations required for it will be adjusted in a later commit
CONFIG_L2_WIFI_CONNECTIVITY=n
1 change: 1 addition & 0 deletions subsys/net/l2_wifi_if_conn/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
menuconfig L2_WIFI_CONNECTIVITY
bool "L2 Wi-Fi Connectivity"
depends on NET_CONNECTION_MANAGER
select NET_CONNECTION_MANAGER_CONNECTIVITY_WIFI_MGMT

if L2_WIFI_CONNECTIVITY

Expand Down
2 changes: 1 addition & 1 deletion subsys/net/l2_wifi_if_conn/l2_wifi_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ static struct conn_mgr_conn_api l2_wifi_conn_api = {
.init = net_l2_wifi_init,
};

CONN_MGR_CONN_DEFINE(L2_CONN_WLAN0, &l2_wifi_conn_api);
CONN_MGR_CONN_DEFINE(CONNECTIVITY_WIFI_MGMT, &l2_wifi_conn_api);
5 changes: 2 additions & 3 deletions subsys/net/lib/nrf_cloud/src/nrf_cloud_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,10 @@ int nrf_cloud_print_details(void)
LOG_INF("Protocol: %s", protocol);
LOG_INF("Download protocol: %s", download_protocol);
LOG_INF("Sec tag: %d", nrf_cloud_sec_tag_get());
LOG_INF("Host name: %s", host_name);

#if defined(CONFIG_NRF_CLOUD_COAP)
LOG_INF("-CoAP JWT: %d", nrf_cloud_sec_tag_coap_jwt_get());
LOG_INF("CoAP JWT Sec tag: %d", nrf_cloud_sec_tag_coap_jwt_get());
#endif
LOG_INF("Host name: %s", host_name);

#endif /* CONFIG_NRF_CLOUD_VERBOSE_DETAILS */

Expand Down
Loading