Advertising · BLE Peripheral Role · Multiple Link · Recent Post

Multiple Role on the Nordic nRF52805

This blog is to give the idea how to create the multiple role (central x 2 , peripheral x 2) on the Nordic nRF52805 chipset. All the idea should be based on the Nordic Softdevice framework nRF5 SDK.

Follow up the blog (, if you need to support the bootloader feature on the nRF52805/58210 series, you can use the non-secure bootloader which is removed the code of the secure routine.

Then, if you would like to run the BLE multiple role on the smallest chipset such as nRF52805, what should you do?

Here are some hints that you can take into consideration.

  1. Use the default MTU 23 instead of the long MTU in order to save the memory (RAM) usage.
  2. Minimize the GATT server table and client as small as possible. For example you can use the Nordic UART Service (1 characteristic for TX and 1 characteristic for RX).
  3. Don’t use any bonding / security feature. It means that you don’t need to reserve 2 pages (2 x 4 KB) for the FDS. 1 Page for the bonding application and 1 page for the swap region.
  4. Try to call the softdevice API directly instead of using the BLE module such as ble_advertising, ble_gatts because the module from the ble in Nordic SDK.
  5. Select the minimum size of the multiple role BLE softdevice which can support. Then, it is better to use the SDK 14.2 / S132v5.1 softdevice (which is BT 5.0 compliance). The size of the S132v5.1 is 140KB.
  6. Remove all the unused module inside the SDK such as app_schedule, app_timer (replace by app_timer2).
  7. Reduce the number of GATT Client / service inside the ble_discovery module.

How to set the advertising payload instead of using the ble_advertising module

You can refer to the source code from the bootloader. It directly sets the parameter on the advertising payload.

Select the minimum GATT Server table example such as Nordic Uart Service (ble_app_uart)

Configure the ATT table on the RAM (fine tune the parameters in the sdk_config.h)

The default size of the ATT table is 0x580. (1408 bytes)

Configure the Vendor Specific UUID to 1 because only use 1 TX and 1 RX (same vendor base UUID).

Use the app_button instead of bsp driver

Optimize the BLE GATT client service number

Optimize the linking / compile and disable all the nRF log configuration / Remove the RTT routine

If you follow all my suggestion, you should get the optimize source code which is similar to my project.

Number of Peripheral role = 2

Number of Central Role = 3

The size of the application region (flash) is 192KB – 155.3KB = 36.7KB

The size of the application region (RAM) is 24KB – 17.5KB (including the call stack) = 6.5KB

Welcome to give any comment and suggestion on this blog.

Thanks for your interests on my blog. Since 2019, I have created this blog and shared the idea how to do some funny stuffs. I am very pleasure that I get quite a lot of positive feedback. I really hope that this blog helps your own embedded solution development. May I get support from you to keep it in order to maintain the wordpress host service? Your appreciation would be very helpful.

10 thoughts on “Multiple Role on the Nordic nRF52805

    1. Hello
      What development board did you used to test it?

      Nordic is stating on their website that for NRF52805 / nRF52810 they provide only peripheral role softdevice.

      I see that you’re using pca10040e which is nRF52810, not nRF52805


        1. Yes, sure I understand and I appreciate your good work and willlingness to share; many thanks for that.
          For me it just was not clear wether you tried this for nRF52810 or nRF52805. I want to try this too, but on nRF52805 and that it is why I asked.


  1. Hi Jimmy, nice to meet you here. I am doing a similar project for multiple peripherals to one central based on NUS service. Can I follow your code on NRF52840 with S140v17.02? Thanks.


      1. Thank you Jimmy. Your example code is very helpful for my project. My project is to set up multiple peripherals to one cental via the NUS service system. How can I get data from the peripherals individually? Do I need to add a timer in the cental to scan and transfer data between every peripheral? Thanks.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.