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

How can I get the application version in DFU bootloader

Hi,

I can use the DFU bootloader via HCI/UART to update the application image.

Reference DFU init pakcet. The init packet contains a 4-byte value identifying the version of the application that is being transferred.

My questions as below

a.) How can I get the application version and write back a new application version in DFU bootloader?

b.) When I successfully update the application image and then booting with the new application firmware, how can I get the application version in application firmware?

Does anyone tell me how can I develop it ?

Thanks

Parents
  • A)For application version handling see here.
    B) I suggest you use the device information service for this and populate it using the version from an address as suggested in A.

  • Hi run_ar,

    Thanks for your reply!

    A.) But, I don't know how to obtain the value in application start address + 0x0100. My device is nRF51 serial.

    May I follow as below to define application start address + 0x0100 and obtain the application version ? If yes, how can I write back a new application version into the application start address + 0x0100 ?

    #define SD_FWID_GET(baseaddr) ((*((uint32_t *) ((baseaddr) + SD_FWID_OFFSET))) & 0xFFFF)    
    SD_FWID_GET(MBR_SIZE));
    

    B.) I am working on the heart_rate_collector example code of nrf51-ble-driver_linux_0.5.0. So I program my device to Central device. How can I obtain this application version in heart_rate_collector example code ?

Reply
  • Hi run_ar,

    Thanks for your reply!

    A.) But, I don't know how to obtain the value in application start address + 0x0100. My device is nRF51 serial.

    May I follow as below to define application start address + 0x0100 and obtain the application version ? If yes, how can I write back a new application version into the application start address + 0x0100 ?

    #define SD_FWID_GET(baseaddr) ((*((uint32_t *) ((baseaddr) + SD_FWID_OFFSET))) & 0xFFFF)    
    SD_FWID_GET(MBR_SIZE));
    

    B.) I am working on the heart_rate_collector example code of nrf51-ble-driver_linux_0.5.0. So I program my device to Central device. How can I obtain this application version in heart_rate_collector example code ?

Children
No Data
Related