<?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>NRF52840 + MQTT/COAP</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105692/nrf52840-mqtt-coap</link><description>I want to connect my nrf52840dk to cloud backend over openthread. It seems that COAP is the most natural selection for a device this small, but major cloud providers all only support MQTT natively. I checked nordics cloud offerings and it looks like they</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Nov 2023 12:24:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105692/nrf52840-mqtt-coap" /><item><title>RE: NRF52840 + MQTT/COAP</title><link>https://devzone.nordicsemi.com/thread/455746?ContentTypeID=1</link><pubDate>Wed, 15 Nov 2023 12:24:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bcfe4ea-4286-499c-9304-7d10ed1e8bd0</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Josh_s,&lt;/p&gt;
[quote userid="114515" url="~/f/nordic-q-a/105692/nrf52840-mqtt-coap"]I want to connect my nrf52840dk to cloud backend over openthread. It seems that COAP is the most natural selection for a device this small, but major cloud providers all only support MQTT natively.&amp;nbsp; I checked nordics cloud offerings and it looks like they only support&amp;nbsp;COAP for certain boards (not the nrf52840). Is that correct?[/quote]
&lt;p&gt;This is true. nRF Cloud APIs are mostly&amp;nbsp;designed for&amp;nbsp;nRF91x cellular devices for device management and location services.&lt;/p&gt;
[quote userid="114515" url="~/f/nordic-q-a/105692/nrf52840-mqtt-coap"]Are there are other common options for a COAP&amp;nbsp;cloud IOT service?&amp;nbsp; Previously, google cloud had leveraged the opensource coap implementation californium in one of the GCP IOT core examples, but they&amp;#39;ve since closed down GCP IOT core and I don&amp;#39;t want to spend much time familiarizing with californium myself if possible, so hoping there&amp;#39;s a simpler solution available.[/quote]
&lt;p&gt;I think it is easy to build a CoAP server, you can refer to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/94519/openthread-coap-client-to-a-public-server-over-internet"&gt;(+) OpenThread COAP Client to a public server over Internet - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&amp;nbsp; about how to connect with it, but you need to design the processing logic for your application,&amp;nbsp;which is your service APIs running on top of CoAP/UDP/IP protocols.&amp;nbsp;&lt;/p&gt;
[quote userid="114515" url="~/f/nordic-q-a/105692/nrf52840-mqtt-coap"]That said, is MQTT over openthread direct to AWS IOT core an option for the NRF52840? And if not, why not? There aren&amp;#39;t any nrf52840-&amp;gt;AWS examples in the nordic sdk, so I&amp;#39;m wondering if this is due to device limitations.[/quote]
&lt;p&gt;Yes, TCP is too heavy for resource-limited IoT devices, so protocols like &lt;b&gt;Constrained Application Protocol&lt;/b&gt;&lt;span&gt;&amp;nbsp;(CoAP) are designed on top of UDP for resource-constrained IoT device usage. It is possible to run any protocols on top IPv6 through the Thread network, but you may experience high power consumption, low stable connection issues and so on for your IoT application.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We currently do not have a sample for&amp;nbsp;MQTT on the Thread network.&amp;nbsp;You can find many references from the following links:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://groups.google.com/g/openthread-users/search?q=MQTT"&gt;https://groups.google.com/g/openthread-users/search?q=MQTT&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://github.com/openthread/openthread/issues?q=MQTT"&gt;https://github.com/openthread/openthread/issues?q=MQTT&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://github.com/orgs/openthread/discussions/8733"&gt;MQTT support &amp;middot; openthread &amp;middot; Discussion #8733 (github.com)&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/openthread/openthread/issues?q=MQTT"&gt;&lt;span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/90352/error--22-in-mqtt_connect---nrf52840dk-with-azure-iot-hub-using-openthread-and-tcp"&gt;(+) Error -22 in mqtt_connect() - nRF52840dk with Azure IoT Hub using OpenThread and TCP - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>