<?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>Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100211/asset-tracker-mqtt-error--116</link><description>Hi, 
 I have tried to follow the steps outlined in https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/azure_iot_hub.html to connect my Thingy 91 to Azure. I am seeing the below message in LTE Link Monitor: 
 mqtt_helper</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Jun 2023 12:03:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100211/asset-tracker-mqtt-error--116" /><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428717?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 12:03:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeea8ab4-df56-42bd-b55c-1e5171b38f32</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;You can verify your JSON message with this schema:&amp;nbsp;&lt;a id="" href="https://nordicsemiconductor.github.io/asset-tracker-cloud-docs/saga/docs/cloud-protocol/state.desired.azure.schema.json"&gt;https://nordicsemiconductor.github.io/asset-tracker-cloud-docs/saga/docs/cloud-protocol/state.desired.azure.schema.json&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Jan Tore&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428713?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 11:53:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4adb43f1-3a51-4f53-be3c-b02a80f3b0ef</guid><dc:creator>ibiglari</dc:creator><description>&lt;p&gt;Last question... What&amp;#39;s the structure of the JSON message to change device&amp;#39;s configuration? Would this work?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt;&amp;quot;cfg&amp;quot;: {
    &amp;quot;loct&amp;quot;: 60,
    &amp;quot;act&amp;quot;: true,
    &amp;quot;actwt&amp;quot;: 60,
    &amp;quot;mvres&amp;quot;: 60,
    &amp;quot;mvt&amp;quot;: 3600,
    &amp;quot;accath&amp;quot;: 10.5,
    &amp;quot;accith&amp;quot;: 5.2,
    &amp;quot;accito&amp;quot;: 1.7,
    &amp;quot;nod&amp;quot;: []
  }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428706?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 11:40:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:712409d0-4168-44d3-9c00-ab202292ba06</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;Happy to hear you&amp;#39;re making progress with the credentials.&lt;/p&gt;
&lt;p&gt;Regaring Asset Tracker v2, the following two configurations can be used to control the device ID at compile time:&lt;br /&gt;CONFIG_CLOUD_CLIENT_ID_USE_CUSTOM=y&lt;br /&gt;CONFIG_CLOUD_CLIENT_ID=&amp;quot;&amp;lt;your device ID&amp;gt;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428703?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 11:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a03c270-6616-4398-bab6-66ec149c2b9e</guid><dc:creator>ibiglari</dc:creator><description>&lt;p&gt;OK that makes sense.&lt;/p&gt;
&lt;p&gt;I made progress by importing both Azure root certificates and device certificate in two tags like this:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1685619166264v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This made azure_iot_hub sample work. However, asset tracker v2 seems to ignore CONFIG_AZURE_IOT_HUB_DEVICE_ID and use IMEI instead, which made life a little more difficult as I had to generate a new certificate.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428689?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 10:55:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0423584-3536-4954-a108-e6dc742b392b</guid><dc:creator>Jan Tore Guggedal</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/ibiglari"&gt;ibiglari&lt;/a&gt;&amp;nbsp;No, it&amp;#39;s the other way around. PSK can not be used for Azure IoT Hub.&lt;br /&gt;But in the modem trace that you provided, the modem attempts to use PSK for the TLS handshake. The server denies that request, and that is the reason for the error that you see.&lt;/p&gt;
&lt;p&gt;When the modem attempts to use PSK, it is an indication that certificates and private key have not been correctly provisioned to the modem. Please make sure that the device certificate and private key are added to the correct fields in the Certificate manager. In addition, you can delete the PSK entries in the sec tag that you use.&lt;/p&gt;
&lt;p&gt;You can check which entries exist on a sec tag by sending the AT command&amp;nbsp;AT%CMNG=1.&lt;/p&gt;
&lt;p&gt;Note that you can view the trace that you capture in Wireshark, either by using the Trace Collector v2 or the Cellular Monitor Preview application in nRF Connect&amp;nbsp; for desktop. You can then inspect the TLS handshake and see what&amp;#39;s going on. In this case, it&amp;#39;s visible in the Client hello message from the device that it requests to use PSK cipher suites, which the server immediately denies.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428590?ContentTypeID=1</link><pubDate>Thu, 01 Jun 2023 04:28:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:559d9a67-5d45-44e6-91a1-62064a2485f4</guid><dc:creator>ibiglari</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the reply. This difference in the timezone is killing me &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f605.svg" title="Sweat smile"&gt;&amp;#x1f605;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Does this mean we can use PSK on Azure IoT hub instead a certificate? That would certainly make life much easier for development / testing at least.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428489?ContentTypeID=1</link><pubDate>Wed, 31 May 2023 13:25:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4cadff3-f972-4565-b1e6-1bbe2d454fdd</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;It looks like a certificate/key issue, as the device attempts to use PSK for TLS, which does not work. You should ensure that the device certificate and key are written to the correct entries in The Certificate manager, according to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/azure_iot_hub.html#azure-iot-hub-flash-certs"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/azure_iot_hub.html#azure-iot-hub-flash-certs&lt;/a&gt;.&lt;br /&gt; &lt;br /&gt;You could also delete the PSK entries on the relevant sec tag.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/428026?ContentTypeID=1</link><pubDate>Tue, 30 May 2023 05:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87582f6a-7fbe-464c-97ea-8483f70ef01a</guid><dc:creator>ibiglari</dc:creator><description>&lt;p&gt;I have also confirmed that Thingy91 can communicate to the IoT endpoint on port 443 by modifying https_client sample&amp;#39;s source code:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1685424411314v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/427955?ContentTypeID=1</link><pubDate>Mon, 29 May 2023 03:46:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf163e82-7658-4ff8-b968-defb01964d68</guid><dc:creator>ibiglari</dc:creator><description>&lt;p&gt;Tried the same configuration with azure_iot_hub, and experienced the same result. prj.conf, modem trace and serial log attached. Password to the attached file is my email address.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pc_2D00_nrfconnect_2D00_tracecollector_2D00_preview.7z"&gt;devzone.nordicsemi.com/.../pc_2D00_nrfconnect_2D00_tracecollector_2D00_preview.7z&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also tested the SIM card and DNS lookup by uploading https-client sample:&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1685340694319v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Asset Tracker MQTT Error -116</title><link>https://devzone.nordicsemi.com/thread/427950?ContentTypeID=1</link><pubDate>Mon, 29 May 2023 02:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:892c30bf-8af8-40cf-871c-de8224c3a86a</guid><dc:creator>ibiglari</dc:creator><description>&lt;p&gt;&lt;strong&gt;Details about the setup:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Root CA, sub-ordinate CA and device certificate were created using the tutorial available on &lt;a href="https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-x509-test-certs#tabpanel_1_linux"&gt;https://learn.microsoft.com/en-us/azure/iot-hub/tutorial-x509-test-certs#tabpanel_1_linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Root and sub-ordinate certificates were combined into a single file and uploaded to Azure IoT Hub&lt;/li&gt;
&lt;li&gt;Azure IoT Hub Root Certificate was upgraded to DigiCert Global G2 root&lt;/li&gt;
&lt;li&gt;Device private key generated in step 2 was decrypted to remove the password&lt;/li&gt;
&lt;li&gt;DigiCert Global G2 root certificate, device certificate and decrypted private key generated in step 4 were uploaded to Thingy91 using AT Client and LTE Link Monitor&lt;/li&gt;
&lt;li&gt;Asset Tracker v2&amp;#39;s overlay_azure.conf was edited to the below:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2021 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_AZURE_IOT_HUB=y
CONFIG_AZURE_IOT_HUB_DPS=n
CONFIG_AZURE_IOT_HUB_AUTO_DEVICE_TWIN_REQUEST=n
# Increase the number of maximum message properties that can be parsed by the Azure IoT Hub library.
# Needed to be able to parse P-GPS responses.
CONFIG_AZURE_IOT_HUB_MSG_PROPERTY_RECV_MAX_COUNT=4

