<?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>SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43939/ssl-certificate-verify-failure</link><description>Hello, 
 I&amp;#39;m using the nRF9160DK (PCA10090 0.8.2). I was able to see the data coming from the nRF9160DK in the nrfcloud, but now I want to be able to see the data published by the nRF9160DK in another place (for example in a terminal). Using the SDK located</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Mar 2019 09:58:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43939/ssl-certificate-verify-failure" /><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/175867?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 09:58:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13f7f265-9db7-4dcd-ba82-dfd9744f3b91</guid><dc:creator>Markus Tacker (he/him)</dc:creator><description>&lt;p&gt;Using these steps I achieved what you were trying to to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I created a new device and credentials using the &lt;a href="https://docs.api.nrfcloud.com/MQTT"&gt;Device API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Use the device id as the client id (note that you must use it exactly as returned in the response, e.g. &amp;quot;c35c5194-c91e-4e52-a8ec-4434850819d7&amp;quot;.&lt;/li&gt;
&lt;li&gt;Use&amp;nbsp;&lt;a href="https://www.amazontrust.com/repository/AmazonRootCA1.pem"&gt;https://www.amazontrust.com/repository/AmazonRootCA1.pem &lt;/a&gt;as ca.txt&lt;/li&gt;
&lt;li&gt;Use the returned certificate and private key from (2), I replaced the \n with line breaks int the files&lt;/li&gt;
&lt;li&gt;Use &amp;quot;prod/&amp;lt;tenantId&amp;gt;/m/#&amp;#39; to subscribe&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
import time

myMQTTClient = AWSIoTMQTTClient(&amp;quot;c35c5194-c91e-4e52-a8ec-4434850819d7&amp;quot;) # (2)
myMQTTClient.configureEndpoint(&amp;quot;a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com&amp;quot;, 8883)
myMQTTClient.configureCredentials(&amp;quot;ca.txt&amp;quot;, &amp;quot;privatekey.txt&amp;quot;, &amp;quot;certificate.txt&amp;quot;) # (4)
myMQTTClient.configureOfflinePublishQueueing(-1)  # Infinite offline Publish queueing
myMQTTClient.configureDrainingFrequency(2)  # Draining: 2 Hz
myMQTTClient.configureConnectDisconnectTimeout(10)  # 10 sec
myMQTTClient.configureMQTTOperationTimeout(5)  # 5 sec
# Custom MQTT message callback
def customCallback(client, userdata, message):
    print(&amp;quot;Received a new message: &amp;quot;)
    print(message.payload)
    print(&amp;quot;from topic: &amp;quot;)
    print(message.topic)
    print(&amp;quot;--------------\n\n&amp;quot;)
