<?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>nRF9160 DK Azure IoT Hub</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60318/nrf9160-dk-azure-iot-hub</link><description>I am trying to use the nRF9160 DK as a gateway to send sensor data to an Azure IoT Hub for further handling. 
 I was previously using Particle to solve this problem, and they provided a simple webhook service that basically did all of the work for me</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Apr 2020 15:16:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60318/nrf9160-dk-azure-iot-hub" /><item><title>RE: nRF9160 DK Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/246318?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2020 15:16:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d97b974b-8203-47c0-acb4-ce43e9d61536</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;This looks like it could be a parsing issue. I&amp;#39;m not sure this can be solved by formatting differently on the client side, but it might be possible. You should make a separate ticket for this question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/246124?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 21:39:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1615ea8e-f047-4643-a830-bd1d92fe9052</guid><dc:creator>prolo_isaac</dc:creator><description>&lt;p&gt;Thanks for the reply!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve actually gotten the mqtt_simple example to connect to my IoT Hub now.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve actually been dealing with a new, more specific problem with publishing data (device-to-cloud). I can publish data and see the event on our IoT Hub, but the IoT Hub is already configured to receive a json payload. I tried formatting the outgoing message into something more json-esque using line breaks and such, but when I see the message come in, it includes the escape character (&amp;#39;\&amp;#39;) that I was trying to use for line breaks and quotation marks.&lt;/p&gt;
&lt;p&gt;I have successfully recieved this d2c message:&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;event&amp;quot;: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;origin&amp;quot;: &amp;quot;{device-id}&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;payload&amp;quot;: &amp;quot;a&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I want this:&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;event&amp;quot;: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;origin&amp;quot;: &amp;quot;{device-id}&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;payload&amp;quot;: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;published_at&amp;quot;: &amp;quot;XXXX-XX-XXXXX:XX:XX.XXXX&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;device_id&amp;quot;: &amp;quot;{device-id}&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;data&amp;quot;: &amp;quot;0.710180:1.796526:48.254000:58.799999:988.430000&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;event&amp;quot;: &amp;quot;demo&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But I am getting this:&lt;/p&gt;
&lt;p&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;event&amp;quot;: {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;origin&amp;quot;: &amp;quot;{device-id}&amp;quot;,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;payload&amp;quot;: &amp;quot;{\n\&amp;quot;published_at\&amp;quot;: \&amp;quot;XXXX-XX-XXXXX:XX:XX.XXXX\&amp;quot;,\n\&amp;quot;device_id\&amp;quot;: \&amp;quot;{device-id}\&amp;quot;\n,\&amp;quot;data\&amp;quot;:\&amp;quot;0.710180:1.796526:48.254000:58.799999:988.430000\&amp;quot;,\n\&amp;quot;event\&amp;quot;: \&amp;quot;demo&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Do you know what my options would be for formatting my message going into the mqtt_publish_param in mqtt.h? I feel like my hands are tied since the program is configured to send messages composed as type &amp;#39;u8_t*&amp;#39;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if I should make a separate ticket for the new question.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 DK Azure IoT Hub</title><link>https://devzone.nordicsemi.com/thread/246007?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2020 10:56:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db45b18-479a-4726-9997-ac7241fc088a</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have much experience working with Azure, but in principle it should be similar to other cloud backends. I assume you have configured some sort of endpoint on Azure with an URL or ip address that you want to connect to. You should change MQTT_BROKER_HOSTNAME in Kconfig to match the hostname of your Azure endpoint. You probably also need to configure the mqtt_simple project to use TLS connection, and provision certificates from Azure to the device. If you&amp;#39;re unsure how to do that, let me know so I can guide you.&lt;/p&gt;
&lt;p&gt;You should also read the &lt;a href="https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-mqtt-support"&gt;Microsoft Azure documentation&lt;/a&gt; on how to communicate with devices over mqtt.&lt;/p&gt;
&lt;p&gt;I hope this was helpful, and ask if you have more questions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>