<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115772/mqtt-over-wifi-lesson-4-exercise-1-not-able-to-build-with-nrf7002dk_nrf5340_cpuapp</link><description>Hi, 
 I am unable to build the MQTT over Wi-Fi lesson 4, exercise 1 using the nrf7002dk_nrf5340_cpuapp board configuration, but the same code builds successfully with nrf7002dk_nrf5340_cpuapp_ns . 
 How can I build it with nrf7002dk_nrf5340_cpuapp ? </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 29 Oct 2024 14:13:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115772/mqtt-over-wifi-lesson-4-exercise-1-not-able-to-build-with-nrf7002dk_nrf5340_cpuapp" /><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/508378?ContentTypeID=1</link><pubDate>Tue, 29 Oct 2024 14:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:825dd837-752a-48ea-aee4-d8ce8e4dcdcf</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When storing the network credentials using &lt;code&gt;wifi_credentials_set_personal_struct()&lt;/code&gt;, you need to use &lt;code&gt;NET_REQUEST_WIFI_CONNECT_STORED&lt;/code&gt; when connecting to the network, and not &lt;code&gt;NET_REQUEST_WIFI_CONNECT&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;net_mgmt(NET_REQUEST_WIFI_CONNECT_STORED, iface, NULL, 0);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Other than that, the code should work. Please try testing it after changing to &lt;code&gt;NET_REQUEST_WIFI_CONNECT_STORED&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/508173?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 13:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5ff62c9-54bc-4114-aba9-9934748aac72</guid><dc:creator>ChiragBhavsar</dc:creator><description>&lt;p&gt;I merge the WIFI and TCP/IP code so can you please check this once and please give your valuable feedback.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/*
 * Copyright (c) 2023 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include &amp;lt;errno.h&amp;gt;
#include &amp;lt;stddef.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;zephyr/kernel.h&amp;gt;
#include &amp;lt;zephyr/types.h&amp;gt;
#include &amp;lt;zephyr/logging/log.h&amp;gt;

#include &amp;lt;dk_buttons_and_leds.h&amp;gt;

/* STEP 3 - Include the necessary header files */
#include &amp;lt;zephyr/net/wifi.h&amp;gt;
#include &amp;lt;zephyr/net/wifi_mgmt.h&amp;gt;
#include &amp;lt;zephyr/net/net_mgmt.h&amp;gt;
#include &amp;lt;net/wifi_mgmt_ext.h&amp;gt;

/* STEP 12.4 - Include the header file for the Wi-FI credentials library */
#include &amp;lt;net/wifi_credentials.h&amp;gt;
#include &amp;lt;zephyr/net/socket.h&amp;gt;

#include &amp;lt;zephyr/net/net_if.h&amp;gt;

#define SERVER_IP_ADDR &amp;quot;192.168.1.10&amp;quot; // Replace with your server&amp;#39;s IP
#define SERVER_PORT 8080

LOG_MODULE_REGISTER(Lesson2_Exercise2, LOG_LEVEL_INF);

/* STEP 4 - Define a macro for the relevant network events */
#define EVENT_MASK (NET_EVENT_L4_CONNECTED | NET_EVENT_L4_DISCONNECTED)

/* STEP 5 - Declare the callback structure for Wi-Fi events */
static struct net_mgmt_event_callback mgmt_cb;

/* STEP 6.1 - Define the boolean connected and the semaphore run_app */
static bool connected;
static K_SEM_DEFINE(run_app, 0, 1);

/* STEP 6.2 - Define the callback function for network events */
static void net_mgmt_event_handler(struct net_mgmt_event_callback *cb,
			  uint32_t mgmt_event, struct net_if *iface)
{
	if ((mgmt_event &amp;amp; EVENT_MASK) != mgmt_event) {
		return;
	}
	if (mgmt_event == NET_EVENT_L4_CONNECTED) {
		LOG_INF(&amp;quot;Network connected&amp;quot;);
		connected = true;
		dk_set_led_on(DK_LED1);
		k_sem_give(&amp;amp;run_app);
		return;
	}
	if (mgmt_event == NET_EVENT_L4_DISCONNECTED) {
		if (connected == false) {
			LOG_INF(&amp;quot;Waiting for network to be connected&amp;quot;);
		} else {
			dk_set_led_off(DK_LED1);
			LOG_INF(&amp;quot;Network disconnected&amp;quot;);
			connected = false;
		}
		k_sem_reset(&amp;amp;run_app);
		return;
	}
}

