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

How to make the matching and binding equipment information would be stored permanently, even after the OTA upgrade is still in

HI: everyone! How to make the matching and binding equipment information would be stored permanently, even after the OTA upgrade is still in;I made with examples of the official, the program of heart rate, for now, matching, binding and OTA has achieved, but there is a problem, is when I have good matching and binding equipment information, through OTA upgrade, after the original match was gone, through the LOG print to see before binding equipment information already all clear;My English is very poor, this is through the translation software, hope you can understand; 1:my sdk version is sdk9.0; 2:sd version:sd 8.1; 3:I USE code in the bond! image description

Parents
  • I you want to preserve bonding information through a OTA DFU you have to edit the DFU_APP_DATA_RESERVED define in `dfu_types.h. This is described on this page in our Infocenter.

    Update:

    image description

  • The bonding information is usually stored on the first flash page of the PSTORAGE_NUM_PAGES reserved for the pstorage module. The application data(if there are any) will be placed on the second and the swap page at the last page, as shown on this page in our Infocenter. If there is a bootloader present the start address of the flash pages will be at 0x3C000 - 0x400 x PSTORAGE_NUM_PAGES and DFU_APP_DATA_RESERVED will preserve all pages from 0x3C000 to 0x3C000- DFU_APP_DATA_RESERVED, see the figure I have attached in my answer. Thus, if you set PSTORAGE_NUM_PAGES to 10 you have to set DFU_APP_DATA_RESERVED to 0x400 xPSTORAGE_NUM_PAGES to preserve the bonding data.

Reply
  • The bonding information is usually stored on the first flash page of the PSTORAGE_NUM_PAGES reserved for the pstorage module. The application data(if there are any) will be placed on the second and the swap page at the last page, as shown on this page in our Infocenter. If there is a bootloader present the start address of the flash pages will be at 0x3C000 - 0x400 x PSTORAGE_NUM_PAGES and DFU_APP_DATA_RESERVED will preserve all pages from 0x3C000 to 0x3C000- DFU_APP_DATA_RESERVED, see the figure I have attached in my answer. Thus, if you set PSTORAGE_NUM_PAGES to 10 you have to set DFU_APP_DATA_RESERVED to 0x400 xPSTORAGE_NUM_PAGES to preserve the bonding data.

Children
No Data
Related