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

Custom BLE service on nRF52840 (pca10056) with nRF5 SDK 15.2

Since APIs have changed as new nRF5 SDKs have released from time to time, it is not clear how custom service can be implemented on BLE peripheral for nRF52840 (pca10056) S140 Soft Device. I am using Nordic nRF52840 Development Kit with SEGGER Embedded Studio. Please help!

  • Hi.

    There is a great tutorial on this subject found on GitHub here, check it out!

    It is for SDK 15.0, but it should also work for 15.2.

    Best regards,

    Andreas

  • Here's some of what I'm currently using.

    From the header file:

    From the source code file:

    This gives me a service that allows me to push some data from a handset to the nRF52840 .

    Actual decoding of data is performed elsewhere.

    LDS_ServiceInit registers the service and characteristic UUIDs with the SoftDevice.

    The Bluetooth stack must be initialised before calling LDS_ServiceInit. This is done like so:

    I would recommend taking an example BLE project then adding the above.

  • I encounter an issue for the RAM allocation while following the tutorial. May I know what's the proper ram_start and ram_size to be used in that tutorial for a pca10056? (Since the RAM size is different)

  • Please check out our RAM and Flash memory adjustment guide here on DevZone for the various RAM_start and RAM_size values, and how to set them. If you need further support, please create a support ticket of your own.

    Best regards,

    Simon