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: Disconnecting and Disabling BLE Functions After Successful Data Transfer

Part Number: CC2340R5

Hi,


We are presently  working on cc2340r with data_stream sample code. How can I remove all BLE functionality after calling this function

// Call the BLEAppUtil module init function
BLEAppUtil_init(&criticalErrorHandler, &App_StackInitDoneHandler,
&appMainParams, &appMainPeriCentParams);

Our requirement is to disconnect and stop scanning for BLE devices once the connection is established and data transfer is successful. Then, turn off all BLE functions.

















  • Hi,

    Thank you for reaching out. There is no way to "de-init" the BLE stack. However, the BLE task only performs actions when the device is either scanning, in a connection, in the act of disconnecting, or advertising. If the device is not doing any of these, then the application will not perform any periodic BLE operations. This will be similar to having disabled the BLE functionality. To achieve this, follow the steps below:

    1. Disconnect from any active connections. (wait for the disconnection event to be received)

    2. Disable any advertising or scanning. (wait for the advertising/scanning disable event to be received)

    At this point, BLE can be considered "off" until you enable advertising/scanning again.

    Best Regards,

    Jan