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,

  • Hi Abhijith,

    thanks for your response, in fact everything was working fine when it was only a ble application with FOTA but once i added MQTT to the app it started acting this way so idk what went wrong.

    kind regards,

  • Hello,

    The RAM usage of your application is at 89.25%, which is quite high. Is there any error message inside the logs? I recommend checking the logs from both sides, which are from the nRF side as well as from the device on which you are uploading the image. If you are using any nRF mobile application, go through the logs and see if there is anything suspicious or any error messages. In the nRF Connect app, you can slide the screen to the right side to see the logs. I recommend uploading the logs here.

    Kind Regards,

    Abhijith

  • Hello again,

    in fact i was able to get over this problem but i got a new one : 

      

    i suspect its because of the huge RAM usage (the MQTT program works perfectly fine with FOTA over ble), but i'm not quite sure, what do you think?

    thanks in advance,

    kind regards,

  • Hello,

    Could you paste the whole log here? Use the insert tab to do that. It's easier to go through the logs than a screenshot.

    Kind Regards,

    Abhijith

  • Hi, yes sure, 

    uart:~$ *** Booting nRF Connect SDK v2.5.2 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    I: Jumping to the first image slot

    [00:00:00.003,326] <inf> wifi_nrf: SPIM spi@4002f000: freq = 8 MHz

    [00:00:00.003,356] <inf> wifi_nrf: SPIM spi@4002f000: latency = 0

    [00:00:00.097,167] <err> wifi_nrf: nrf_wifi_fmac_fw_init: Init RX failed

    [00:00:00.097,625] <err> wifi_nrf: nrf_wifi_fmac_dev_init: nrf_wifi_fmac_fw_init failed

    [00:00:00.097,656] <err> wifi_nrf: nrf_wifi_fmac_dev_add_zep: nrf_wifi_fmac_dev_init failed

    [00:00:00.097,686] <err> wifi_nrf: nrf_wifi_if_init_zep: nrf_wifi_fmac_dev_add_zep failed

    [00:00:00.097,839] <err> wifi_nrf: nrf_wifi_if_start_zep: Invalid MAC address: <unknown>

    [00:00:00.102,264] <inf> fs_nvs: 2 Sectors of 4096 bytes
    [00:00:00.102,264] <inf> fs_nvs: alloc wra: 0, fa0
    [00:00:00.102,294] <inf> fs_nvs: data wra: 0, 194
    [00:00:00.102,661] <inf> MQTT_BLE_FOTA: BLE service customized

    [00:00:00.102,905] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    8d dc 02 cb 49 26 c6 47 1a 6a 3d 4e 2f d1 a4 f2 |....I&.G .j=N/...
    2e 38 1b 75 |.8.u
    [00:00:00.105,590] <inf> bt_hci_core: Identity: EE:1E:F3:8D:55:B9 (random)
    [00:00:00.105,621] <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x1168, manufacturer 0x0059
    [00:00:00.105,651] <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0x1168
    [00:00:00.105,651] <inf> MQTT_BLE_FOTA: Bluetooth initialized

    [00:00:00.106,475] <inf> MQTT_BLE_FOTA: ********** Advertising successfully started ***************************

    uart:~$ 

    i have already the wifi SSID and Password registered,

    Thanks again. 

    Kind regards,

Related