Browse Source

ble: Keep advertising forever

backend_DiskStation_Sep-29-1817-2021_TypeConflict
Andreas Berthoud 4 years ago
parent
commit
384f6372ba
  1. 8
      nucleo-wb55-ble/STM32_WPAN/App/app_ble.c

8
nucleo-wb55-ble/STM32_WPAN/App/app_ble.c

@ -466,7 +466,7 @@ void APP_BLE_Init( void )
/**
* Create timer to handle the Advertising Stop
*/
HW_TS_Create(CFG_TIM_PROC_ID_ISR, &(BleApplicationContext.Advertising_mgr_timer_Id), hw_ts_SingleShot, Adv_Cancel_Req);
// HW_TS_Create(CFG_TIM_PROC_ID_ISR, &(BleApplicationContext.Advertising_mgr_timer_Id), hw_ts_SingleShot, Adv_Cancel_Req);
/**
* Create timer to handle the Led Switch OFF
*/
@ -599,7 +599,7 @@ SVCCTL_UserEvtFlowStatus_t SVCCTL_App_Notification( void *pckt )
*/
connection_complete_event = (hci_le_connection_complete_event_rp0 *) meta_evt->data;
HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id);
// HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id);
APP_DBG_MSG("HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE for connection handle 0x%x\n", connection_complete_event->Connection_Handle);
if (BleApplicationContext.Device_Connection_Status == APP_BLE_LP_CONNECTING)
@ -877,7 +877,7 @@ static void Adv_Request(APP_BLE_ConnStatus_t New_Status)
* Stop the timer, it will be restarted for a new shot
* It does not hurt if the timer was not running
*/
HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id);
// HW_TS_Stop(BleApplicationContext.Advertising_mgr_timer_Id);
APP_DBG_MSG("First index in %d state \n", BleApplicationContext.Device_Connection_Status);
@ -920,7 +920,7 @@ static void Adv_Request(APP_BLE_ConnStatus_t New_Status)
{
APP_DBG_MSG("Successfully Start Fast Advertising \n" );
/* Start Timer to STOP ADV - TIMEOUT */
HW_TS_Start(BleApplicationContext.Advertising_mgr_timer_Id, INITIAL_ADV_TIMEOUT);
// HW_TS_Start(BleApplicationContext.Advertising_mgr_timer_Id, INITIAL_ADV_TIMEOUT);
}
else
{

Loading…
Cancel
Save