/* STEP 7 - Define the function to populate the Wi-Fi credential parameters */
//static int wifi_args_to_params(struct wifi_connect_req_params *params)
//{

	/* STEP 7.1 Populate the SSID and password */
	//params-&amp;gt;ssid = CONFIG_WIFI_CREDENTIALS_STATIC_SSID;
	//params-&amp;gt;ssid_length = strlen(params-&amp;gt;ssid);

	//params-&amp;gt;psk = CONFIG_WIFI_CREDENTIALS_STATIC_PASSWORD;
	//params-&amp;gt;psk_length = strlen(params-&amp;gt;psk);

	/* STEP 7.2 - Populate the rest of the relevant members */
	//params-&amp;gt;channel = WIFI_CHANNEL_ANY;
	//params-&amp;gt;security = WIFI_SECURITY_TYPE_PSK;
	//params-&amp;gt;mfp = WIFI_MFP_OPTIONAL;
	//params-&amp;gt;timeout = SYS_FOREVER_MS;
	//params-&amp;gt;band = WIFI_FREQ_BAND_UNKNOWN;
	//#if NCS_VERSION_NUMBER &amp;gt; 0x20600
	//memset(params-&amp;gt;bssid, 0, sizeof(params-&amp;gt;bssid));
	//#endif
	//return 0;
//}

static struct wifi_credentials_personal wifi_cred;
void set_wifi_credentials_struct() 
{

	char *wifi_ssid = &amp;quot;Myssid&amp;quot;;
	char *wifi_password = &amp;quot;Mypassword&amp;quot;;

	wifi_cred.header.type = WIFI_SECURITY_TYPE_PSK;
	memset(wifi_cred.header.bssid, 0, sizeof(wifi_cred.header.bssid));
	wifi_cred.header.flags = 0;
	//wifi_cred.header.channel = WIFI_CHANNEL_ANY;
	//wifi_cred.header.timeout = 10;

	wifi_cred.header.ssid_len = strlen(wifi_ssid);
	memcpy(wifi_cred.header.ssid, wifi_ssid, wifi_cred.header.ssid_len);
	
	wifi_cred.password_len = strlen(wifi_password);
	memcpy(wifi_cred.password, wifi_password, wifi_cred.password_len);

	int ret = wifi_credentials_set_personal_struct(&amp;amp;wifi_cred);

	if (ret != 0) {
		LOG_ERR(&amp;quot;Failed to set credentials, err: %d&amp;quot;, ret);
	}
}

int main(void)
{
	/* STEP 8.1 - Declare the variable for the network configuration parameters */
	//struct wifi_connect_req_params cnx_params;



	/* STEP 8.2 - Get the network interface */
	struct net_if *iface = net_if_get_first_wifi();
	if (iface == NULL) {
		LOG_ERR(&amp;quot;Returned network interface is NULL&amp;quot;);
		return -1;
	}

	if (dk_leds_init() != 0) {
		LOG_ERR(&amp;quot;Failed to initialize the LED library&amp;quot;);
	}

	/* Sleep to allow initialization of Wi-Fi driver */
	k_sleep(K_SECONDS(1));

	/* STEP 9 - Initialize and add the callback function for network events */
	net_mgmt_init_event_callback(&amp;amp;mgmt_cb, net_mgmt_event_handler, EVENT_MASK);
	net_mgmt_add_event_callback(&amp;amp;mgmt_cb);

	/* STEP 10 - Populate cnx_params with the network configuration */
	//wifi_args_to_params(&amp;amp;cnx_params);

    set_wifi_credentials_struct();
	/* STEP 11 - Call net_mgmt() to request the Wi-Fi connection */
	LOG_INF(&amp;quot;Connecting to Wi-Fi&amp;quot;);
	int err = net_mgmt(NET_REQUEST_WIFI_CONNECT, iface, &amp;amp;wifi_cred, sizeof(struct wifi_credentials_personal));
	if (err) {
		LOG_ERR(&amp;quot;Connecting to Wi-Fi failed, err: %d&amp;quot;, err);
		return ENOEXEC;
	}

	k_sem_take(&amp;amp;run_app, K_FOREVER);

	int sock;
    struct sockaddr_in server_addr;
	char buffer[128];

	// Create a TCP socket
	sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
	if (sock &amp;lt; 0) {
	printk(&amp;quot;Socket creation failed\n&amp;quot;);
	return;
	}

	// Configure server address
	server_addr.sin_family = AF_INET;
	server_addr.sin_port = htons(SERVER_PORT);
	inet_pton(AF_INET, SERVER_IP_ADDR, &amp;amp;server_addr.sin_addr);

	// Connect to the server
	if (connect(sock, (struct sockaddr *)&amp;amp;server_addr, sizeof(server_addr)) &amp;lt; 0) {
	printk(&amp;quot;Connection failed\n&amp;quot;);
	close(sock);
	return;
	}

	// Send data
	const char *msg = &amp;quot;Hello, Server!&amp;quot;;
	send(sock, msg, strlen(msg), 0);

	// Receive data
	recv(sock, buffer, sizeof(buffer), 0);
	printk(&amp;quot;Received: %s\n&amp;quot;, buffer);

	// Close the socket
	close(sock);

		return 0;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/508109?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 10:10:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba1f6730-8bc3-4a55-93e8-11a3b68c2a90</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="ChiragBhavsar"]The following two parameters are not available in &lt;code&gt;wifi_credentials_personal&lt;/code&gt;. Could this cause any issues?[/quote]
&lt;p&gt;No, this should not cause any issues. My code was based on v2.7.1, where these parameters are included, but in v2.6.1, you do not need them.&lt;/p&gt;
[quote user="ChiragBhavsar"]Also, I added the security configuration below. Could this cause any issues?[/quote]
&lt;p&gt;The security type is a variable of type wifi_security_type, so you need to use one of the elements in that enum.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/** @brief IEEE 802.11 security types. */
enum wifi_security_type {
	/** No security. */
	WIFI_SECURITY_TYPE_NONE = 0,
	/** WPA2-PSK security. */
	WIFI_SECURITY_TYPE_PSK,
	/** WPA2-PSK-SHA256 security. */
	WIFI_SECURITY_TYPE_PSK_SHA256,
	/** WPA3-SAE security. */
	WIFI_SECURITY_TYPE_SAE,
	/** GB 15629.11-2003 WAPI security. */
	WIFI_SECURITY_TYPE_WAPI,
	/** EAP security - Enterprise. */
	WIFI_SECURITY_TYPE_EAP,
	/** WEP security. */
	WIFI_SECURITY_TYPE_WEP,
	/** WPA-PSK security. */
	WIFI_SECURITY_TYPE_WPA_PSK,
	/** WPA/WPA2/WPA3 PSK security. */
	WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL,

/** @cond INTERNAL_HIDDEN */
	__WIFI_SECURITY_TYPE_AFTER_LAST,
	WIFI_SECURITY_TYPE_MAX = __WIFI_SECURITY_TYPE_AFTER_LAST - 1,
	WIFI_SECURITY_TYPE_UNKNOWN
/** @endcond */
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;For WPA2-PSK (CONFIG_STA_KEY_MGMT_WPA2), the correct value is WIFI_SECURITY_TYPE_PSK.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/508057?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 06:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d79bb3f-1120-41f2-80b7-e1d84e6be383</guid><dc:creator>ChiragBhavsar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;The following two parameters are not available in &lt;code&gt;wifi_credentials_personal&lt;/code&gt;. Could this cause any issues?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;wifi_cred.header.channel = WIFI_CHANNEL_ANY;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;wifi_cred.header.timeout = 10;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;Also, I added the security configuration below. Could this cause any issues?&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;wifi_cred&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;header&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;CONFIG_STA_KEY_MGMT_WPA2&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/507944?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 13:01:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:415e06d4-18e2-42b2-a356-9703bd7cf1e8</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can set it in runtime using wifi_credentials_set_personal or wifi_credentials_set_personal_struct(), for example like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static struct wifi_credentials_personal wifi_cred;

void set_wifi_credentials_struct() 
{

	char *wifi_ssid = &amp;quot;Myssid&amp;quot;;
	char *wifi_password = &amp;quot;Mypassword&amp;quot;;

	wifi_cred.header.type = WIFI_SECURITY_TYPE_PSK;
	memset(wifi_cred.header.bssid, 0, sizeof(wifi_cred.header.bssid));
	wifi_cred.header.flags = 0;
	wifi_cred.header.channel = WIFI_CHANNEL_ANY;
	wifi_cred.header.timeout = 10;

	wifi_cred.header.ssid_len = strlen(wifi_ssid);
	memcpy(wifi_cred.header.ssid, wifi_ssid, wifi_cred.header.ssid_len);
	
	wifi_cred.password_len = strlen(wifi_password);
	memcpy(wifi_cred.password, wifi_password, wifi_cred.password_len);

	int ret = wifi_credentials_set_personal_struct(&amp;amp;wifi_cred);

	if (ret != 0) {
		LOG_ERR(&amp;quot;Failed to set credentials, err: %d&amp;quot;, ret);
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/507704?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 10:09:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ff65b3d-71c8-4005-8837-a70b257423d5</guid><dc:creator>ChiragBhavsar</dc:creator><description>&lt;p&gt;I&amp;nbsp;use a static Wi-Fi SSID and password for the initial connection.&lt;/p&gt;
&lt;p&gt;After establishing the MQTT connection, the wifi custom mobile app provides a new SSID and password on mqtt. How can I change the SSID and password at runtime?&lt;/p&gt;
&lt;p&gt;Is the method below correct?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; _CusSsid&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;xxxxx&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;uint8_t&lt;/span&gt;&lt;span&gt; _CusPasswod&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;quot;xxxxx&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;cnx_params&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;ssid&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;_CusS&lt;/span&gt;&lt;span&gt;sid&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;cnx_params&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;ssid_length&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;strlen&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;cnx_params&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;ssid&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;cnx_params&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;psk&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;_CusP&lt;/span&gt;&lt;span&gt;asswod&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;cnx_params&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;psk_length&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;strlen&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;cnx_params&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;psk&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt over wifi lesson 4 exercise 1 not able to build with nrf7002dk_nrf5340_cpuapp</title><link>https://devzone.nordicsemi.com/thread/507611?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2024 13:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb89c96e-4ab8-4f93-b193-869aa6bbe064</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The lesson only supports building with TF-M, that is, building for the _ns board variant.&lt;/p&gt;
&lt;p&gt;To get it to work without TF-M, you can add support for storing the network credentials in settings storage and use the &lt;code&gt;wifi connect&lt;/code&gt; shell command to connect to the network instead.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# For storing Wi-Fi credentials
CONFIG_WIFI_CREDENTIALS_BACKEND_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
CONFIG_SETTINGS_NVS=y
# Enable Wi-Fi shell
CONFIG_NET_L2_WIFI_SHELL=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After the device has started up and you see the &amp;quot;Waiting to connect to Wi-Fi&amp;quot; log, use the following command to connect to the network:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;wifi connect -s &lt;em&gt;&amp;lt;ssid&amp;gt;&lt;/em&gt; -k 1 -p &lt;em&gt;&amp;lt;password&amp;gt;&lt;/em&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Make sure to replace &amp;lt;ssid&amp;gt; and &amp;lt;password&amp;gt; with the SSID and password of the network you want to connect to.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>