Skip to content

Commit 176063d

Browse files
trantanenrlubos
authored andcommitted
samples: cellular: location: Enable Wi-Fi by default for Thingy91x
Initially location sample had Wi-Fi disabled by default for Thingy91x. Reverting that decision and aligning with some other apps/samples. Jira: NCSDK-30108 Signed-off-by: Tommi Rantanen <[email protected]>
1 parent ffdcecf commit 176063d

File tree

6 files changed

+90
-24
lines changed

6 files changed

+90
-24
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,13 @@ Bluetooth Mesh samples
247247
Cellular samples
248248
----------------
249249

250-
|no_changes_yet_note|
250+
* :ref:`location_sample` sample:
251+
252+
* Updated:
253+
254+
* The Thingy:91 X build to support Wi-Fi by default without overlays.
255+
256+
251257
Cryptography samples
252258
--------------------
253259

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config WIFI_NRF70
8+
default y if BOARD_THINGY91X_NRF9151_NS
9+
10+
choice WIFI_NRF70_OPER_MODES
11+
default WIFI_NRF70_SCAN_ONLY if BOARD_THINGY91X_NRF9151_NS
12+
endchoice
13+
14+
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"

samples/cellular/location/README.rst

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ The configuration files are in the |sample path| directory.
5454
The following files are available:
5555

5656
* :file:`overlay-nrf700x-wifi-scan-only.conf` - Config overlay for nRF7002 Wi-Fi chip support.
57-
* :file:`thingy91x-wifi.overlay` - DTC overlay for Thingy:91 X Wi-Fi support.
5857
* :file:`overlay-pgps.conf` - Config overlay for P-GPS support.
5958

6059
.. include:: /libraries/modem/nrf_modem_lib/nrf_modem_lib_trace.rst
@@ -83,17 +82,9 @@ For example:
8382

8483
See :ref:`cmake_options` for more instructions on how to add these options.
8584

86-
Thingy:91 X Wi-Fi support
87-
=========================
88-
89-
To build the Location sample with Thingy:91 X Wi-Fi support, use the ``-DDTC_OVERLAY_FILE=thingy91x_wifi.overlay``, ``-DEXTRA_CONF_FILE=overlay-nrf700x-wifi-scan-only.conf``, ``-DSB_CONFIG_WIFI_NRF70=y``, and ``-DSB_CONFIG_WIFI_NRF70_SCAN_ONLY=y`` options.
90-
For example:
91-
92-
.. code-block:: console
93-
94-
west build -p -b thingy91x/nrf9151/ns -- -DDTC_OVERLAY_FILE=thingy91x_wifi.overlay -DEXTRA_CONF_FILE=overlay-nrf700x-wifi-scan-only.conf -DSB_CONFIG_WIFI_NRF70=y -DSB_CONFIG_WIFI_NRF70_SCAN_ONLY=y
95-
96-
See :ref:`cmake_options` for more instructions on how to add these options.
85+
.. note::
86+
The Thingy:91 X build supports Wi-Fi by default.
87+
You do not need to add any overlays.
9788

9889
P-GPS support
9990
=============
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#
2+
# Copyright (c) 2024 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
# Configuration file for Thingy:91 X mainly enabling Wi-Fi.
8+
# This file is merged with prj.conf in the application folder, and options
9+
# set here will take precedence if they are present in both files.
10+
11+
CONFIG_LOCATION_METHOD_WIFI=y
12+
CONFIG_LOCATION_SERVICE_NRF_CLOUD=y
13+
14+
# Align this with CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT.
15+
# Also see comments for CONFIG_HEAP_MEM_POOL_SIZE.
16+
CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT=60
17+
CONFIG_LOCATION_WORKQUEUE_STACK_SIZE=8192
18+
19+
# Actual configs for the Wi-Fi
20+
CONFIG_WIFI=y
21+
CONFIG_WIFI_NRF70=y
22+
CONFIG_WIFI_NRF70_SKIP_LOCAL_ADMIN_MAC=y
23+
# Align this with CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT.
24+
# Also see comments for CONFIG_HEAP_MEM_POOL_SIZE.
25+
CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT=60
26+
27+
# System settings
28+
CONFIG_NEWLIB_LIBC=y
29+
30+
# Scan only using offload API
31+
CONFIG_WIFI_NM_WPA_SUPPLICANT=n
32+
33+
# For nRF9160 the default is socket interface
34+
CONFIG_NET_DEFAULT_IF_ETHERNET=y
35+
CONFIG_MBEDTLS=n
36+
CONFIG_NORDIC_SECURITY_BACKEND=n
37+
38+
# Networking
39+
CONFIG_NET_L2_ETHERNET=y
40+
CONFIG_NET_NATIVE=y
41+
CONFIG_NET_IPV4=y
42+
CONFIG_NET_DHCPV4=y
43+
CONFIG_NET_STATISTICS=y
44+
CONFIG_NET_STATISTICS_WIFI=y
45+
CONFIG_NET_STATISTICS_USER_API=y
46+
CONFIG_NET_CONTEXT_SYNC_RECV=y
47+
48+
# Disable unused networking options
49+
CONFIG_NET_IPV6=n
50+
51+
# Memory configurations
52+
CONFIG_NET_BUF_RX_COUNT=8
53+
CONFIG_NET_BUF_TX_COUNT=8
54+
CONFIG_NET_PKT_RX_COUNT=1
55+
CONFIG_NET_PKT_TX_COUNT=1
56+
CONFIG_NET_TX_STACK_SIZE=4096
57+
CONFIG_NET_RX_STACK_SIZE=4096
58+
CONFIG_NET_TC_TX_COUNT=1
59+
CONFIG_NET_MAX_CONTEXTS=5
60+
CONFIG_NET_MGMT_EVENT_STACK_SIZE=2048
61+
62+
# Wi-Fi shell sample has 25000 heap size. We need a bit more for location request purposes.
63+
# Heap allocation should be changed when CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT
64+
# and CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT (which should be the same value) are changed.
65+
CONFIG_HEAP_MEM_POOL_SIZE=40000
66+
CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y

samples/cellular/location/sample.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,6 @@ tests:
5959
CONFIG_WIFI_NM_WPA_SUPPLICANT=n SB_CONFIG_WIFI_NRF70=y
6060
SB_CONFIG_WIFI_NRF70_SCAN_ONLY=y
6161
tags: ci_build sysbuild ci_samples_cellular
62-
sample.cellular.location.thingy91x_wifi:
63-
sysbuild: true
64-
build_only: true
65-
integration_platforms:
66-
- thingy91x/nrf9151/ns
67-
platform_allow:
68-
- thingy91x/nrf9151/ns
69-
extra_args: EXTRA_CONF_FILE=overlay-nrf700x-wifi-scan-only.conf
70-
EXTRA_DTC_OVERLAY_FILE=thingy91x_wifi.overlay
71-
SB_CONFIG_WIFI_NRF70=y SB_CONFIG_WIFI_NRF70_SCAN_ONLY=y
72-
tags: ci_build sysbuild ci_samples_cellular
7362

7463
# Configuration which will be used by the CI positioning integration job to verify PRs
7564
sample.cellular.location.integration_config_positioning:

0 commit comments

Comments
 (0)