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.

[FAQ] CC2340R5: How to merge/add multiple Bluetooth profiles into a project

Part Number: CC2340R5

The purpose of these instructions are to detail how to merge/add multiple BLE profiles into a single project. The following is an example which uses the "data_stream_UART_over_BLE" as the base project and the "basic_ble_profiles" project as a source for the addition of the Continuous Glucose Monitoring (CGM) profile.

Importing Projects:

  1. Install the latest SIMPLELINK-LOWPOWER-F3-SDK
  2. Download the “data_stream_UART_over_BLE” example from this link:
  3. Import “data_stream_UART_over_BLE”project from download into a new empty workspace
  4. Import “basic_ble_profiles” project from SDK into the same workspace

Copying & changing necessary files:

  1. Within the “basic_ble_profiles” project, open app > Profiles and copy the ‘app_cgm.c’ file
  2. Within the “data_stream_UART_over_BLE” project, open app > Profiles and paste the ‘app_cgm.c’ file
  3. Within the “basic_ble_profiles” project, open common > Profiles and copy the ‘continuous_glucose_monitoring’ folder
  4. Within the “data_stream_UART_over_BLE” project, open common > Profiles and paste the ‘continuous_glucose_monitoring’ folder (select “Yes” when prompted with Adjust Compiler Include_Path?)
  5. Within the “basic_ble_profiles” project, open common > Services and copy the ‘continuous_glucose_monitoring’ folder
  6. Within the “data_stream_UART_over_BLE” project, open common > Services and paste the ‘continuous_glucose_monitoring’ folder (select “Yes” when prompted with Adjust Compiler Include_Path?)
  7. Within the “basic_ble_profiles”project, open common and copy the entire ‘Util’ folder
  8. Within the “data_stream_UART_over_BLE” project, open common and paste the ‘Util’ folder
  9. In the ‘app_main.c’ file of the “data_stream_UART_over_BLE”project, add lines 168-172 in the section as depicted below:

Ensuring correct functionality:

  1. Build the project to ensure there are no errors and flash to the device to verify functionality
  2. To verify functionality:
    1. Connect to the device with your phone using the SimpleLink Connect application
    2. Verify the correct GATT table is shown
    3. Test the UART-over-BLE feature as described in the example project README

As shown in the steps above, you can take the files for an existing profile and copy them over to another project to utilize the profile and keep the project's original functionality. For any additional questions or issues with this process, please open a new thread.