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.

CC2340R5: BLE Central & Peripheral communication

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Dear Experts,

I hope this message finds you well.

I am currently working on a project involving the CC2340R5 microcontroller and was exploring the resources available in the SimpleLink SDK. To better understand the BLE Central application, I would appreciate it if you could share the demo code or example application for the CC2340R5 that demonstrates the BLE functionality, especially for the Central role, where one central connects to multiple peripherals to share the serial data.

(Reff: www.ti.com/.../6308217614112)

This would be extremely helpful in accelerating the development process for our specific use case.

Looking forward to your response.

Regards,

Harinder Singh

  • Hi Harinder,

    I would recommend referencing the basic_ble example for this. The example may be configured into a central role that allows multiple connections through SysConfig. Once connected to multiple peripherals it is able to interface with each one individually.  Additionally, we have a serial transmission example (for peripheral) on our github (linked below):https://github.com/TexasInstruments/ble_examples/tree/simplelink_low_power_f3_sdk-7.40.01/examples/rtos/LP_EM_CC2340R5/ble5stack/data_stream_UART_over_BLE

    Another example that may be valuable is the GATT Client example (also on Github) which showcases a GATT client use-case and shows how to modify and interact directly with characteristics:

    https://github.com/TexasInstruments/ble_examples/tree/simplelink_low_power_f3_sdk-7.40.01/examples/rtos/LP_EM_CC2340R5/ble5stack/basic_ble_GATT_client

    Best Regards,

    Jan

  • Hi Jan,

    I have tried your suggestions by importing the basic_ble example & changing it's role to central in the syscfg. 

    SDK Details: simplelink_lowpower_f3_sdk_8_10_01_02

    Queries:

    1. Central_start() Function is called & all the events are registered properly but not getting any printf messages described in the Central_ScanEventHandler(). as per example once central app is active it should start the scanning operation as per the code but I never get my debug pointer stops inside this eventhandler.

    Ideally if I am using the same code with one with central & other with peripheral role should connect automatically. Do I need to register any other event to make Central_ScanEventHandler() more affective.

    2. In the demo why we have not used CC2340R5 based device as central, is their any limitations to it?

    3. Do we have any working example specific to central device role designed for CC2340R5 SOC. 

    Please let me know if you need more information.

    Regards,

    Harinder

  • Hi Harinder

    1. Central_start() Function is called & all the events are registered properly but not getting any printf messages described in the Central_ScanEventHandler(). as per example once central app is active it should start the scanning operation as per the code but I never get my debug pointer stops inside this eventhandler.

    Ideally if I am using the same code with one with central & other with peripheral role should connect automatically. Do I need to register any other event to make Central_ScanEventHandler() more affective.

    Regarding the prints, are you connected through UART using a baud rate of 115200? The device will not start scanning automatically by default the project will scan when instructed to do so from the 2-Button menu. You are able to change the logic such that it does start scanning instantly with not input required. You should be able to modify the code such that a scan occurs and the device connects to the peripheral by identifying the device through the advertising data.

    2. In the demo why we have not used CC2340R5 based device as central, is their any limitations to it?

    There is no limitation and the example may be modified to work in the central role. The example was released as a peripheral in order to easily work with central devices (such as smart phones).

    3. Do we have any working example specific to central device role designed for CC2340R5 SOC. 

    The basic_ble and datastream examples may both be configured to work as a central device through SysConfig.

    Best Regards,

    Jan