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

I want to insert a DFU module through BLE in my old ble project to upgrade my nrf5340 image

    i have look for many DFU examples in NCS1.5.0 , but samples are Abstract ,and can not to start . a ble test  app in phone have a menu that  can  send file to nrf5340 through ble ,  when ble of nrf5340 receive this file  ,file can as  a new image.

Parents
  • Simon ,thank you .
      I have already knew how to flash nrf5340dk ,but how to DFU nrf5340dk is not know .i can not build  the example in v1.5.0\zephyr\samples\subsys\mgmt\mcumgr\smp_svr  using BLe to upgrade image must enable CONFIG_MCUMGR_SMP_BT and include bluetooth.c in src folder ,but bulid  ,these are many errors. .when i input these path with exact path as #include<D:\work\v1.5.0\zephyr\include\bluetooth/bluetooth.h> , the bluetooth.h 's include header file cannot find
Reply
  • Simon ,thank you .
      I have already knew how to flash nrf5340dk ,but how to DFU nrf5340dk is not know .i can not build  the example in v1.5.0\zephyr\samples\subsys\mgmt\mcumgr\smp_svr  using BLe to upgrade image must enable CONFIG_MCUMGR_SMP_BT and include bluetooth.c in src folder ,but bulid  ,these are many errors. .when i input these path with exact path as #include<D:\work\v1.5.0\zephyr\include\bluetooth/bluetooth.h> , the bluetooth.h 's include header file cannot find
Children
  • zhouhaifang said:
    Simon ,thank you .
      I have already knew how to flash nrf5340dk ,but how to DFU nrf5340dk is not know .i can not build  the example in v1.5.0\zephyr\samples\subsys\mgmt\mcumgr\smp_svr  using BLe to upgrade image must enable CONFIG_MCUMGR_SMP_BT and include bluetooth.c in src folder ,but bulid  ,these are many errors.

    You don't need to include bluetooth.h or enable CONFIG_MCUMGR_SMP_BT explicitly. Just add the line '- -DOVERLAY_CONFIG=overlay-bt.conf' when building with west, which should include the file overlay-bt.conf and set CONFIG_MCUMGR_SMP_BT.

    Please follow these steps: https://devzone.nordicsemi.com/f/nordic-q-a/69368/nrf5340-fota-system-reset-after-pairing/286031#286031 

    • cd into C:\Users\<user name>\ncs\v1.5.0\zephyr\samples\subsys\mgmt\mcumgr\smp_svr
    • Connect the nRF5340 DK to the computer and turn it on
    • Run west build -b nrf5340dk_nrf5340_cpuapp -p -- -DOVERLAY_CONFIG=overlay-bt.conf && cd build && west flash
    • Add CONFIG_BOOTLOADER_MCUBOOT=y to <..>/zephyr/samples/hello_world/prj.conf
    • cd into zephyr/samples/hello_world
    • Run west build -b nrf5340dk_nrf5340_cpuapp -p
    • Transfer <..>/zephyr/samples/hello_world/build/zephyr/app_update.bin to the phone
    • Install and open the nRF Connect Device Manager app on the phone, then connect to the nRF5340 which should be advertising with the name "Zephyr"
    • Perform a Firmware Upgrade using the app_update.bin file

    Best regards,

    Simon

  • Simon thank you 

     I have step by step follow you step .but when open the nRF Connect Device Manager app on the phone , there is no menu of upgrade   is the app on phone error or andriod version not fitable?

  • That is not the nRF Connect Device Manager app, it is the nRF Connect Mobile app. Please download the nRF Connect Device Manager app.


    By the way, it should be possible to perform a dfu over the SMP service using the nRF Connect Mobile app as well. In my case (using v4.24.2, a dfu button shows up to the left of 'DISCONNECT'). Maybe you need to update the app to a newer version. However, I would recommend you to use the nRF Conenct Device Manager app when performing a dfu over the mcumgr/smp protocol.

    Best regards,

    Simon

Related