This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Easiest way to subscribe to MQTT messages from Thingy91 on the nRF Cloud

Hi,

What's the easiest way to subscribe to the MQTT messages that the thingy91 sends to the nRF cloud?

I have tried setting it up with a node-red and a python client, but I'm never able to connect to the MQTT broker that is set up in the nRF cloud. I want to find out the easiest way to subscribe to these messages so that I can present them in a web application like node-red or similar.

The documentation that is found under APIs doesn't seem to help me, as I'm unable to connect to the broker. As I can see the data being sent to the nRF cloud, I figured it wouldn't be too difficult to just parse that data somewhere else.

Thanks

Best regards

Joakim Uddenfeldt

  • Hi Øyvind,

    Thank you for testing it out, it's much appreciated. It seems that I might ve done something incorrectly if you were able to get it working.

    I downloaded the certificates from the nRF Cloud Account, but perhaps I should do it using the curl command? It should be the same I assume?

    I get an AT OK from the Link Monitor when I load the certificates, so it should be correct and I'm also able to read messages from my nRF Cloud account. I will have a look at your output above to see if I have done something incorrectly

    Best regards

    Joakim Uddenfeldt

  • Hmm it seems that it might be something wrong with my private key. When I check my CA certificate and Client certificate, with a certificate checker, I get an OK back. However when I check my private key, I get an error back. If this is the case, it makes sense why I can't get it to work. As I mentioned earlier, I'm using nRF cloud to download the certificates and then load the .json file in the certificates manager, this helps me copy the certificates in the right format. When I use the curl command, I only receive a private key, which also gets an error when I check it.

  • When you imported the .json file to the Certificate Manager, did you also click on Update Certificates? Hence the AT OK from Link Monitor.

    I have forwarded this topic to our nRF Cloud team and will get back to you with an answer.

  • Hi Øyvind,

    Yes, I did exactly that and I also received an AT OK from the Link Monitor. I will test it out today again, as I re-did this step yesterday, but then ended up with the POLLHUP error which I later solved.

    Thanks for forwarding this issue, I appreciate that.

    Best regards

    Joakim Uddenfeldt

  • Hi Øyvind,

    Unfortunately i'm still unable to subscribe to anything that my Thingy91 is sending. I have tested that my tools work with another MQTT broker and it works fine. I'm still uncertain what the issue can be, but the error I receive is that I can't connect to the broker, which might be due to the certification error that I pointed out above.

    As I mentioned earlier, two of my 3 certificates checks out where I can read information such as

    Common Name: nrf-IMEI
    Organization: Nordic Semiconductor ASA
    Locality: Trondheim
    State: Trondelag
    Country: NO
    Valid From: October , 2019
    Valid To: September , 2049
    Issuer: Nordic Semiconductor
    Serial Number: serial number
Related