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.
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.
Simon,thank you very much!
1. I have tried to merge peripheral_uart example and smp_svr example in one project , a ble service would do some ordinary work ,the other ble service will do DFU work , but failed .
2. I have saw a DFU method of nrf52832 through ble . when nrf52832 receive a DFU command from a connected app in phone , nrf52832 first write 0x01 in flash (address is 0 ), then reset . in the reset period ,app in phone send a DFU file , nrf52832 automatically DFU. program in nrf52832 have no code about DFU, only only only write 0x01 in address 0 flash , then reset .i am confusing this for sereral days , and just asked former engineer ,he said a DFU code have loaded in bootloader of nrf52832 . i do not know the process of this DFU and how to operate .DOES NCS1.5.0 have this method DFU nrf5340 like this?
3.maybe can use a ble device name to register two ble services, each service has it's own service connect node , it's own receive event handler, it's own send data function. but i am not skill to do this . example smp-svr own a ble service ,and example peripheral_uart own a ble service, and merge two example into one project .
Simon,thank you very much!
1. I have tried to merge peripheral_uart example and smp_svr example in one project , a ble service would do some ordinary work ,the other ble service will do DFU work , but failed .
2. I have saw a DFU method of nrf52832 through ble . when nrf52832 receive a DFU command from a connected app in phone , nrf52832 first write 0x01 in flash (address is 0 ), then reset . in the reset period ,app in phone send a DFU file , nrf52832 automatically DFU. program in nrf52832 have no code about DFU, only only only write 0x01 in address 0 flash , then reset .i am confusing this for sereral days , and just asked former engineer ,he said a DFU code have loaded in bootloader of nrf52832 . i do not know the process of this DFU and how to operate .DOES NCS1.5.0 have this method DFU nrf5340 like this?
3.maybe can use a ble device name to register two ble services, each service has it's own service connect node , it's own receive event handler, it's own send data function. but i am not skill to do this . example smp-svr own a ble service ,and example peripheral_uart own a ble service, and merge two example into one project .
Can you test the following patch with NCS v1.5.1:
https://github.com/nrfconnect/sdk-nrf/compare/v1.5.1...simon-iversen:peripheral_uart_dfu
https://github.com/nrfconnect/sdk-nrf/compare/v1.5.1...simon-iversen:peripheral_uart_dfu.patch
It will make it possible to perform BLE DFU with the peripheral_uart sample. At least it worked for me:
*** Booting Zephyr OS build v2.4.99-ncs2 *** 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: Swap type: none I: Bootloader chainload address offset: 0xc000 *** Booting Zephyr OS build v2.4.99-ncs2 *** Application version 1.0.0 Starting Nordic UART service example *** Booting Zephyr OS build v2.4.99-ncs2 *** I: Starting bootloader I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3 I: Boot source: none I: Swap type: test I: Bootloader chainload address offset: 0xc000 *** Booting Zephyr OS build v2.4.99-ncs2 *** Application version 2.0.0 Starting Nordic UART service example
Best regards,
Simon