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

Migration nRF51822 -> nRF52832

Hi,

I have an old project running on nRF51822, with SoftDevice SDK v8 - S110 mode. I'm trying to migrate the project to a nRF52832 with SoftDevice SDV v12 - S132 v3 mode.

I'm working with Segger Embedded Studio v3.10e

The device is a peripheral who runs some custom BLE services to transfer data.

I'm trying to code once again all my services using the ble_app_template included in the SDK.

I imported my former services, all is fine.

I swapped device_manager for peer_manager. Unfortunately, during pm_init(), I got an error. More precisely, it happens in pds_init() in peer_data_storage.c, when calling fds_init() I got a NRF_ERROR_NO_MEM error.

I commented the block with pm_init(). Now, my project is running, and the device is advertising.

Here is the corresponding screenshot from LightBlue.

image description

So... I can connect to my device and services appeared in the advertised data ; but I can not see them in details (see the characteristics, read/write them). Of course, with the nRF51822 version, everything works.

Do you know how to solve this? Does the problem come from the fact I can not initialize peer manager? Or is it something with the custom services (something to migrate?)? Maybe something else?

Parents
  • FormerMember
    0 FormerMember

    Being able to see the services and characteristics is independent of the peer manager.

    I assume that the service and characteristics have been successfully added to the device? If so, could you use the sniffer to check if the iOS device is doing a service discovery? Could you try do delete all cached information on the iOS device about the nRF52? Does it work with nRF Connect (PC) or Android?

    Regarding pm_init()/fds_init() failing: If you run the chip in debug mode, where exactly is the error code being returned from? Which FDS settings do you use in sdk_config.h?

  • Hi Kristin, thank you for your reply.

    1/ About service and characteristics: same result with nRF Connect / Android or iOS (iOS is indeed making a service discovery). My guess is that it has something to do with the way I implement my custom services (initialization and event management). What worked with SDK 8 seems to be obsolete with SDK12 - S132. Do you know if there is an example where I can fin custom service implementation - currently analysing ble_hrs file?

    2/ Concerning peer_manager : as stated, error happens during pm_init(). To be precise, in pm_init(), a call is made to pds_init(). In pds_init(), everything is fine until fds_init(). Calling fds_init() returns a FDS_ERR_NO_PAGES error that causes the NRF_ERROR_NO_MEM. Memory configuration is the following: FLASH_START=0x1F000 SRAM_START=0x20002128 I paste my FDS settings in sdk_config.h in next comment

Reply
  • Hi Kristin, thank you for your reply.

    1/ About service and characteristics: same result with nRF Connect / Android or iOS (iOS is indeed making a service discovery). My guess is that it has something to do with the way I implement my custom services (initialization and event management). What worked with SDK 8 seems to be obsolete with SDK12 - S132. Do you know if there is an example where I can fin custom service implementation - currently analysing ble_hrs file?

    2/ Concerning peer_manager : as stated, error happens during pm_init(). To be precise, in pm_init(), a call is made to pds_init(). In pds_init(), everything is fine until fds_init(). Calling fds_init() returns a FDS_ERR_NO_PAGES error that causes the NRF_ERROR_NO_MEM. Memory configuration is the following: FLASH_START=0x1F000 SRAM_START=0x20002128 I paste my FDS settings in sdk_config.h in next comment

Children
No Data
Related