Earlier the problem was once the wiced_bt_start_advertisements( BTM_BLE_ADVERT_OFF, 0, NULL) is called, we get the ble link callback (event BTM_BLE_ADVERT_STATE_CHANGED_EVT) and it was enabling advertisement again. Disabling the hello_sensor_advertisement_stopped() function call in the callback solved this issue.