Skip to content

Commit

Permalink
samples: cellular: nrf_cloud_multi_service: Thingy91:X Wi-Fi
Browse files Browse the repository at this point in the history
Merge overlay and config info from ATv2 and 7002EK shield
to get MSS with Wi-Fi scanning to build and run.

Jira: IRIS-9637

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
  • Loading branch information
plskeggs authored and rlubos committed Sep 9, 2024
1 parent 93170fa commit ff93ae6
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ Cellular samples
* The :kconfig:option:`CONFIG_TEST_COUNTER_MULTIPLIER` Kconfig option to multiply the number of test counter messages sent, for testing purposes.
* A handler for new nRF Cloud event type ``NRF_CLOUD_EVT_RX_DATA_DISCON`` to stop sensors and location services.
* A call to the :c:func:`nrf_cloud_print_details` function and removed redundant logging.
* Board support files to enable Wi-Fi scanning for the Thingy:91 X.

* Updated:

Expand Down
10 changes: 10 additions & 0 deletions samples/cellular/nrf_cloud_multi_service/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config WIFI_NRF700X
default y if BOARD_THINGY91X_NRF9151_NS

source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
8 changes: 5 additions & 3 deletions samples/cellular/nrf_cloud_multi_service/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,10 @@ The device is identified using its UUID rather than its IMEI, since both overlay

.. _nrf_cloud_multi_service_building_wifi_scan:

Building with nRF7002 EK Wi-Fi scanning support (for nRF91 Series DK)
=====================================================================
Building with nRF7002 Wi-Fi scanning support
============================================

To build the sample with nRF7002 EK Wi-Fi scanning support, use the ``-DSHIELD=nrf7002ek``, ``-DSB_CONF_FILE=sysbuild_nrf700x-wifi-scan.conf``, and ``-DEXTRA_CONF_FILE=overlay-nrf7002ek-wifi-scan-only`` options.
To build the sample with Wi-Fi scanning support for the nRF7002 EK shield attached to an nRF91xx DK, use the ``-DSHIELD=nrf7002ek``, ``-DSB_CONF_FILE=sysbuild_nrf700x-wifi-scan.conf``, and ``-DEXTRA_CONF_FILE=overlay-nrf7002ek-wifi-scan-only`` options.

This enables the Wi-Fi location tracking method automatically.

Expand All @@ -805,6 +805,8 @@ This enables the Wi-Fi location tracking method automatically.
|board_target|

For the Thingy:91 X, which contains both an nRF9151 System-in-Package and the nRF7002 Companion IC, Wi-Fi scanning support is enabled by default.

See also :ref:`the paragraphs on the Wi-Fi location tracking method <nrf_cloud_multi_service_wifi_location_tracking>`.

Once the sample is built and flashed, proceed to :ref:`nrf_cloud_multi_service_standard_onboarding` for instructions on how to onboard your device.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Configuration file for Thingy:91 X.
# This file is merged with prj.conf in the application folder, and options
# set here will take precedence if they are present in both files.

# BME680 - Temperature and humidity sensor.
CONFIG_BME680=y

# configs for Wi-Fi
CONFIG_WIFI=y
CONFIG_WIFI_NRF700X=y
CONFIG_WIFI_NRF700X_SKIP_LOCAL_ADMIN_MAC=y
# Align this with CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT
CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT=10

# Wi-Fi location
CONFIG_LOCATION_TRACKING_WIFI=y
CONFIG_LOCATION_METHOD_WIFI=y
CONFIG_LOCATION_REQUEST_DEFAULT_METHOD_FIRST_GNSS=y
CONFIG_LOCATION_REQUEST_DEFAULT_METHOD_SECOND_WIFI=y
CONFIG_LOCATION_REQUEST_DEFAULT_METHOD_THIRD_CELLULAR=y

# Align this with CONFIG_NRF_WIFI_SCAN_MAX_BSS_CNT
CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT=10
CONFIG_LOCATION_WORKQUEUE_STACK_SIZE=8192

# Not for LTE throughput testing
CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE=4096
CONFIG_NRF_MODEM_LIB_SHMEM_RX_SIZE=4096

# Scan only using offload API
CONFIG_WPA_SUPP=n

# For nRF9160 the default is socket interface
CONFIG_NET_DEFAULT_IF_ETHERNET=y
CONFIG_MBEDTLS=n
CONFIG_NORDIC_SECURITY_BACKEND=n

# Networking
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_NATIVE=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_STATISTICS_WIFI=y
CONFIG_NET_STATISTICS_USER_API=y
CONFIG_NET_CONTEXT_SYNC_RECV=y

# We need 2 to ensure nrf9x_socket gets an IP address regardless of order of net_if array
CONFIG_NET_IF_MAX_IPV4_COUNT=2
CONFIG_NET_IF_MAX_IPV6_COUNT=2

# Memory configurations
CONFIG_NET_BUF_RX_COUNT=8
CONFIG_NET_BUF_TX_COUNT=8
CONFIG_NET_PKT_RX_COUNT=1
CONFIG_NET_PKT_TX_COUNT=1
CONFIG_NET_TX_STACK_SIZE=4096
CONFIG_NET_RX_STACK_SIZE=4096
CONFIG_NET_TC_TX_COUNT=1
CONFIG_NET_MAX_CONTEXTS=5

CONFIG_HEAP_MEM_POOL_SIZE=34000
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_NET_MGMT_EVENT_STACK_SIZE=2048

# Enable external flash
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
CONFIG_PM_OVERRIDE_EXTERNAL_DRIVER_CHECK=y
CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
/* Copyright (c) 2024 Nordic Semiconductor ASA
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <thingy91x_wifi.dtsi>

/ {
aliases {
temp-sensor = &bme680;
ext-flash = &flash_ext;
};
};

&i2c2 {
bme680: bme680@76 {
nordic_wlan0: nordic_wlan0 {
compatible = "nordic,wlan0";
status = "okay";
};

chosen {
zephyr,wifi = &nordic_wlan0;
};
};

&bme680 {
status = "okay";
};

0 comments on commit ff93ae6

Please sign in to comment.