cancel
Showing results for 
Search instead for 
Did you mean: 

STM32_WPAN BLE Stops advertising after connection

cvlt
Associate II

Hi,

not really an issue here, but I want to understand what goes on in my BLE project.

I'm using the B-WB1M-WPAN board, starting out from the BLE_HR_p2pSensor example.

I see that my device stops advertising after I connect to it, but I can't find in the code where that happens.

I discovered that the functions:

  • Adv_Request (through api_gap_set_discoverable)
  • Adv_Cancel (through api_gap_set_non_discoverable)

Are used to start and stop advertising.

I also noticed that Adv_Cancel is registered as callback for a task here:

 

 

 UTIL_SEQ_RegTask(1<<CFG_TASK_ADV_CANCEL_ID, UTIL_SEQ_RFU, Adv_Cancel);

 

 

But it seems that Adv_Cancel is never called nor CFG_TSK_ADV_CANCEL_ID is used in a UTIL_SEQ_SetTask call...
 
Nonetheless, by sniffing BLE traffic I see that after a connection my peripheral stops advertising.

I tried to look into guides and application notes but I can't find any explanation for this behaviour, can you please help me?
0 REPLIES 0