AFR : NimBLE - Add support of slave connection interval range in advertisement data
@@ -607,6 +607,17 @@ BTStatus_t prvBTSetAdvData( uint8_t ucAdapterIf,
fields.mfg_data_len = usManufacturerLen;
}
+
+ if( ( pxParams->ulMinInterval != 0 ) && ( pxParams->ulMaxInterval != 0 ) )
+ {
+ uint8_t slave_itvl_range[ 4 ];
+ slave_itvl_range[ 0 ] = ( pxParams->ulMinInterval ) & 0xFF;
+ slave_itvl_range[ 1 ] = ( pxParams->ulMinInterval >> 8 ) & 0xFF;
+ slave_itvl_range[ 2 ] = ( pxParams->ulMaxInterval ) & 0xFF;
+ slave_itvl_range[ 3 ] = ( pxParams->ulMaxInterval >> 8 ) & 0xFF;
+ fields.slave_itvl_range = slave_itvl_range;
+ }
+
if( usServiceDataLen && pcServiceData )
{
fields.svc_data_uuid128 = ( uint8_t * ) pcServiceData;
