mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			BLE: remove limitation in the Cordio to update adv payload
Nothing in the Bluetooth standard prevents update of advertising payload while advertising is active. This limitation wasn't present in previous version of the stack and is not present for extended advertising.pull/13039/head
							parent
							
								
									c7759fe505
								
							
						
					
					
						commit
						2bbc8a0bae
					
				| 
						 | 
				
			
			@ -140,17 +140,14 @@ void dmAdvActSetData(dmAdvMsg_t *pMsg)
 | 
			
		|||
 | 
			
		||||
  DM_TRACE_INFO1("dmAdvActSetData: state: %d", dmAdvCb.advState[DM_ADV_HANDLE_DEFAULT]);
 | 
			
		||||
 | 
			
		||||
  if (dmAdvCb.advState[DM_ADV_HANDLE_DEFAULT] == DM_ADV_STATE_IDLE)
 | 
			
		||||
  /* set new data in HCI */
 | 
			
		||||
  if (pMsg->apiSetData.location == DM_DATA_LOC_ADV)
 | 
			
		||||
  {
 | 
			
		||||
    /* set new data in HCI */
 | 
			
		||||
    if (pMsg->apiSetData.location == DM_DATA_LOC_ADV)
 | 
			
		||||
    {
 | 
			
		||||
      HciLeSetAdvDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
      HciLeSetScanRespDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
 | 
			
		||||
    }
 | 
			
		||||
    HciLeSetAdvDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    HciLeSetScanRespDataCmd(pMsg->apiSetData.len, pMsg->apiSetData.pData);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue