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

Concurrent connections ble_app_hrs issue

Arm Gcc (using Eclipse Neon) | SDK 13.0 | nrf52 DK (PCA10040) | tried soft device 4.0.2 and 4.0.4

I can successfully compile and run the example -ble peripheral- ble_app_hrs. Everything works as it should including bonding.

I want to add concurrent connections (nrf is peripheral - nrf has no central). I am referencing the experimental multiperipheral example (which works and compiles fine on its own - just no bonding or peer manager). When I change the following lines in the ble_app_hrs example, I get error 4 on softdevice_enable.

Under // Configure the maximum number of connections , I change the default to:

ble_cfg.gap_cfg.role_count_cfg.periph_role_count  = 2;

I think error 4 means a memory error. So I put some breakpoints in softdevice_handler.c where it throws error 4 and get the correct memory origin (original was 0x20002558, it now says it should be 0x20002c98. I change the linker to have the origin as 0x20002c98 instead of 0x20002558. I clean the project and erase the chip and recompile and flash and the program does not start. When I go to debug, I get an 0x0 error window open in the debugger and the program never starts.

What am I missing? Any help would be appreciated! Bryan

Parents
  • FormerMember
    0 FormerMember

    When changing the memory settings, do you change the size as well, not only the start address?

    To add support for multiple peripheral links, both the softdevice and the application will have to be set to handle it. It means that:

    • the softdevice has to be configured to support multiple links, like you already do.
    • the application will have to handle multiple connections. For how to make the application handle multiple connections, I would recommend you to have a look at the (experimental_)ble_app_multiperipheral example in the SDK. I would think the easiest is to add the HRS functionality to the multiperipheral_example. This answer explains the steps for adding the UART service to the multilink example (central), however, the steps will be the same for in the "peripheral" case.
  • Thank you for your help. It worked with your settings. Can you tell me how you came up with the size? I checked and the soft device handler show the proper start address but not the correct size. It would be helpful to know how you calculate the size.

    Thanks,

    Bryan

Reply Children
No Data
Related