This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BLE-STACK: Peripheral not discoverable after enabling 4.2 features

Part Number: BLE-STACK
Other Parts Discussed in Thread: CC2650

Hello,

I'm currently working on a CC2650 BLE peripheral based on the simple_peripheral app + stack projects.
Today I wanted to enable the Secure Connections features from the BLE 4.2 specification. To do so, I opened the build_config.opt file in the stack project and uncommented the following line:

/* -DBLE_V42_FEATURES=SECURE_CONNS_CFG */

The rest of BLE 4.2 features are still commented as are all of 4.1 features.
I then went on to rebuild the stack project and flash it. Unfortunately, my peripheral was no longer discoverable after that.
Commenting out the above line and rebuilding again makes it discoverable again. It seems to behave the same regardless of which features of 4.2 I enable.

Is there anything else I need to modify (in the stack or app) for this to work?

Thanks in advance,
Assaf

  • Hi Assaf,

    After making a change in the stack project you have to:
    1. Re-build and Flash the stack project
    2. Re-build and flash the app project.

    Did you make sure to do both 1. and 2.?
  • Hey Marie,

    That solved it, thanks! I only rebuilt and flashed the stack project.

    Out of curiosity, can you please explain why I need to rebuild and flash the app project as well? I was under the impression that they are separate applications running on separate cores that only communicate via IPC. Do they somehow share the build configuration?

    Thanks,
    Assaf
  • Hi Assaf,

    The app and stack projects are not separate applications. They're two parts of the application that needs to communicate. When you re-build and load a new stack project, the links between the app and stack project no longer work as intended.
  • Hey Marie,

    I'm trying to understand how they're technically connected. I have two projects in my CCS workspace. One for the app and another for the stack. How does the app project link with the stack project?
    What if I had multiple stack projects? How does the app "know" which stack project to link with? Do they both link the same build_config.opt from the SDK?
    I want to make sure my app is linked to my stack project and not something from the SDK directory if I make modifications to it.

    Thanks,
    Assaf

  • Hi Assaf,

    First of all I want to tell you that all the BLE example projects have an assigned stack project, so you don't have to worry that your app project will suddenly link to a different stack project.

    The app and stack projects have some common files. E.g. ccs_lib_linker_defines.cmd (if you're using CCS). This file is generated by the stack project and used by the app project.

    There is also a dedicated tool, Frontier.exe which assures the link between the app and stack project. This tool is called as a post-build step in the stack project. (Project->Properties->Build->Steps.)

    If you look at the app project you can also find some hard-coded references to the stack project. E.g. in Project->Properties->ARM Linker you can see that the build_config.opt file from the stack project is linked in.
  • It's generally a good idea to check the "real" location of your file to figure out which projects may be using it. In CCS, right-click on the file -> Properties->Resource->Resolved location is where the file is actually stored.
  • Hey Marie,

    Perfect, thanks! This is exactly the information I was missing.

    Thanks,
    Assaf