Redbear ble is not advertaising after arduino soft reset


Hi Team,

Problem statement: When REDBEAR BLE shield disconnects from arduino, Arduino sketch(code) has to restart from the beginning(i.e., like freshly uploaded code) and Bluetooth shield has to advertise.
What is the function to advertaise redbear ble?

I have tried below.

if (ble_connected() == 1 && flagC  == false )
     flagC = true;

if ( ble_connected() == 0  &&  flagC == true)
    flagC = false;
    asm volatile ("  jmp 0"); 

    // or 

Expected Output: Rebbear BLE has to advertaise.

Evt link connection interval changed
Evt Pipe Status
Evt link connection interval changed
Evt Disconnected/Advertising timed out
Advertising started

Actual output: Redbear BLE is not advertaising.

Can we just restart the program than reset?

Please kindly help me to fix it.


Please make sure that the RDYN and REQN pins are correctly connected to the Arduino board.


I have attached the image, Please confirm


Could you please attach the whole sketch for addressing the issue. Also there are some examples for reference: