<?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>Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69804/help-with-nrf9160-connecting-azure</link><description>Hello, 
 I need help with my application. 
 I am developing an application running on the EV board nrf9160dk_nrf9160 .I read the following article: 
 http://194.19.86.155/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/mqtt_simple/README.html 
 how to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Dec 2020 08:33:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69804/help-with-nrf9160-connecting-azure" /><item><title>RE: Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/thread/286651?ContentTypeID=1</link><pubDate>Mon, 28 Dec 2020 08:33:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51b06346-a6c8-4da2-959a-63a0c6791bd3</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The reason you get CME error 514 (No access. Applies to read, write, and delete.) is because you&amp;#39;re trying to read the client certificate. If you look at the documentation for&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/mob_termination_ctrl_status/cmng_set.html"&gt;the %CMNG set command&lt;/a&gt;&amp;nbsp;you&amp;#39;ll see there&amp;#39;s a note saying that reading types 1, 2, and 3 are not supported. This is for security reasons.&lt;/p&gt;
&lt;p&gt;Are you still having problems connecting to Azure, and if so, what does the error say?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/thread/286509?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2020 17:52:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4cb8b74-d364-4bc3-99a9-41d2603bbf46</guid><dc:creator>Danny Zadok</dc:creator><description>&lt;p&gt;Here is more information.&lt;/p&gt;
&lt;p&gt;I am trying to load the certificates to the modem. I tried both ways: LTE LINK and API.&lt;/p&gt;
&lt;p&gt;Using the LTE Link Certification manager:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1608745892935v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you see, it returns OK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BUT, when I try to read it back, it returns error:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1608745971308v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/thread/286486?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2020 14:39:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89eb6faf-55be-4c69-aa51-81bfb3a4feb1</guid><dc:creator>Danny Zadok</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I am following those links that you sent. But the documents are not accurate.&lt;/p&gt;
&lt;p&gt;Let me give you an example:&lt;/p&gt;
&lt;p&gt;in this link:&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Fmob_termination_ctrl_status%2Fcmng_set.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fref_at_commands%2FREF%2Fat_commands%2Fmob_termination_ctrl_status%2Fcmng_set.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Public key enumeration/ID is 5&lt;/p&gt;
&lt;p&gt;But here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/modem/modem_key_mgmt.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/include/modem/modem_key_mgmt.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The PUBLIC is 1.&lt;/p&gt;
&lt;p&gt;Which one is correct?&lt;/p&gt;
&lt;p&gt;The &amp;quot;BaltimoreCyber*.PEM&amp;quot; should be written as&amp;nbsp;&lt;span&gt;MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Under what ID, the self-signed certificate of the client should be written? under&amp;nbsp;MODEM_KEY_MGMT_CRED_TYPE_PUBLIC_CERT? Or just its public key?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In other ticket I wrote that I use the write() function to write the keys successfully, but when I compare them (with the cmp() function), it says that the keys do not match.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Danny&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/thread/286456?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2020 12:25:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78444489-0b2d-4edf-a534-97c7e6ea34b6</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi Danny,&lt;/p&gt;
[quote user="Danny Zadok"]When I use AT%CMNG=2,5659593,0 to read the certificate, it returns err[/quote]
&lt;p&gt;Did you turn off the modem with CFUN=4 first? Which error does it return?&lt;/p&gt;
&lt;p&gt;Do you know whether the certificate and private key was added correctly using modem_key_mgmt_write? Also, when using the Azure IoT Hub library, you need two certificates: the server certificate&amp;nbsp;&lt;a href="https://www.digicert.com/CACerts/BaltimoreCyberTrustRoot.crt.pem"&gt;Baltimore CyberTrust Root certificate&lt;/a&gt;&amp;nbsp;and the device certificate, which is used by Azure IoT Hub to authenticate the device. How to generate this is described&amp;nbsp;&lt;a href="https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-security-x509-get-started"&gt;here&lt;/a&gt;.&amp;nbsp;You can also provision the certificates using the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.99-dev1/nrf/include/net/azure_iot_hub.html#provisioning-of-the-certificates"&gt;LTE Link Monitor app in nRF Connect for Desktop&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Could you collect a&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/how-to-get-modem-trace-using-trace-collector-in-nrf-connect"&gt;modem trace&lt;/a&gt;&amp;nbsp;so we can take a look at the communication between the device and Azure IoT Hub?&lt;/p&gt;
&lt;p&gt;Please be aware that we have reduced staff due to holiday season, so response time might be slower than normal.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/thread/286435?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2020 11:30:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:866d0102-15dc-4007-9098-46efaa122cd5</guid><dc:creator>Danny Zadok</dc:creator><description>&lt;p&gt;One type:&amp;nbsp;&lt;span&gt;CONFIG_NET_NATIVE=y&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Help with nRF9160 connecting Azure</title><link>https://devzone.nordicsemi.com/thread/286434?ContentTypeID=1</link><pubDate>Wed, 23 Dec 2020 11:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:164532d5-d5ef-452f-b708-51c06c436bcf</guid><dc:creator>Danny Zadok</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;I would like to add some information.&lt;/p&gt;
&lt;p&gt;My application is based on the sample&amp;nbsp;v1.4.99-dev1\nrf\samples\nrf9160\azure_iot_hub&lt;/p&gt;
&lt;p&gt;I have added added the API modem_key_mgmt_write(), to place my self-signed certificate and private key in the modem.&lt;/p&gt;
&lt;p&gt;When I use AT%CMNG=2,5659593,0 to read the certificate, it returns error. I am not sure if this is the reason that my connection fails.&lt;/p&gt;
&lt;p&gt;Here is my prj.conf:&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# General config&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_LOG=y&lt;br /&gt;CONFIG_NEWLIB_LIBC=y&lt;br /&gt;#CONFIG_NO_OPTIMIZATIONS=y&lt;br /&gt;#CONFIG_ASSERT=y&lt;br /&gt;#CONFIG_REBOOT=y&lt;br /&gt;CONFIG_DEBUG=y&lt;br /&gt;CONFIG_PRINTK=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# Log level&lt;br /&gt;# For more verbose and detailed log output, &lt;br /&gt;# set the log level to DBG or INF&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_AZURE_IOT_HUB_LOG_LEVEL_DBG=y&lt;br /&gt;CONFIG_MQTT_LOG_LEVEL_DBG=y&lt;br /&gt;CONFIG_NET_LOG=y&lt;br /&gt;CONFIG_LTE_LINK_CONTROL_LOG_LEVEL_DBG=y&lt;br /&gt;CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y&lt;br /&gt;CONFIG_NET_SOCKETS_SOCKOPT_TLS=y&lt;br /&gt;CONFIG_LOG_MAX_LEVEL=4&lt;br /&gt;CONFIG_NET_CORE_LOG_LEVEL_DBG=y&lt;br /&gt;#CONFIG_NET_OFFLOAD_LOG_LEVEL_DBG=y&lt;br /&gt;#CONFIG_MODEM_LOG_LEVEL_DBG=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# Network Common (Offload as well as MCU)&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_NETWORKING=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# Network OFFLOAD (inside the modem)&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_NET_NATIVE=n&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# LTE link control&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_LTE_LINK_CONTROL=y&lt;br /&gt;CONFIG_LTE_NETWORK_MODE_LTE_M=y&lt;br /&gt;CONFIG_LTE_AUTO_INIT_AND_CONNECT=n&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# Modem and AT commands&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_AT_CMD_RESPONSE_MAX_LEN=2048&lt;br /&gt;CONFIG_MODEM_KEY_MGMT=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# BSD library&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_BSD_LIBRARY=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# DK&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_DK_LIBRARY=n&lt;br /&gt;CONFIG_DK_LIBRARY_INVERT_LEDS=n&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# AT commands interface&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_UART_INTERRUPT_DRIVEN=y&lt;br /&gt;CONFIG_AT_HOST_LIBRARY=y&lt;br /&gt;CONFIG_AT_CMD_THREAD_STACK_SIZE=2048&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# cJSON&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_CJSON_LIB=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# Azure Cloud&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_AZURE_IOT_HUB=y&lt;br /&gt;CONFIG_AZURE_IOT_HUB_DEVICE_ID_APP=y&lt;br /&gt;#CONFIG_AZURE_IOT_HUB_DEVICE_ID=&amp;quot;3526561&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;#-------------------------------------------------&lt;br /&gt;# Azure DPS option&lt;br /&gt;# Host name must be configured if DPS is not used&lt;br /&gt;#-------------------------------------------------&lt;br /&gt;CONFIG_AZURE_IOT_HUB_HOSTNAME=&amp;quot;xxxx.azure-devices.net&amp;quot;&lt;/p&gt;
&lt;p&gt;#-------------------------------------------------&lt;br /&gt;# Change the security tag to the tag where Azure &lt;br /&gt;# IoT Hub certificates are provisioned&lt;br /&gt;#-------------------------------------------------&lt;br /&gt;CONFIG_AZURE_IOT_HUB_SEC_TAG=565&lt;/p&gt;
&lt;p&gt;#-------------------------------------------------&lt;br /&gt;# Uncomment and configure the options below to use &lt;br /&gt;# DPS for device provisioning&lt;br /&gt;#-------------------------------------------------&lt;br /&gt;CONFIG_AZURE_IOT_HUB_DPS=y&lt;br /&gt;CONFIG_AZURE_IOT_HUB_DPS_ID_SCOPE=&amp;quot;yyyy&amp;quot;&lt;/p&gt;
&lt;p&gt;#----------------------------------------------------------&lt;br /&gt;# Settings, needed for Azure Device Provisioning Service&lt;br /&gt;#----------------------------------------------------------&lt;br /&gt;CONFIG_FLASH=y&lt;br /&gt;CONFIG_FLASH_MAP=y&lt;br /&gt;CONFIG_FCB=y&lt;br /&gt;CONFIG_SETTINGS=y&lt;br /&gt;CONFIG_SETTINGS_FCB=y&lt;br /&gt;CONFIG_MPU_ALLOW_FLASH_WRITE=y&lt;/p&gt;
&lt;p&gt;#-------------------------------------------&lt;br /&gt;# Heap and stacks&lt;br /&gt;# Extended memory heap size needed for &lt;br /&gt;# encoding nRF Cloud messages to JSON&lt;br /&gt;#-------------------------------------------&lt;br /&gt;CONFIG_HEAP_MEM_POOL_SIZE=4096&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>