# Azure IoT Hub options that must be configured in order to establish a connection.
CONFIG_AZURE_IOT_HUB_HOSTNAME=&amp;quot;{iot-hub-name}.azure-devices.net&amp;quot;
CONFIG_AZURE_IOT_HUB_DEVICE_ID=&amp;quot;{common name for device certificate}&amp;quot;
CONFIG_MQTT_HELPER_SEC_TAG=16842753
# MQTT Transport library
# Maximum specified MQTT keepalive timeout for Azure IoT Hub is 1177 seconds.
CONFIG_MQTT_KEEPALIVE=1177
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Asset tracker was built and uploaded to the device&lt;/li&gt;
&lt;li&gt;Below log was observed:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;        ABADAAAGAAAaBb9icmMA/7ke
*** Booting Zephyr OS build v3.2.99-ncs2 ***
[00:00:01.502,960] &amp;lt;inf&amp;gt; app_event_manager: APP_EVT_START
[00:00:01.528,594] &amp;lt;inf&amp;gt; app_event_manager: DATA_EVT_CONFIG_INIT
[00:00:01.529,296] &amp;lt;inf&amp;gt; app_event_manager: MODEM_EVT_INITIALIZED
[00:00:01.545,715] &amp;lt;inf&amp;gt; azure_fota: Current firmware version: 0.0.0-development
[00:00:01.591,552] &amp;lt;inf&amp;gt; app_event_manager: MODEM_EVT_LTE_CONNECTING
%CESQ: 46,2,7,1
+CEREG: 2,&amp;quot;2014&amp;quot;,&amp;quot;07F03F0B&amp;quot;,7
%CESQ: 50,2,20,2
+CSCON: 1
%CESQ: 49,2,15,2
%CESQ: 49,2,20,2
[00:00:02.780,181] &amp;lt;inf&amp;gt; app_event_manager: MODEM_EVT_LTE_CELL_UPDATE
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
%MDMEV: SEARCH STATUS 2
+CEREG: 5,&amp;quot;2014&amp;quot;,&amp;quot;07F03F0B&amp;quot;,7,,,&amp;quot;00001010&amp;quot;,&amp;quot;11000010&amp;quot;
%XTIME: &amp;quot;04&amp;quot;,&amp;quot;32509220807304&amp;quot;,&amp;quot;00&amp;quot;
[00:00:06.961,486] &amp;lt;inf&amp;gt; app_event_manager: MODEM_EVT_LTE_CONNECTED
[00:00:06.962,585] &amp;lt;inf&amp;gt; app_event_manager: CLOUD_EVT_CONNECTING
[00:00:07.075,988] &amp;lt;inf&amp;gt; app_event_manager: MODEM_EVT_LTE_PSM_UPDATE
[00:00:07.076,660] &amp;lt;inf&amp;gt; app_event_manager: DATA_EVT_DATE_TIME_OBTAINED
%CESQ: 50,2,13,1
%CESQ: 50,2,21,3
+CSCON: 0
%CESQ: 51,2,15,2
%CESQ: 50,2,22,3
%CESQ: 50,2,17,2
%CESQ: 51,2,22,3
%CESQ: 51,2,16,2
%CESQ: 51,2,21,3
%CESQ: 255,0,255,0
%CESQ: 49,2,18,2
%MDMEV: SEARCH STATUS 2
+CSCON: 1
[00:02:57.772,857] &amp;lt;err&amp;gt; mqtt_helper: mqtt_connect, error: -116
[00:02:57.772,888] &amp;lt;err&amp;gt; azure_iot_hub: mqtt_helper_connect failed, error: -116
[00:02:57.772,888] &amp;lt;err&amp;gt; azure_iot_hub_integration: azure_iot_hub_connect, error: -116
%CESQ: 49,2,23,3
%CESQ: 50,2,17,2
%CESQ: 50,2,23,3
+CSCON: 0
+CSCON: 1
%CESQ: 50,2,17,2
%CESQ: 50,2,22,3
[00:03:29.773,071] &amp;lt;inf&amp;gt; app_event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
[00:03:29.773,651] &amp;lt;inf&amp;gt; app_event_manager: CLOUD_EVT_CONNECTING
%CESQ: 50,2,14,2
+CSCON: 0
%CESQ: 50,2,25,3
%CESQ: 50,2,19,2
%CESQ: 255,0,255,0
%CESQ: 48,2,12,1
%MDMEV: SEARCH STATUS 2
%CESQ: 51,2,23,3
+CSCON: 1
%CESQ: 50,2,18,2
[00:06:20.892,700] &amp;lt;err&amp;gt; mqtt_helper: mqtt_connect, error: -116
[00:06:20.892,730] &amp;lt;err&amp;gt; azure_iot_hub: mqtt_helper_connect failed, error: -116
[00:06:20.892,730] &amp;lt;err&amp;gt; azure_iot_hub_integration: azure_iot_hub_connect, error: -116
%CESQ: 50,2,13,1
%CESQ: 50,2,19,2
%CESQ: 51,2,14,2
%CESQ: 51,2,19,2
+CSCON: 0
+CSCON: 1
%CESQ: 51,2,14,2
%CESQ: 50,2,20,2
%CESQ: 51,2,14,2
%CESQ: 51,2,20,2
%CESQ: 51,2,15,2
%CESQ: 51,2,21,3
%CESQ: 51,2,16,2
+CSCON: 0
%CESQ: 50,2,23,3
%CESQ: 50,2,18,2
%CESQ: 50,2,12,1
%CESQ: 50,2,17,2
%CESQ: 255,0,255,0
%CESQ: 46,2,10,1
%MDMEV: SEARCH STATUS 2
+CSCON: 1
[00:07:24.892,913] &amp;lt;inf&amp;gt; app_event_manager: CLOUD_EVT_CONNECTION_TIMEOUT
[00:07:24.893,493] &amp;lt;inf&amp;gt; app_event_manager: CLOUD_EVT_CONNECTING
%CESQ: 50,2,15,2
%CESQ: 49,2,21,3
%CESQ: 50,2,15,2
+CSCON: 0
%CESQ: 50,2,10,1
%CESQ: 51,2,16,2
%CESQ: 50,2,11,1
%CESQ: 255,0,255,0
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;* I&amp;#39;m not using DPS&lt;/p&gt;
&lt;p&gt;* SDK version is 2.3.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>