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?

  • FormerMember
    0 FormerMember in reply to FormerMember

    Okay. After programming the softdevice and the firmware, there should be tag in flash, indicating where the bonding information should be stored. That tag starts with FDS_PAGE_TAG_MAGIC (0xDEADCODE). After programming the softdevice + fimware to the chip. Could you read page 0x7D000 and check if has the DEADCODE tag:

    nrfjprog -f nrf52 --memrd 0x7d000

    You could also double check that it works with one of the examples in the sdk, like ble_app_gls for instance.

Reply
  • FormerMember
    0 FormerMember in reply to FormerMember

    Okay. After programming the softdevice and the firmware, there should be tag in flash, indicating where the bonding information should be stored. That tag starts with FDS_PAGE_TAG_MAGIC (0xDEADCODE). After programming the softdevice + fimware to the chip. Could you read page 0x7D000 and check if has the DEADCODE tag:

    nrfjprog -f nrf52 --memrd 0x7d000

    You could also double check that it works with one of the examples in the sdk, like ble_app_gls for instance.

Children
No Data
Related