MQTT Client over BLE, possible using nrfConnect SDK?

Hello

I would like to build an application that will publish data to an MQTT broker.
I found the MQTT Client - Publisher Example, that shows how to build a BLE MQTT clients, but it is for the nRF5 SDK v16.0.0.

I would like to ask if it is possible using the nRF52840 processor, to build a BLE MQTT client that publish data using an external BLE enabled router.

So the setup would be, connect the nRF52840 using Bluetooth to a router (with an internet connection) and publish data to an MQTT Broker.

Thank you

Parents
  • Hi Avgerinos89,

    Are you asking for this information conceptually? Or are you asking if a solution is already setup to support MQTT over BLE?

    Conceptually, MQTT "over BLE" is possible. You just need to implement the necessary adaptations of the MQTT to be transport over a BLE Service.

    The nRF5 SDK example that you found shows one approach to it. In that setup, MQTT actually runs on an IP stack, which runs over BLE 6LoWPAN (refer to the Introduction to BLE IoT page).

    This approach is unfortunately not further pursued by Nordic, and we no longer have any support for it in nRF5 SDK v17.x.y and the newer nRF Connect SDK. We do not recommend you develop based on this abandoned experimental attempt.

    Beyond the concept level, things depend on the details of your project. Without more information, it would be difficult to discuss further. Please feel free to let me know if you want to discuss anything related, but I would need some more information.

    Hieu

  • Hello Hieu,

    I was looking for a solution to publish data to an MQTT server using a Nordic processor. When I came across the  Introduction to BLE IoT page I thought that this might be possible using an IoT network using BLE links, as in the example.

    I thought that maybe a solution is already setup to support MQTT over BLE, or if there is any example using the newer nRF Connect SDK.

    I can see that there is no more support for such an implementation, Is there any other way to publish data to an MQTT server using the 2.4GHz radio that its in the Nordic processors? or would you have any other suggestions for such an implementation?

    Thank you in advance!

  • Hi Avgerinos89,

    To my knowledge, other than the examples in the nRF5 SDK v16.0.0, we don't have anything else that directly solve your issue like this. As you might have already known, in this solution, MQTT messages are sent from the device to a BLE-internet router. Do you already have an equivalent router solution and do you have control over what such a router does?

    As mentioned in the DevZone answer that I linked, one of the reasons Nordic didn't follow that direction anymore is because Thread supports much of the same use cases. Have you checked whether the Thread protocol is a better suit for your need?

    In the nRF Connect SDK, we support MQTT, but it is done on nRF91 and nRF7002 solutions, which are LTE and WiFi solutions respectively

  • Hi Avgerinos89,

    As explained previously, we chose Thread as the alternative to 6LoWPAN over BLE; and I found some recent info about MQTT over Thread.

    In the nRF Connect SDK (NCS)'s Thread solution, UDP is already supported, and TCP supported is experimental. A complete sample solution is not available, but it is possible to setup MQTT-SN over UDP, or MQTT over TCP with this.

    Here is a DevZone answer on the topic of MQTT over Thread that might be of interested to you:  RE: Publishing MQTT messages from Thread device using NCS .

  • Hello Hieu,

    Thank you for all the information. Thread looks like a possible alternative.

    By looking at the alternatives, since we can have access to a Wi-Fi network, probably the way to go is to use the nRF7002 solution, that has MQTT support.

  • Hi Avgerinos89,

    It's good to know that the information I gave is of help to you. Please feel free to close this question at your inconvenience or let me know if you have any further questions.

Reply Children
No Data
Related