@@ -423,12 +423,6 @@ void BLEManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event)
423
423
}
424
424
break ;
425
425
426
- case DeviceEventType::kCHIPoBLENotifyConfirm : {
427
- ChipLogProgress (DeviceLayer, " _OnPlatformEvent kCHIPoBLENotifyConfirm" );
428
- HandleTxConfirmationEvent (event->CHIPoBLENotifyConfirm .ConId );
429
- }
430
- break ;
431
-
432
426
default :
433
427
ChipLogProgress (DeviceLayer, " _OnPlatformEvent default: event->Type = %d" , event->Type );
434
428
break ;
@@ -479,24 +473,16 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU
479
473
sl_status_t ret;
480
474
uint16_t cId = (UUIDsMatch (&ChipUUID_CHIPoBLEChar_RX, charId) ? gattdb_CHIPoBLEChar_Rx : gattdb_CHIPoBLEChar_Tx);
481
475
uint8_t timerHandle = GetTimerHandle (conId, true );
482
- ChipDeviceEvent event;
483
476
484
477
VerifyOrExit (((conState != NULL ) && (conState->subscribed != 0 )), err = CHIP_ERROR_INVALID_ARGUMENT);
485
478
VerifyOrExit (timerHandle != kMaxConnections , err = CHIP_ERROR_NO_MEMORY);
486
479
487
- // start timer for light notification confirmation. Long delay for spake2 indication
480
+ // start timer for light indication confirmation. Long delay for spake2 indication
488
481
sl_bt_system_set_lazy_soft_timer (TIMER_S_2_TIMERTICK (6 ), 0 , timerHandle, true );
489
482
490
- ret = sl_bt_gatt_server_send_notification (conId, cId, (data->DataLength ()), data->Start ());
483
+ ret = sl_bt_gatt_server_send_indication (conId, cId, (data->DataLength ()), data->Start ());
491
484
err = MapBLEError (ret);
492
485
493
- if (err == CHIP_NO_ERROR)
494
- {
495
- event.Type = DeviceEventType::kCHIPoBLENotifyConfirm ;
496
- event.CHIPoBLENotifyConfirm .ConId = conId;
497
- err = PlatformMgr ().PostEvent (&event);
498
- }
499
-
500
486
exit :
501
487
if (err != CHIP_NO_ERROR)
502
488
{
@@ -873,20 +859,20 @@ void BLEManagerImpl::HandleTXCharCCCDWrite(volatile sl_bt_msg_t * evt)
873
859
{
874
860
CHIP_ERROR err = CHIP_NO_ERROR;
875
861
CHIPoBLEConState * bleConnState;
876
- bool isDisabled ;
862
+ bool isIndicationEnabled = false ;
877
863
ChipDeviceEvent event;
878
864
879
865
bleConnState = GetConnectionState (evt->data .evt_gatt_server_user_write_request .connection );
880
866
VerifyOrExit (bleConnState != NULL , err = CHIP_ERROR_NO_MEMORY);
881
867
882
868
// Determine if the client is enabling or disabling notification/indication.
883
- isDisabled = (evt->data .evt_gatt_server_characteristic_status .client_config_flags == sl_bt_gatt_disable );
869
+ isIndicationEnabled = (evt->data .evt_gatt_server_characteristic_status .client_config_flags == sl_bt_gatt_indication );
884
870
885
871
ChipLogProgress (DeviceLayer, " HandleTXcharCCCDWrite - Config Flags value : %d" ,
886
872
evt->data .evt_gatt_server_characteristic_status .client_config_flags );
887
- ChipLogProgress (DeviceLayer, " CHIPoBLE %s received" , isDisabled ? " unsubscribe " : " subscribe " );
873
+ ChipLogProgress (DeviceLayer, " CHIPoBLE %s received" , isIndicationEnabled ? " subscribe " : " unsubscribe " );
888
874
889
- if (!isDisabled )
875
+ if (isIndicationEnabled )
890
876
{
891
877
// If indications are not already enabled for the connection...
892
878
if (!bleConnState->subscribed )
0 commit comments