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

NRF5 SDK 14.2 IoT MQTT, app_scheduler, and TLS

I am developing a general case application for several devices I am developing. The application template will then be modified in small ways to support different hardware sensors / devices. The application setup as follows:

-NRF52832 / PCA10040 for dev

-MQTT for communication, sent over lwip with ble 6lowpan for transport

-Raspberry Pi 3 as border router / gateway for ble 6lowpan connections

-Linux cloud server with RabbitMQ running MQTT plugin.

I am currently developing against the IoT SDK 0.9x, which has worked very well as an exploration.

The application subscribes and publishes to multiple topics, using app_fifo work queue to manage tasks, since sometimes all mqtt clients are busy.

I noticed that since I began my project, the IoT components have been improved, a new softdevice released, and has been moved into the new NRF5 SDK 14.2.x. This is great news, but I have some questions. It is mentioned that IoT examples have begun using the app_scheduler.

1. I noticed in the release notes for SDK 14.2 that it is not possible to use the app scheduler with mbedtls! No further information is given in the release notes. Could someone provide further information?

2. Would I be able to work a different tls implementation into nordic's mqtt fairly easily?

Edit: clarity, brevity

Parents
  • Since makeing this request I upgraded my project from the old IoT SDK and prototype softdevice to use NRF5 SDK 14.2.x and the S132 5.0 softdevice. I also reworked my application to use the app_scheduler library for scheduling tasks during interrupts. This worked very well and brought some nice improvements in my application design, as well as improved the overall stability / consistency of my application.

    My questions as listed above still remain, but I did do some more digging, and for the most part it looks like I could bring in a different TLS implementation (wolfSSL?) to the Nordic MQTT client library without too much trouble, although I would still like some opinions on that.

  • The issue with mbedtls is that it contains an internal loop that will block scheduled RX events. The SDK is written to be modular, making it easy to change the backend of the modules. There is a nrf_tls abstraction layer that can be found in components/drivers_ext/tls folder, that you can use for implementing another TLS backend. Please have a look at how this is done inside the mbedtls directory.

Reply Children
No Data
Related