Combining MQTT over wifi with OTA BLE

Hi, i wanted to add OTA DFU to an MQTT application i coded using zephyr APIs on my nrf52840DK with nrf7002ek. 

The problem is that MQTT takes already a lot of RAM and flash memory that eventually there's no more room for BLE functionalities, is there a way to have a "lighter" MQTT application, or is it just impossible to have them both?

Thanks in advance,

Kind regrards,

Parents
  • Hello,

    Yes, of course, it's a challenging task to fit both mqtt and BLE into a device with limited memory like the nRF52840. But I recommend you follow the memory optimisation guide, which will provide you with some strategies to optimise your memory usage. When it comes to DFU, you can keep the secondary slot in an external flash, which will increase the available flash area for the application.

    You can also consider using an external flash for nRF52840; see this page. Have you generated the memory report? What does it say? See this page, which describes the OTA DFU. Go through this course to get an idea of the minimal configuration for doing the OTA DFU.

     

    Kind Regards,

    Abhijith

Reply
  • Hello,

    Yes, of course, it's a challenging task to fit both mqtt and BLE into a device with limited memory like the nRF52840. But I recommend you follow the memory optimisation guide, which will provide you with some strategies to optimise your memory usage. When it comes to DFU, you can keep the secondary slot in an external flash, which will increase the available flash area for the application.

    You can also consider using an external flash for nRF52840; see this page. Have you generated the memory report? What does it say? See this page, which describes the OTA DFU. Go through this course to get an idea of the minimal configuration for doing the OTA DFU.

     

    Kind Regards,

    Abhijith

Children
  • Hi menon, thank you for your response and the helpful resources you provided,

    i've been able to get my application to build (an application combining FOTA over BLE and MQTT) but when i flash it to the board it gets stuck on the bootloader showing me this : 

    o i don't know is this because of the excessive RAM usage of the application ( this is what i get when i build    RAM:      233952 B       256 KB     89.25% ), or is there something wrong i did.

    Thanks in advance,

    have a nice weekend.

Related