DFU BLE bootloader doesn't seem to work

I am trying to implement the smp_svr example as described here: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/mgmt/mcumgr/smp_svr/README.html.

I have successfully built and flashed the MCU bootloader. (to a nRF52840dk)

I have successfully built, the mcumgr.

I have successfully built, signed, and flashed the smp_svr.

At this point I looked at my nRF_CONNECT_FOR_MOBILE scanner but I do not see the device.

I modified the smp_svr bluetooth.c as follows:

/*
static const struct bt_data ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
BT_DATA_BYTES(BT_DATA_UUID128_ALL,
0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86,
0xd3, 0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d),
};
*/
static const struct bt_data ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)),
BT_DATA_BYTES(BT_DATA_UUID128_ALL,
0x84, 0xaa, 0x60, 0x74, 0x52, 0x8a, 0x8b, 0x86,
0xd3, 0x4c, 0xb7, 0x1d, 0x1d, 0xdc, 0x53, 0x8d),
BT_DATA(BT_DATA_NAME_COMPLETE, "Zephyr_DFU", 8),
};

This I did because I was unsure what the default advertising name was.

I then rebuilt, resigned, and re-flashed.

I still did not see the the device on my scanner.

When I attempt to flash with mcumgr It doesn't connect.

sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='Zephyr' echo hello
hello
Error: Failed to connect to peer after 10s

and

sudo ~/go/bin/mcumgr --conntype ble --connstring ctlr_name=hci0,peer_name='ZephyrDFU' echo hello
Error: Failed to connect to peer after 10s

This suggests to me the smp_svr program isn't working correctly.

I'm not sure where to go with this, any suggestions?

Regards,

Jerry

Parents
  • Hi Jerry, 

    Could you please let me know which NCS SDK version you are using ? The implementation of smp_svr has been changed lately especially in NCS v2.3.0 and NCS v2.4.0

    When you build smp_svr, did you use the overlay-bt.conf in addition to the prj.conf ? 

    Please be aware that when you build smp_svr it will automatically build MCUBoot as the child image so you don't have to flash anything else in addition. 

    My suggestion is to use a phone to check if the device advertise or not after you flash. You then can use nRF Connect app on the phone to do an DFU update. 
    After you can verify that it works with a phone, then you can continue the test with mcumgr on PC. 

Reply
  • Hi Jerry, 

    Could you please let me know which NCS SDK version you are using ? The implementation of smp_svr has been changed lately especially in NCS v2.3.0 and NCS v2.4.0

    When you build smp_svr, did you use the overlay-bt.conf in addition to the prj.conf ? 

    Please be aware that when you build smp_svr it will automatically build MCUBoot as the child image so you don't have to flash anything else in addition. 

    My suggestion is to use a phone to check if the device advertise or not after you flash. You then can use nRF Connect app on the phone to do an DFU update. 
    After you can verify that it works with a phone, then you can continue the test with mcumgr on PC. 

Children
Related