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.

CCS/CC1350STK: How to terminate BLE task and connection based on characteristics input

Part Number: CC1350STK

Tool/software: Code Composer Studio

I am currently practicing with simple_peripheral examples. Is there a way to stop the whole task and BLE connection based on input, for example, if the input of characteristics 3 is 1, can I turn off the BLE connection and perform a new RF task? How can I do that? 

Thanks,

Yue

  • Hi Yue,

    Could you elaborate on the "why"? Generally speaking, you can't really "restart" the BLE task as such but you can of-course choose to terminate the connection if you wish. If you are not in a connection and not advertising then the stack would be dormant. Why would you need to start a "new RF task", maybe you could give more context here?

  • Hello M-W,

    Thanks for the reply! In my application, I need to use BLE to set up some parameters, and once this is done, I would switch to RF to broadcast my sensor data. Could you please inform me how to terminate the connection and stop advertising? Is there any example code for reference?

    Thanks,

    Yue

  • Hi Yue,

    Have a look at the dmm_154sensor_remote_display example. In the remote_disaplay.c file there is some event handler code for the "RD_POLICY_PAUSE_EVT" event which shows how to terminate and stop advertisement.