CC2340R5: How to enable or use GATT service changed feature

Part Number: CC2340R5

Tool/software:

We are looking to enable a GATT service (OAD) after establishing connection. The idea is to use Service Change Indications. We are using CC2340 device (peripheral) as GATT server and CC2745 device (central) as GATT client. We need support on both server and client side and would highly appreciate if you can share example projects or user instructions.

We started with peripheral device first by integrating OAD service in basic_ble project by referring to basic_ble_oad_dual_image project. The project builds without compilation or linker errors. When  OAD_start function is called within App_StackInitDoneHandler using the nRF Connect app I can see the OAD service is discovered. However, when the OAD_start function is called from the user task after receiving connection established event. On re-discovering services in the nRF Connect app it fails to appear.

Below is the summary of steps I followed for integration...

  1. Refered this and this links to understand use of Service Change indications.
  2. Added oad_profile header and source files into common/Profiles/oad
  3. Added oad_service header and source files into common/Services/oad
  4. Added following include directories
    1. ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/third_party/mcuboot/boot/bootutil/include
    2. ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/third_party/mcuboot/boot/ti/source/mcuboot_app
  5. Added following ARM Compiler and ARM Linker definitions
    1. OAD_CFG
    2. APP_HDR_ADDR=0x6000
  6. Added following post-build steps
    1. ${CG_TOOL_ROOT}/bin/tiarmobjcopy ${BuildArtifactFileBaseName}.out --output-target binary ${BuildArtifactFileBaseName}_noheader.bin --remove-section=.ccfg
    2. ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/tools/common/mcuboot/imgtool sign --header-size 0x100 --align 4 --slot-size 0x3B000 --version 1.0.0 --pad-header --pad --key ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/third_party/mcuboot/root-ec-p256.pem ${BuildArtifactFileBaseName}_noheader.bin ${BuildArtifactFileBaseName}_v1.bin
    3. ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/tools/common/mcuboot/imgtool sign --header-size 0x100 --align 4 --slot-size 0x3B000 --version 2.0.0 --pad-header --pad --key ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/third_party/mcuboot/root-ec-p256.pem ${BuildArtifactFileBaseName}_noheader.bin ${BuildArtifactFileBaseName}_v2.bin

Please find the details below:

  • SDK version: simplelink lowpower f3 sdk v7.40.00.64 ( we will move to latest SDK soon, but I feel there's a step missing or I am not doing it right )
  • MCU: CC2340R5RGE