Openthread support for MQTT

542 views
Skip to first unread message

Noble Nile

unread,
Aug 9, 2019, 9:14:46 AM8/9/19
to openthread-users
Hi Jonathan, 

Iam new to openthread. 

Could you please provide some pointers  to work with MQTT using openthread library? 


Thank you

Jonathan Hui

unread,
Aug 9, 2019, 12:27:46 PM8/9/19
to Noble Nile, openthread-users
Thanks for your interest in OpenThread.

Some links I hope you will find helpful:
  1. We actually demonstrated MQTT with OpenThread at Google I/O 2019 (see Connect Thread Devices to the Cloud with IoT Core).
  2. The demonstration code is available at https://github.com/openthread/ot-rtos
  3. Nordic posted some content related to the Google I/O demo (blog and blog)
  4. Nordic also has an MQTT-SN example, if you are interested in MQTT-SN.
Hope that helps.

--
Jonathan Hui

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/CAJcM2poH4JJaXayuUvoFiCDH2w7ELMnySAUkwyQ1mbrLJJQQqg%40mail.gmail.com.

Francis David

unread,
Aug 10, 2019, 2:07:15 PM8/10/19
to openthread-users
The easiest way (at least for me) for using MQTT on Openthread was using Openthread with MQTT-SN (examples available at the Nordic SDK) and the MQTT-SN to MQTT bridge running on the OBR to bridge topics. It works just fine and even solves the IPV4 to IPV6 bridging issues since the MQTT-SN gateway will also bridge IPV4 and IPv6.

William Wang

unread,
Sep 14, 2021, 1:52:02 AM9/14/21
to openthread-users
Hi Jonathan ✋

I know this is an old topic. I'm trying to integrate a TCP stack into OT for my application.

I'm wondering if the code in (https://github.com/openthread/ot-rtos) still works to demo a secured MQTT connection over Thread to cloud? 

I also know that TCPlp is being integrated now. So what's your opinion between lwIP vs TCPlp? Which is a better starting point?

Thanks,
Will

Jonathan Hui

unread,
Sep 14, 2021, 4:30:26 PM9/14/21
to William Wang, openthread-users
The ot-rtos repo should work, but it hasn't been updated in over a year. Because ot-rtos integrates OpenThread with LwIP, the examples can leverage existing MQTT libraries.

TCPlp aims to bring a full-featured TCP implementation to OpenThread, which should provide overall better performance especially in a mesh network setting. However, the TCP APIs are following the OpenThread style. The MQTT implementation would need to be adapted to TCPlp's APIs.

Hope that helps.

--
Jonathan Hui


William Wang

unread,
Sep 15, 2021, 1:58:52 PM9/15/21
to Jonathan Hui, openthread-users
Thank you for your helpful reply! It's a bit confusing to me after I spent some time studying the Matter GitHub which includes lwIP and OT. Assuming OpenThread will be used a lot with a Matter layer, why bother to have TCPlp built into OT?

Will

Jonathan Hui

unread,
Sep 15, 2021, 2:09:33 PM9/15/21
to William Wang, openthread-users
As mentioned previously, TCPlp is a full-featured TCP implementation that leverages FreeBSD that includes a lot of mechanisms that are beneficial for improving performance on Thread networks.

For more information, check out this NSDI'20 publication: Performant TCP for Low-Power Wireless Networks.

--
Jonathan Hui


William Wang

unread,
Sep 15, 2021, 2:33:51 PM9/15/21
to Jonathan Hui, openthread-users
Thanks, I read the paper. Makes a lot more sense now. 

Looking forward to seeing it in action!

Will
Reply all
Reply to author
Forward
0 new messages