BL653 crashes when working with CONFIG_MCUMGR_SMP_BT & CONFIG_ESB

Hello everyone,

We're trying to create an application that has 2 modes, one is running our regular application and upon a special command, it switches to a "DFU" (via device manager) mode.

In the DFU mode I've adapted the example here:
https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/peripheral_lbs/src/main.c

It happens that this application requires the prj.conf directives: CONFIG_ESB & CONFIG_MCUMGR_SMP_BT.

I've compiled and flashed the application to the device. Application starts and automatically starts to listen for ESB packets(PRX).

As soon as it gets a packet, the application crashes without any information - even though I'm not advertising or working with regular BT (only ESB for BLE).

Disabling the directive CONFIG_MCUMGR_SMP_BT leads to a working version (but without DFU support).

Is there a way to overcome this issue?

Alternative, is there an example of how to access the mcuboot and switch image slots during runtime?

Parents Reply Children
  • Hi Sigurd, 

    just clarifying a bit this scenario. This BL653 (nRF52833) exchange data with another device BL654 (nRF52840).
    Periodically, BL654 broadcasts a packet (4-bytes length on RF channel 22) containing the operation for this cycle.

    My goal is to have the application on BL653 device working as usual, but if BL654 sends a special value to BL653 I must stop all ESB tasks (esb_stop_rx()) and immediately call this sequence of commands so I can interface using the iOS/Android app Device Manager (Nordic) using my phone in order to upload a new image, test or confirm:

        os_mgmt_register_group();
    	img_mgmt_register_group();
    	smp_bt_register();
    	bt_conn_cb_register(&conn_callbacks);
    	if (IS_ENABLED(CONFIG_BT_LBS_SECURITY_ENABLED)) {
    		bt_conn_auth_cb_register(&conn_auth_callbacks);
    	}
    
    	err = bt_enable(NULL);
    
    	if (IS_ENABLED(CONFIG_SETTINGS)) {
    		settings_load();
    	}
    	err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad),
    			      sd, ARRAY_SIZE(sd));

    But what I've found out is that in case I compile my project using prj.conf CONFIG_MCUMGR_SMP_BT=y, even if bt_enable() was never called, every ESB packet that I collect leads to a crash.

    I'm open to an alternative solution for this issue as well...

Related