mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Workaround for legacy GAP advertising issue on Cordio LL
Due to some issue in Cordio link layer, advertising data does not take effect unless we set it (or set it again) after advertising parameters are set.pull/10772/head
							parent
							
								
									f78364cb5a
								
							
						
					
					
						commit
						6165204b15
					
				| 
						 | 
				
			
			@ -1424,6 +1424,17 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
 | 
			
		|||
        return err;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#if defined(TARGET_CORDIO_LL)
 | 
			
		||||
    // TODO: fix advertising set creation in the link layer.
 | 
			
		||||
    // The Cordio link layer implements legacy API on top of extended advertising
 | 
			
		||||
    // and has an issue that no advertising set is created until we set parameters.
 | 
			
		||||
    // As a workaround, set advertising data again to ensure it takes effect.
 | 
			
		||||
    err = setAdvertisingData_(this->_advPayload, this->_scanResponse);
 | 
			
		||||
    if (err) {
 | 
			
		||||
        return err;
 | 
			
		||||
    }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    err = _pal_gap.advertising_enable(true);
 | 
			
		||||
    if (err) {
 | 
			
		||||
        return err;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue