<?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>How to connect to WiFi enterprise starting from the STA sample?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125923/how-to-connect-to-wifi-enterprise-starting-from-the-sta-sample</link><description>Dear All, I am looking to connect to WiFi enterprise AP. So far I have been able to connect to the network using the nrf/samples/wifi/shell using a command that looks like this: wifi connect -s &amp;lt;SSID&amp;gt; -k 14 --eap-id1 &amp;lt;ID&amp;gt; --eap-pwd1 &amp;lt;PSWD&amp;gt;. 
 EDIT: I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Dec 2025 14:34:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125923/how-to-connect-to-wifi-enterprise-starting-from-the-sta-sample" /><item><title>RE: How to connect to WiFi enterprise starting from the STA sample?</title><link>https://devzone.nordicsemi.com/thread/556024?ContentTypeID=1</link><pubDate>Tue, 02 Dec 2025 14:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80419481-cb4a-4418-b762-9b31bd8bfd53</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I am getting a build error about insufficient RAM, so I am reducing a bit the RAM dedicated to CONFIG_MBEDTLS_HEAP_SIZE, so that the build can complete.&lt;br /&gt;Sending the same command as before I getting this:&lt;br /&gt;&lt;code&gt;net_wifi_certs: Failed to get credential tag: 16908289 length, err: -2&lt;/code&gt;&lt;br /&gt;Does this mean that I need to provision some certificates to the device that are included by default in the non NS build?[/quote]
&lt;p&gt;This error means that the Wi-Fi/TLS stack looked up a credential using a TLS credential tag, and it was not found in the configured backend. You must ensure that the enterprise credentials are present. You can see how to add credentials in&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-3.1.1/page/zephyr/connectivity/networking/api/wifi.html#wi-fi_enterprise_test_x509_certificate_management"&gt; Wi-Fi Enterprise test: X.509 Certificate management&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please note that when using TLS credentials subsystem, the volatile backend is used by default (CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE). This means that the certificates will be lost upon reboot, and you will need to provide them again. If you want to store the credentials persistently, you can use the PS backend (CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE) to store the certificates in non-volatile storage.&lt;/p&gt;
[quote user=""]So, could you provide some guidance as to how to connect to my enterprise wifi AP from my code with the same configuration that I am using when running the shell sample?[/quote]
&lt;p&gt;The shell sample uses runtime certificates (CONFIG_WIFI_SHELL_RUNTIME_CERTIFICATES). Based on the error you get, it appears that it expects the certificates to be provided at compile time, but they are not found. You can look at the link I added above to see how to add the certificates at compile time.&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>