<?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>Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105676/azure-iot-hub-dps-library-seems-to-always-reprovision-our-device</link><description>I am working with SDK: 2.5.0 and toolchain 2.5.0. I am using the new nRF7002DK. I created an application from the azure_iot_hub sample. I am using the DPS for my provisioning. It is important to note that we haven&amp;#39;t modified the code other than adding</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Apr 2024 11:33:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105676/azure-iot-hub-dps-library-seems-to-always-reprovision-our-device" /><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/477781?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 11:33:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2885fd19-d9f1-4911-9879-59b21b53150c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Okay, so I got a reply pretty soon after my last update. It seems the answer is in the following piece of log:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[00:00:07.963,378] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Assigned device ID found:&lt;/span&gt;&lt;br /&gt;&lt;span&gt;[00:00:07.963,531] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Assigned device ID length found: 9&lt;/span&gt;&lt;br /&gt;&lt;span&gt;[00:00:07.963,714] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Azure IoT Hub hostname found:&lt;/span&gt;&lt;br /&gt;&lt;span&gt;[00:00:07.963,928] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Azure IoT Hub hostname length found: 29&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This implementation depends on &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/1a9695dc95c6671337ac92156731f67710cd599e/subsys/net/lib/azure_iot_hub/src/azure_iot_hub_dps.c#L159-L160"&gt;the order of how settings are restored&lt;/a&gt;. It expects hostname_len to be restored before the host name, but the nvs backend restores settings in reverse order, so you will have to &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/1a9695dc95c6671337ac92156731f67710cd599e/subsys/net/lib/azure_iot_hub/src/azure_iot_hub_dps.c#L210-L220"&gt;swap these two settings&lt;/a&gt; or make the restore independent of the order.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/477701?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2024 06:23:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbfc0ce5-7d99-440c-b4d9-74bc7cc09da2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vincent&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. This was put on hold over Easter, and I&amp;#39;m still looking for the right people to comment on this I&amp;#39;m afraid.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/474089?ContentTypeID=1</link><pubDate>Fri, 15 Mar 2024 12:52:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49607c58-41af-4992-81f9-3ed4f1e0ade4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;No updates in the internal ticket, so I have pinged the developer working on it for an update now. I will get back to you as soon as I hear something. I&amp;#39;m sorry it&amp;#39;s taking so long, but it took a while before finding the correct engineers to assign to this as well.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/473966?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2024 18:01:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f9bd6be-81f9-4681-9311-98cc1331f306</guid><dc:creator>Actif</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;br /&gt;&lt;br /&gt;Any update?&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Vincent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469775?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 11:57:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c356c03-b3c9-43e6-b0dc-b0d4f0b76588</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vincent&lt;/p&gt;
&lt;p&gt;Will do. I can confirm that the internal ticket has been assigned to an engineer working on the Azure IoT hub sample.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469569?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 14:29:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64fc0be8-b2d1-4a56-81a2-e86cc61a342a</guid><dc:creator>Actif</dc:creator><description>&lt;p data-sourcepos="3:1-3:12"&gt;&lt;span&gt;Thank you for clarifying.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="7:1-7:128"&gt;&lt;span&gt;We have documented and included the lingering NVS backend problem in our bug analysis process.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;While this isn&amp;#39;t a time-critical issue for our immediate project,&lt;/span&gt;&lt;span&gt; we are keenly interested in&amp;nbsp;documenting the cause.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="9:1-9:21"&gt;&lt;span&gt;Could you please keep us updated on any progress made by your team in investigating the cause of the NVS behaviour on the DK?&lt;/span&gt;&lt;span&gt; Even incremental insights would be appreciated.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="11:1-11:40"&gt;&lt;span&gt;Thank you for your continued assistance.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="13:1-14:7"&gt;&lt;span&gt;Regards,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Vincent&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469567?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 14:21:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efb4ae3b-47bb-414a-a8d1-0a21f41475bb</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Thank you for specifying. I pinged the devs, and there has not been any progress on this unfortunately. I have made an internal ticket so that we can track this issue/investigation properly now, and will get back to you with any updates on it. I don&amp;#39;t have an estimate on when exactly that would be unfortunately. Is there any rush on getting the NVS backend up and running on your end so that this should be prioritized?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469524?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 13:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a3014bd-ab3b-4475-8979-40335bd0e537</guid><dc:creator>Actif</dc:creator><description>&lt;p data-sourcepos="5:1-5:12"&gt;&lt;span&gt;Hi Simonr,&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="7:1-7:104"&gt;&lt;span&gt;Thank you for the previous clarification regarding the fix that addressed the backend override issue.&lt;/span&gt;&lt;span&gt; My inquiry today focuses on the ongoing investigation into the NVS backend problem that remains unresolved.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="9:1-9:46"&gt;&lt;span&gt;As noted in the commit documentation (e46e68c1cf4fdcf5e7a8d24df7e0b70561248c0b) by Simen S.&lt;/span&gt;&lt;span&gt; R&amp;oslash;stad:&lt;/span&gt;&lt;span&gt; &amp;quot;Why it doesn&amp;#39;t work with the NVS backend needs to be investigated.&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="13:1-13:180"&gt;&lt;span&gt;Could you please provide an update on the status of this NVS backend investigation?&lt;/span&gt;&lt;span&gt; Any insights into potential causes would be welcome.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="15:1-15:30"&gt;&lt;span&gt;Thank you for your assistance.&lt;/span&gt;&lt;/p&gt;
&lt;p data-sourcepos="17:1-18:8"&gt;&lt;span&gt;Sincerely,&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Vincent&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469387?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 07:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aef3c5fc-418e-455f-957f-c3e9ca50c7d4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vincent&lt;/p&gt;
&lt;p&gt;Do you refer to the stability fixes or the issue where it doesn&amp;#39;t work with the NVS backend?&lt;/p&gt;
&lt;p&gt;The backend override has been removed and the mentioned stability fixes + clean-up has been done. The reason was that the nRF7002 board config overrode the hostname and device ID received during DPS. I&amp;#39;m not sure there is more to add than what&amp;#39;s described in the sign-off by my colleague Simen.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469249?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 13:26:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fa2a53d-3272-451a-8861-76a5435648c3</guid><dc:creator>Actif</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Simonr,&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;I am speaking of&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/13180/commits/e46e68c1cf4fdcf5e7a8d24df7e0b70561248c0b"&gt;https://github.com/nrfconnect/sdk-nrf/pull/13180/commits/e46e68c1cf4fdcf5e7a8d24df7e0b70561248c0b&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;You had already clarify your previous point, in our previous discussion.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Vincent&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/469190?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2024 10:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3570e033-38fc-4ebd-b32e-6759bfd6cd93</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;We concluded this is not a bug, as&amp;nbsp;&lt;span&gt;a&lt;/span&gt;&lt;strong&gt;zure_iot_dps_init&lt;/strong&gt;&lt;span&gt;&amp;nbsp;has to be run to initialize the library, and&amp;nbsp;&lt;strong&gt;azure_iot_dps_start&amp;nbsp;&lt;/strong&gt;must be run to start the DPS process. Since there is no connection to the DPS server, the DPS library locates the host name and device ID in the flash memory as part of the DPS process and is in the DPS API, not the connection itself.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/468498?ContentTypeID=1</link><pubDate>Tue, 13 Feb 2024 02:04:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fcaa1ec2-dc28-4f58-be85-54e770bc2fd0</guid><dc:creator>Actif</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;br /&gt;&lt;br /&gt;Did your team finally understand&amp;nbsp;the reason for this bug?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/457315?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2023 12:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afb08b82-9e2e-483d-aafd-e6e757bcac63</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again Vincent&lt;/p&gt;
&lt;p&gt;This isn&amp;#39;t a bug, and is intended. The DPS isn&amp;#39;t executed twice, the connection to the server that is. But a&lt;strong&gt;zure_iot_dps_init&lt;/strong&gt; and &lt;strong&gt;_start&lt;/strong&gt; will still be run.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;_init&lt;/strong&gt; has to be run to initialize the library and&amp;nbsp;&lt;strong&gt;_start&lt;/strong&gt; must be run to start the DPS process. The difference here is that there isn&amp;#39;t a connection to the DPS-server, but the DPS library locating the host name and device ID in the flash memory. This is also part of the DPS process, and is happening in the DPS API.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/457211?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 15:04:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ae471ad-717f-41e0-8ea7-d8ea01efcc52</guid><dc:creator>Actif</dc:creator><description>&lt;p&gt;The &lt;span&gt;azure_iot_hub_dps_init gets called precisely twice. When I looked at the code, the &lt;code&gt;azure_iot_hub_connect&lt;/code&gt; function in &lt;code&gt;azure_iot_hub.c&lt;/code&gt; seems to unnecessarily redo the DPS provisioning process, which should be redundant in this context. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to understand the rationale behind its implementation. Could you clarify if the coding approach was intentional due to its minimal impact or if it might be an oversight? I want to ensure I&amp;rsquo;m not missing any critical aspects of our development strategy.&lt;/p&gt;
&lt;p&gt;Additionally, I find identifying the appropriate buffer or configuration parameters challenging. Any guidance or resources you could provide to help me navigate these settings would be precious.&lt;/p&gt;
&lt;p&gt;In the meantime, I will continue to explore the Zephyr networking layer in hopes of finding a solution. However, your expert support would expedite this process and enhance my understanding and learning.&lt;/p&gt;
&lt;p&gt;Thank you for your continuous support and exceptional work.&lt;br /&gt;&lt;br /&gt;Looking forward to your insights.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Vincent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/457162?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 12:47:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05474538-4a3b-458e-9c32-a085b2dd82ed</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vincent&lt;/p&gt;
&lt;p&gt;Does the&amp;nbsp;&lt;span&gt;azure_iot_hub_dps_init get called&amp;nbsp;&lt;strong&gt;exactly&amp;nbsp;&lt;/strong&gt;&lt;strong&gt;twice&lt;/strong&gt; before successfully connecting, or will it just keeps looping like this for X amount of tries before succeeding? If it&amp;#39;s always two inits I would guess that the initialization itself is actually called twice, but it could also be that the application waits for X time before retrying to init and connect, and that it just needs more time to connect successfully.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For the errors, I think you can simply try increasing some of the data buffer configurations in your .conf file to avoid this buffer allocation error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/456943?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 13:45:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89e75294-dfc9-4e0c-9007-29b07e8d9363</guid><dc:creator>Actif</dc:creator><description>&lt;p&gt;Hi Simon,&lt;br /&gt;&lt;br /&gt;Thank you for pushing this ticket. One problem was resolved!&lt;br /&gt;After applying the fixes from that PR, the setting is read correctly on my side and not overwritten.&lt;br /&gt;&lt;br /&gt;Did you have feedback on the second point where we go twice inside the azure_iot_hub_dps_init function?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#00ff00;"&gt;[00:00:07.821,685] &amp;lt;wrn&amp;gt; azure_iot_hub_dps: azure_iot_hub_dps_init&lt;/span&gt;&lt;br /&gt;[00:00:07.821,746] &amp;lt;inf&amp;gt; azure_iot_hub_dps: No registration ID provided, using ID from Kconfig: device-01&lt;br /&gt;[00:00:07.821,777] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Setting DPS registration ID: device-01&lt;br /&gt;[00:00:07.821,807] &amp;lt;inf&amp;gt; azure_iot_hub_dps: No ID scope provided, using ID scope from Kconfig: ********&lt;br /&gt;[00:00:07.821,838] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Setting DPS ID scope: : ********&lt;br /&gt;[00:00:07.822,204] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Azure IoT Hub hostname length found: 29&lt;br /&gt;[00:00:07.822,570] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Azure IoT Hub hostname found: ********azure-devices.net&lt;br /&gt;[00:00:07.822,814] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Assigned device ID length found: 9&lt;br /&gt;[00:00:07.822,967] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Assigned device ID found: device-01&lt;br /&gt;[00:00:07.823,028] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Settings fully loaded&lt;br /&gt;[00:00:07.823,089] &amp;lt;inf&amp;gt; azure_iot_hub_dps: State transition: DPS_STATE_UNINIT --&amp;gt; DPS_STATE_DISCONNECTED&lt;br /&gt;[00:00:07.823,089] &amp;lt;inf&amp;gt; azure_iot_hub_sample: DPS registration status: AZURE_IOT_HUB_DPS_REG_STATUS_NOT_STARTED&lt;br /&gt;&lt;span style="background-color:#00ff00;"&gt;[00:00:07.823,120] &amp;lt;wrn&amp;gt; azure_iot_hub_dps: azure_iot_hub_dps_start&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#00ff00;"&gt;[00:00:07.823,120] &amp;lt;wrn&amp;gt; azure_iot_hub_dps: Settings found&lt;/span&gt;&lt;br /&gt;[00:00:07.823,181] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Device &amp;quot;device-01&amp;quot; is assigned to IoT hub: ********azure-devices.net&lt;br /&gt;[00:00:07.823,211] &amp;lt;inf&amp;gt; azure_iot_hub_dps: To re-register, call azure_iot_hub_dps_reset() first&lt;br /&gt;[00:00:07.823,211] &amp;lt;inf&amp;gt; azure_iot_hub_sample: Already assigned to an IoT hub, skipping DPS&lt;br /&gt;[00:00:07.823,242] &amp;lt;inf&amp;gt; azure_iot_hub_dps: hostname_ptr: 0x200063e4, hostname_len: 29&lt;br /&gt;[00:00:07.823,242] &amp;lt;inf&amp;gt; azure_iot_hub_dps: dev_id_ptr: 0x20006364, dev_id_len: 9&lt;br /&gt;[00:00:07.823,303] &amp;lt;inf&amp;gt; azure_iot_hub_sample: Device ID &amp;quot;device-01&amp;quot; assigned to IoT hub with hostname &amp;quot;*****.azure-devices.net&amp;quot;&lt;br /&gt;[00:00:07.824,157] &amp;lt;inf&amp;gt; azure_fota: Current firmware version: 0.0.0-dev&lt;br /&gt;[00:00:07.824,188] &amp;lt;inf&amp;gt; azure_iot_hub_sample: Azure IoT Hub library initialized&lt;br /&gt;[00:00:07.824,218] &amp;lt;inf&amp;gt; azure_iot_hub_sample: AZURE_IOT_HUB_EVT_CONNECTING&lt;br /&gt;&lt;span style="background-color:#00ff00;"&gt;[00:00:07.824,218] &amp;lt;wrn&amp;gt; azure_iot_hub_dps: azure_iot_hub_dps_init&lt;/span&gt;&lt;br /&gt;[00:00:07.824,249] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Setting DPS registration ID: device-01&lt;br /&gt;[00:00:07.824,279] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Setting DPS ID scope: *******&lt;br /&gt;[00:00:07.824,676] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Azure IoT Hub hostname length found: 29&lt;br /&gt;[00:00:07.825,012] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Azure IoT Hub hostname found: *******.azure-devices.net&lt;br /&gt;[00:00:07.825,256] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Assigned device ID length found: 9&lt;br /&gt;[00:00:07.825,408] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Assigned device ID found: device-01&lt;br /&gt;[00:00:07.825,469] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Settings fully loaded&lt;br /&gt;&lt;span style="background-color:#00ff00;"&gt;[00:00:07.825,500] &amp;lt;wrn&amp;gt; azure_iot_hub_dps: azure_iot_hub_dps_start&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#00ff00;"&gt;[00:00:07.825,531] &amp;lt;wrn&amp;gt; azure_iot_hub_dps: Settings found&lt;/span&gt;&lt;br /&gt;[00:00:07.825,592] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Device &amp;quot;device-01&amp;quot; is assigned to IoT hub: *******..azure-devices.net&lt;br /&gt;[00:00:07.825,592] &amp;lt;inf&amp;gt; azure_iot_hub_dps: To re-register, call azure_iot_hub_dps_reset() first&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I also have some errors happening on my side that I would appreciate some support/explanation to assess if we can fix them. Could you explain to me what this error is really about and what is happening? Then, I will asses if I can live with it or I need to fix it.&lt;br /&gt;&lt;br /&gt;[00:00:08.765,472] &amp;lt;inf&amp;gt; mqtt_helper: State transition: MQTT_STATE_DISCONNECTED --&amp;gt; MQTT_STATE_TRANSPORT_CONNECTING&lt;br /&gt;&lt;span style="background-color:#ff0000;"&gt;[00:00:09.828,948] &amp;lt;err&amp;gt; net_pkt: Data buffer (68) allocation failed.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color:#ff0000;"&gt;[00:00:09.829,040] &amp;lt;err&amp;gt; net_tcp: TCP failed to allocate buffer in retransmission&lt;/span&gt;&lt;br /&gt;[00:00:10.385,528] &amp;lt;inf&amp;gt; net_mqtt: Connect completed&lt;br /&gt;[00:00:10.385,589] &amp;lt;inf&amp;gt; mqtt_helper: State transition: MQTT_STATE_TRANSPORT_CONNECTING --&amp;gt; MQTT_STATE_TRANSPORT_CONNECTED&lt;br /&gt;[00:00:10.385,620] &amp;lt;inf&amp;gt; mqtt_helper: State transition: MQTT_STATE_TRANSPORT_CONNECTED --&amp;gt; MQTT_STATE_CONNECTING&lt;br /&gt;&lt;br /&gt;Again, thank you and your team for the support.&lt;br /&gt;Vincent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/456820?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 07:21:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f85c1bc0-c2a8-49a5-96f7-d7a0976da209</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again Vincent&lt;/p&gt;
&lt;p&gt;We were able to reproduce this on our end in the meantime, and one of our devs discovered that the host name and dev ID is not loaded correctly. This morning I was told a pull request has been made where the settings are changed on the backend. Please check it out and confirm whether it solves the issues on your end.&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/13180/commits/e46e68c1cf4fdcf5e7a8d24df7e0b70561248c0b"&gt;https://github.com/nrfconnect/sdk-nrf/pull/13180/commits/e46e68c1cf4fdcf5e7a8d24df7e0b70561248c0b&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/456426?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 13:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3aa964f-cb79-4537-8873-ce0b5f28f446</guid><dc:creator>Actif</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;Thank you for your continued support. Before proceeding with the Wireshark trace, which I am fully prepared to conduct, I would like to bring to light some key observations and concerns.&lt;/p&gt;
&lt;p&gt;From my understanding and experience with the system, the initial communication with the Azure IoT Hub, including connecting and sending telemetry, seems to function correctly. This includes the use of the DPS for initial provisioning and connection. However, the problem becomes apparent during the reconnection phase, where the device gets reprovisioned each time due to the inability to bypass the DPS. This leads to unnecessary reprovisioning despite the device being previously provisioned and connected to the Azure IoT Hub.&lt;/p&gt;
&lt;p&gt;The core issue seems to be rooted more in the Nordic code handling rather than a communication problem. Specifically, the application&amp;#39;s failure to properly recognize and utilize the saved Azure IoT Hub information gives the impression of no previous information being saved, triggering the reprovisioning process. This was detailed in my previous communication, highlighting concerns about the azure_iot_hub_dps_start function in azure_iot_hub_dps.c and the apparent issues with thread synchronization or variable caching, particularly with the dps_reg_ctx global variable.&lt;/p&gt;
&lt;p&gt;In light of these observations, I am keen to understand the specific objectives behind the request for a Wireshark trace:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What aspects or anomalies in the network communication are we looking to identify in the Wireshark trace that could contribute to the reconnection and reprovisioning issues?&lt;/li&gt;
&lt;li&gt;How will the insights from the Wireshark trace help us address the issue of the application not recognizing the saved Azure IoT Hub information, especially considering this seems more related to the Nordic code&amp;rsquo;s handling of the process?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Understanding the reasoning behind this request will greatly assist me in ensuring that the Wireshark trace is focused and relevant and will help us collaboratively pinpoint the exact nature of the problem more effectively.&lt;/p&gt;
&lt;p&gt;Looking forward to your insights and guidance on this matter.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Vincent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/456409?ContentTypeID=1</link><pubDate>Mon, 20 Nov 2023 12:52:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7476a1c-fa7e-477a-b6bc-afc13b913b89</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again Vincent&lt;/p&gt;
&lt;p&gt;Thank you for the extra information. Would it be possible for you to provide a Wireshark trace so the Azure library developers can take a look and see what&amp;#39;s going on over the air? To do so you can connect to the nRF7002 DK to a Wi-Fi hotspot on you computer and capture a trace from that with Wireshark. Let me know if you need any further details. That way we can make sure what is going on over the air exactly, and won&amp;#39;t have to make any guesses to what&amp;#39;s going on here.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/456028?ContentTypeID=1</link><pubDate>Thu, 16 Nov 2023 16:08:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:083579ef-a898-4dac-bef9-a242f9967f7d</guid><dc:creator>Actif</dc:creator><description>&lt;div class="flex flex-grow flex-col max-w-full gap-3 gizmo:gap-0"&gt;
&lt;div data-message-author-role="assistant" data-message-id="05bd5582-520e-4804-81bb-aede7d0994b4"&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert dark"&gt;
&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;Thank you for your prompt response and the suggestions regarding the Azure IoT Hub and DPS configuration for the nRF7002. I appreciate your assistance.&lt;/p&gt;
&lt;p&gt;I want to clarify a few points that might have been overlooked in my initial query. From the log, it is evident that the registration ID is being correctly pulled from Kconfig, as indicated by these lines:&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="bg-black rounded-md"&gt;
&lt;div class="p-4 overflow-y-auto"&gt;&lt;code class="!whitespace-pre hljs language-csharp"&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:07.963,134] &amp;lt;inf&amp;gt; azure_iot_hub_dps: No registration ID provided, using ID from Kconfig: device-01
[00:00:07.963,165] &amp;lt;inf&amp;gt; azure_iot_hub_dps: Setting DPS registration ID: device-01&lt;/pre&gt;&lt;span class="hljs-number"&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This confirms that the DPS overlay is active and functioning. However, the crux of the issue lies elsewhere. Even when the Azure IoT Hub information is saved and retrievable from the Zephyr setting module (under the key &lt;code&gt;DPS_SETTINGS_KEY &amp;quot;azure_iot_hub&amp;quot;&lt;/code&gt;), the device persists in processing through the DPS service, which is not the expected behaviour.&lt;/p&gt;
&lt;p&gt;The primary concern revolves around the &lt;code&gt;azure_iot_hub_dps_start&lt;/code&gt; function in &lt;code&gt;azure_iot_hub_dps.c&lt;/code&gt;, where the DPS is expected to be skipped if saved Azure IoT Hub information is found. Despite this, the &lt;code&gt;dps_reg_ctx&lt;/code&gt; global variable doesn&amp;#39;t seem to update accordingly in the DPS thread, suggesting possible issues with thread synchronization or variable caching.&lt;/p&gt;
&lt;p&gt;Additionally, the &lt;code&gt;azure_iot_hub_connect&lt;/code&gt; function in &lt;code&gt;azure_iot_hub.c&lt;/code&gt; seems to unnecessarily redo the DPS provisioning process, which should be redundant in this context.&lt;/p&gt;
&lt;p&gt;I believe these insights point towards a more specific area of the problem. I would greatly appreciate it if you could provide guidance or suggestions on these particular aspects:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ensuring proper synchronization and caching mechanisms for the &lt;code&gt;dps_reg_ctx&lt;/code&gt; global variable across different threads.&lt;/li&gt;
&lt;li&gt;Understanding why the DPS service is reinitiated despite having valid Azure IoT Hub details in the settings.&lt;/li&gt;
&lt;li&gt;Addressing the apparent redundancy in the DPS provisioning process within the &lt;code&gt;azure_iot_hub_connect&lt;/code&gt; function.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your expertise and deeper insights into these areas would be beneficial.&lt;/p&gt;
&lt;p&gt;We are looking forward to your guidance.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Vincent&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Azure IoT Hub DPS library seems to always reprovision our device</title><link>https://devzone.nordicsemi.com/thread/455770?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 13:30:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43d9e23c-b91a-4c1b-b83e-8e5173e2e5e1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vincent&lt;/p&gt;
&lt;p&gt;Yes, the Azure hub IoT sample should be tested for the nRF7002 and work out of the box. I see that your log reports that no registration ID has been added, so can you confirm that you&amp;#39;ve set the required configurations in your project required to use DPS on your end?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If DPS is used, use the Kconfig fragment found in the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span&gt;overlay-dps.conf&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;file and change the desired configurations there. As an example, the following should compile with DPS for nRF7002DK:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;west build -p -b nrf7002dk_nrf5340_cpuapp -- -DOVERLAY_CONFIG=overlay-dps.conf&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_AZURE_IOT_HUB_DPS"&gt;&lt;code&gt;&lt;span&gt;CONFIG_AZURE_IOT_HUB_DPS&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- Enables Azure IoT Hub DPS.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_AZURE_IOT_HUB_DPS_REG_ID"&gt;&lt;code&gt;&lt;span&gt;CONFIG_AZURE_IOT_HUB_DPS_REG_ID&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- Sets the Azure IoT Hub DPS registration ID. It can be provided at run time. By default, the sample uses the device ID as the registration ID and sets it at run time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a title="(in Kconfig reference v&amp;amp;nbsp;)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_AZURE_IOT_HUB_DPS_ID_SCOPE"&gt;&lt;code&gt;&lt;span&gt;CONFIG_AZURE_IOT_HUB_DPS_ID_SCOPE&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- Sets the DPS ID scope of the Azure IoT Hub. This can be provided at run time.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>