print(&amp;quot;Step1&amp;quot;)
myMQTTClient.connect()
print(&amp;quot;Connected&amp;quot;)
print(&amp;quot;Step2&amp;quot;)
myMQTTClient.subscribe(&amp;quot;prod/55e78cd0-8fe0-4da8-b73f-0aa72712d886/m/#&amp;quot;, 1, customCallback)
print(&amp;quot;Subscribed&amp;quot;)
time.sleep(2)

while True:
    time.sleep(1)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now when I run this script and my 91 DK is connected and sending data, I will see this output:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Received a new message: 
b&amp;#39;{&amp;quot;appId&amp;quot;:&amp;quot;GPS&amp;quot;,&amp;quot;data&amp;quot;:&amp;quot;$GPGGA,134714.200,6325.283,N,01026.197,E,1,12,1.0,0.0,M,0.0,M,,*69&amp;quot;,&amp;quot;messageType&amp;quot;:&amp;quot;DATA&amp;quot;}&amp;#39;
from topic: 
prod/55e78cd0-8fe0-4da8-b73f-0aa72712d886/m/d/nrf-352656100005076/d2c
--------------


Received a new message: 
b&amp;#39;{&amp;quot;appId&amp;quot;:&amp;quot;FLIP&amp;quot;,&amp;quot;data&amp;quot;:&amp;quot;UPSIDE_DOWN&amp;quot;,&amp;quot;messageType&amp;quot;:&amp;quot;DATA&amp;quot;}&amp;#39;
from topic: 
prod/55e78cd0-8fe0-4da8-b73f-0aa72712d886/m/d/nrf-352656100005076/d2c
--------------


Received a new message: 
b&amp;#39;{&amp;quot;appId&amp;quot;:&amp;quot;FLIP&amp;quot;,&amp;quot;data&amp;quot;:&amp;quot;NORMAL&amp;quot;,&amp;quot;messageType&amp;quot;:&amp;quot;DATA&amp;quot;}&amp;#39;
from topic: 
prod/55e78cd0-8fe0-4da8-b73f-0aa72712d886/m/d/nrf-352656100005076/d2c
--------------
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/175833?ContentTypeID=1</link><pubDate>Wed, 13 Mar 2019 08:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:005568c9-9b05-46e9-8b6f-bc53e81423a6</guid><dc:creator>Thom van Zeijl</dc:creator><description>&lt;p&gt;I used the Link Monitor (on native Windows 10 instead of the ubuntu VM) and I followed the steps in the link you mentioned. When I send an AT command to the device, it returns:&amp;nbsp;&lt;span&gt;Error: &amp;#39;AT+CFUN? &amp;#39; timed out. I am only able to send AT commands to the device when the AT client sample app is installed. In the top right, only the UART box is green, the Modem, UICC and LTE boxes are red and the PDN box is green. I changed the periodic signal quality request to 1sec. In the chart tab, it does not give any data. This indicates that there is no connection. But when I go to nrfcloud, I can see the device updating and it also returns the simulated orientation of the nrf9160dk. So there is a connection, otherwise the nrfcloud would not return any data. When the nrf9160dk is connected and gives information in nrfcloud, led 4 is turned on.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am using a KPN simcard (of type K019) instead of the iBasis sim card that came with the dev kit. The iBasis sim card does not work here in the Netherlands. I don&amp;#39;t think this should matter.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/175116?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 16:24:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1585209a-d525-49e5-b3f0-85f3d42a3df5</guid><dc:creator>Markus Tacker (he/him)</dc:creator><description>&lt;p&gt;A timeout typically means that there is something not working with the physical connection. Try the Link Monitor to verify that you are connected:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/tutorials/b/getting-started/posts/getting-started-with-nrf9160-dk#h74sjqflkkfcem3szl96xz8usugf6t"&gt;devzone.nordicsemi.com/.../getting-started-with-nrf9160-dk&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/175114?ContentTypeID=1</link><pubDate>Fri, 08 Mar 2019 16:16:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5aa48941-98a3-4d3d-ade1-689438dd0583</guid><dc:creator>Thom van Zeijl</dc:creator><description>&lt;p&gt;Thanks for the reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tried subscribing to:&lt;/p&gt;
&lt;p&gt;prod/MY_UUID/&lt;/p&gt;
&lt;p&gt;prod/MY_UUID/a&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prod/MY_UUID/a/&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prod/MY_UUID/a/alerts&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prod/MY_UUID/a/alerts/&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;prod/MY_UUID/a/alerts/notifications&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But none of them worked. I always got the timeout error. So as you have indicated it looks like something else is going on but I do not know what. Any help would be appreciated!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/173302?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 16:40:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6943155b-b7cd-46d9-b7cd-9c3f2b9e15ae</guid><dc:creator>Markus Tacker (he/him)</dc:creator><description>&lt;ol&gt;
&lt;li&gt;on the nrfcloud.com MQTT broker you are only authorized to subscribe to topics&amp;nbsp;&lt;strong&gt;below&lt;/strong&gt; your mqttTopicPrefix, e.g.&amp;nbsp;&amp;quot;prod/762bfc32-d338-4d5a-bd03-1e504e013846/&amp;quot; (762bfc32-d338-4d5a-bd03-1e504e013846 is a v4 UUID which will be different for you). So make sure that you concatenate your personal&amp;nbsp;mqttTopicPrefix with any topic you want to subscribe to. You can request your personal&amp;nbsp;mqttTopicPrefix using the&amp;nbsp;&lt;a href="https://api.nrfcloud.com/v1/account"&gt;https://api.nrfcloud.com/v1/account&lt;/a&gt;&amp;nbsp;endpoint as explained here:&amp;nbsp;&lt;a href="https://docs.api.nrfcloud.com/MQTT"&gt;https://docs.api.nrfcloud.com/MQTT&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;if you subscribe to an MQTT topic which you are not authorized to, the broker will&amp;nbsp;&lt;strong&gt;disconnect&lt;/strong&gt; you. Since you are seeing a timeout on your end, I suspect something else is going on.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/173298?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2019 16:05:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d28676d8-9488-4924-a153-53215e83859d</guid><dc:creator>Thom van Zeijl</dc:creator><description>&lt;p&gt;Thanks for your response. Using the new root certificate I no longer get a verification failure. However, a new error occurs. See:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Step1
Connect
No handlers could be found for logger &amp;quot;AWSIoTPythonSDK.core.protocol.mqtt_core&amp;quot;
Traceback (most recent call last):
  File &amp;quot;./client3.py&amp;quot;, line 31, in &amp;lt;module&amp;gt;
	myMQTTClient.subscribe(&amp;quot;$SYS/#&amp;quot;, 1, customCallback)
  File &amp;quot;/home/thom/Documents/nRF9160devkit/eclipse/aws-iot-device-sdk-python/AWSIoTPythonSDK/MQTTLib.py&amp;quot;, line 668, in subscribe
	return self._mqtt_core.subscribe(topic, QoS, callback)
  File &amp;quot;/home/thom/Documents/nRF9160devkit/eclipse/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/mqtt_core.py&amp;quot;, line 303, in subscribe
	raise subscribeTimeoutException()
AWSIoTPythonSDK.exception.AWSIoTExceptions.subscribeTimeoutException
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 801, in __bootstrap_inner
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 754, in run
  File &amp;quot;/home/thom/Documents/nRF9160devkit/eclipse/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/internal/workers.py&amp;quot;, line 147, in _dispatch
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 289, in __exit__
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 216, in __exit__
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 203, in release
&amp;lt;type &amp;#39;exceptions.TypeError&amp;#39;&amp;gt;: &amp;#39;NoneType&amp;#39; object is not callable
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;&lt;span style="font-weight:400;"&gt;No handlers could be found for logger &amp;quot;AWSIoTPythonSDK.core.protocol.mqtt_core&amp;quot;&amp;quot; error is not important. The error below it is.&amp;nbsp;&amp;quot;subscribeTimeoutException()&amp;quot; is a problem. Somehow the script is connected to the aws server but it can not subscribe to any topic. The topic the script should subscribe to is &amp;quot;$SYS/#&amp;quot; which is as far as I know the topic where basic information about the broker is published. The same error also occurs when the topic is different (for example the &amp;quot;alerts&amp;quot; and &amp;quot;messagePrefix&amp;quot; topics retrieved from the commands at&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://docs.api.nrfcloud.com/MQTT/"&gt;https://docs.api.nrfcloud.com/MQTT/&lt;/a&gt;&amp;nbsp;).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;The code for the script is slightly extended from the one I posted originally. The extension is as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="python"&gt;def customCallback(client, userdata, message):
	print(&amp;quot;Received a new message: &amp;quot;)
	print(message.payload)
	print(&amp;quot;from topic: &amp;quot;)
	print(message.topic)
	print(&amp;quot;--------------\n\n&amp;quot;)
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I&amp;#39;ve also tested the script located at&amp;nbsp;&lt;a href="https://github.com/aws/aws-iot-device-sdk-python/blob/master/samples/basicPubSub/basicPubSub.py"&gt;https://github.com/aws/aws-iot-device-sdk-python/blob/master/samples/basicPubSub/basicPubSub.py&lt;/a&gt;&amp;nbsp;This script gives basically the same error:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;Traceback (most recent call last):
  File &amp;quot;./basicpubsub.py&amp;quot;, line 110, in &amp;lt;module&amp;gt;
	myAWSIoTMQTTClient.subscribe(topic, 0, customCallback)
  File &amp;quot;/home/thom/Documents/nRF9160devkit/eclipse/aws-iot-device-sdk-python/AWSIoTPythonSDK/MQTTLib.py&amp;quot;, line 668, in subscribe
	return self._mqtt_core.subscribe(topic, QoS, callback)
  File &amp;quot;/home/thom/Documents/nRF9160devkit/eclipse/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/mqtt_core.py&amp;quot;, line 303, in subscribe
	raise subscribeTimeoutException()
AWSIoTPythonSDK.exception.AWSIoTExceptions.subscribeTimeoutException
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 801, in __bootstrap_inner
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 754, in run
  File &amp;quot;/home/thom/Documents/nRF9160devkit/eclipse/aws-iot-device-sdk-python/AWSIoTPythonSDK/core/protocol/internal/workers.py&amp;quot;, line 147, in _dispatch
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 289, in __exit__
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 216, in __exit__
  File &amp;quot;/usr/lib/python2.7/threading.py&amp;quot;, line 203, in release
&amp;lt;type &amp;#39;exceptions.TypeError&amp;#39;&amp;gt;: &amp;#39;NoneType&amp;#39; object is not callable
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Does anyone know how to solve this?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SSL: Certificate verify failure</title><link>https://devzone.nordicsemi.com/thread/172369?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 17:18:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25daedf3-7f41-4086-a14a-fa42e0a63a9d</guid><dc:creator>Markus Tacker (he/him)</dc:creator><description>&lt;p&gt;The root certificate mentioned in&amp;nbsp;&lt;a href="https://github.com/aws/aws-iot-device-sdk-python#id3"&gt;https://github.com/aws/aws-iot-device-sdk-python#id3&lt;/a&gt;&amp;nbsp;is deprecated and should not be used.&lt;/p&gt;
&lt;p&gt;Go to&amp;nbsp;&lt;a href="https://docs.aws.amazon.com/iot/latest/developerguide/managing-device-certs.html"&gt;https://docs.aws.amazon.com/iot/latest/developerguide/managing-device-certs.html&lt;/a&gt;&amp;nbsp;and download the key for the&amp;nbsp;&lt;b&gt;Amazon Trust Services Endpoints.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This one should work for you:&amp;nbsp;&lt;a href="https://www.amazontrust.com/repository/AmazonRootCA1.pem"&gt;https://www.amazontrust.com/repository/AmazonRootCA1.pem&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>