@@ -74,6 +74,9 @@ namespace Internal {
74
74
75
75
namespace {
76
76
77
+ // Bluetooth SIG defined UUID for Client Characteristic Configuration Descriptor
78
+ constexpr const char * kClientCharacteristicConfigurationUUID = " 2902" ;
79
+
77
80
constexpr System::Clock::Timeout kNewConnectionScanTimeout = System::Clock::Seconds16(20 );
78
81
constexpr System::Clock::Timeout kConnectTimeout = System::Clock::Seconds16(20 );
79
82
constexpr System::Clock::Timeout kFastAdvertiseTimeout =
@@ -208,7 +211,10 @@ void BLEManagerImpl::ReadValueRequestedCb(const char * remoteAddress, int reques
208
211
209
212
ChipLogByteSpan (DeviceLayer, ByteSpan (Uint8::from_const_char (value.get ()), len));
210
213
211
- ret = bt_gatt_server_send_response (requestId, BT_GATT_REQUEST_TYPE_READ, offset, 0x00 , value.get (), len);
214
+ char dummyValue[] = " " ;
215
+ // Tizen API does not like NULLs even for zero-length values.
216
+ char * valuePtr = value ? value.get () : dummyValue;
217
+ ret = bt_gatt_server_send_response (requestId, BT_GATT_REQUEST_TYPE_READ, offset, BT_ATT_ERROR_NONE, valuePtr, len);
212
218
VerifyOrReturn (ret == BT_ERROR_NONE,
213
219
ChipLogError (DeviceLayer, " bt_gatt_server_send_response() failed: %s" , get_error_message (ret)));
214
220
}
@@ -233,7 +239,7 @@ void BLEManagerImpl::WriteValueRequestedCb(const char * remoteAddress, int reque
233
239
ret = bt_gatt_set_value (gattHandle, value, len);
234
240
VerifyOrReturn (ret == BT_ERROR_NONE, ChipLogError (DeviceLayer, " bt_gatt_set_value() failed: %s" , get_error_message (ret)));
235
241
236
- ret = bt_gatt_server_send_response (requestId, BT_GATT_REQUEST_TYPE_WRITE, offset, 0x00 , nullptr , 0 );
242
+ ret = bt_gatt_server_send_response (requestId, BT_GATT_REQUEST_TYPE_WRITE, offset, BT_ATT_ERROR_NONE , nullptr , 0 );
237
243
VerifyOrReturn (ret == BT_ERROR_NONE,
238
244
ChipLogError (DeviceLayer, " bt_gatt_server_send_response() failed: %s" , get_error_message (ret)));
239
245
@@ -265,7 +271,7 @@ void BLEManagerImpl::NotificationStateChangedCb(bool notify, bt_gatt_server_h se
265
271
266
272
ChipLogProgress (DeviceLayer, " Notification State Changed %d on %s: %s" , notify, __ConvertAttTypeToStr (type),
267
273
StringOrNullMarker (uuid.get ()));
268
- NotifyBLESubscribed (notify ? true : false , conn );
274
+ NotifyBLESubscribed (conn, notify ? true : false );
269
275
}
270
276
271
277
void BLEManagerImpl::WriteCompletedCb (int result, bt_gatt_h gattHandle, void * userData)
@@ -314,7 +320,7 @@ void BLEManagerImpl::AdvertisingStateChangedCb(int result, bt_advertiser_h adver
314
320
if (advState == BT_ADAPTER_LE_ADVERTISING_STARTED)
315
321
{
316
322
mFlags .Set (Flags::kAdvertising );
317
- NotifyBLEPeripheralAdvStartComplete (true , nullptr );
323
+ NotifyBLEPeripheralAdvStartComplete (CHIP_NO_ERROR );
318
324
DeviceLayer::SystemLayer ().ScheduleLambda ([this ] {
319
325
// Start a timer to make sure that the fast advertising is stopped after specified timeout.
320
326
DeviceLayer::SystemLayer ().StartTimer (kFastAdvertiseTimeout , HandleAdvertisingTimeout, this );
@@ -323,7 +329,7 @@ void BLEManagerImpl::AdvertisingStateChangedCb(int result, bt_advertiser_h adver
323
329
else
324
330
{
325
331
mFlags .Clear (Flags::kAdvertising );
326
- NotifyBLEPeripheralAdvStopComplete (true , nullptr );
332
+ NotifyBLEPeripheralAdvStopComplete (CHIP_NO_ERROR );
327
333
DeviceLayer::SystemLayer ().ScheduleLambda (
328
334
[this ] { DeviceLayer::SystemLayer ().CancelTimer (HandleAdvertisingTimeout, this ); });
329
335
}
@@ -338,89 +344,73 @@ void BLEManagerImpl::AdvertisingStateChangedCb(int result, bt_advertiser_h adver
338
344
}
339
345
340
346
// ====== Private Functions.
341
- void BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete (bool aIsSuccess, void * apAppstate)
347
+
348
+ void BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete (CHIP_ERROR error)
342
349
{
343
- ChipDeviceEvent event;
344
- event.Type = DeviceEventType::kPlatformTizenBLEPeripheralGATTServerRegisterComplete ;
345
- event.Platform .BLEPeripheralGATTServerRegisterComplete .mIsSuccess = aIsSuccess;
346
- event.Platform .BLEPeripheralGATTServerRegisterComplete .mpAppstate = apAppstate;
350
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLEPeripheralGATTServerRegisterComplete ,
351
+ .Platform = { .BLEPeripheralGATTServerRegisterComplete = { .mError = error } } };
347
352
PlatformMgr ().PostEventOrDie (&event);
348
353
}
349
354
350
- void BLEManagerImpl::NotifyBLEPeripheralAdvConfiguredComplete (bool aIsSuccess, void * apAppstate )
355
+ void BLEManagerImpl::NotifyBLEPeripheralAdvConfiguredComplete (CHIP_ERROR error )
351
356
{
352
- ChipDeviceEvent event;
353
- event.Type = DeviceEventType::kPlatformTizenBLEPeripheralAdvConfiguredComplete ;
354
- event.Platform .BLEPeripheralAdvConfiguredComplete .mIsSuccess = aIsSuccess;
355
- event.Platform .BLEPeripheralAdvConfiguredComplete .mpAppstate = apAppstate;
357
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLEPeripheralAdvConfiguredComplete ,
358
+ .Platform = { .BLEPeripheralAdvConfiguredComplete = { .mError = error } } };
356
359
PlatformMgr ().PostEventOrDie (&event);
357
360
}
358
361
359
- void BLEManagerImpl::NotifyBLEPeripheralAdvStartComplete (bool aIsSuccess, void * apAppstate )
362
+ void BLEManagerImpl::NotifyBLEPeripheralAdvStartComplete (CHIP_ERROR error )
360
363
{
361
- ChipDeviceEvent event;
362
- event.Type = DeviceEventType::kPlatformTizenBLEPeripheralAdvStartComplete ;
363
- event.Platform .BLEPeripheralAdvStartComplete .mIsSuccess = aIsSuccess;
364
- event.Platform .BLEPeripheralAdvStartComplete .mpAppstate = apAppstate;
364
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLEPeripheralAdvStartComplete ,
365
+ .Platform = { .BLEPeripheralAdvStartComplete = { .mError = error } } };
365
366
PlatformMgr ().PostEventOrDie (&event);
366
367
}
367
368
368
- void BLEManagerImpl::NotifyBLEPeripheralAdvStopComplete (bool aIsSuccess, void * apAppstate )
369
+ void BLEManagerImpl::NotifyBLEPeripheralAdvStopComplete (CHIP_ERROR error )
369
370
{
370
- ChipDeviceEvent event;
371
- event.Type = DeviceEventType::kPlatformTizenBLEPeripheralAdvStopComplete ;
372
- event.Platform .BLEPeripheralAdvStopComplete .mIsSuccess = aIsSuccess;
373
- event.Platform .BLEPeripheralAdvStopComplete .mpAppstate = apAppstate;
371
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLEPeripheralAdvStopComplete ,
372
+ .Platform = { .BLEPeripheralAdvStopComplete = { .mError = error } } };
374
373
PlatformMgr ().PostEventOrDie (&event);
375
374
}
376
375
377
- void BLEManagerImpl::NotifyBLEWriteReceived (System::PacketBufferHandle & buf, BLE_CONNECTION_OBJECT conId )
376
+ void BLEManagerImpl::NotifyBLEWriteReceived (BLE_CONNECTION_OBJECT conId, System::PacketBufferHandle & buf)
378
377
{
379
- ChipDeviceEvent event;
380
- event.Type = DeviceEventType::kCHIPoBLEWriteReceived ;
381
- event.CHIPoBLEWriteReceived .ConId = conId;
382
- event.CHIPoBLEWriteReceived .Data = std::move (buf).UnsafeRelease ();
378
+ ChipDeviceEvent event{ .Type = DeviceEventType::kCHIPoBLEWriteReceived ,
379
+ .CHIPoBLEWriteReceived = { .ConId = conId, .Data = std::move (buf).UnsafeRelease () } };
383
380
PlatformMgr ().PostEventOrDie (&event);
384
381
}
385
382
386
- void BLEManagerImpl::NotifyBLENotificationReceived (System::PacketBufferHandle & buf, BLE_CONNECTION_OBJECT conId )
383
+ void BLEManagerImpl::NotifyBLENotificationReceived (BLE_CONNECTION_OBJECT conId, System::PacketBufferHandle & buf)
387
384
{
388
- ChipDeviceEvent event;
389
- event.Type = DeviceEventType::kPlatformTizenBLEIndicationReceived ;
390
- event.Platform .BLEIndicationReceived .mConnection = conId;
391
- event.Platform .BLEIndicationReceived .mData = std::move (buf).UnsafeRelease ();
385
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLEIndicationReceived ,
386
+ .Platform = {
387
+ .BLEIndicationReceived = { .mConnection = conId, .mData = std::move (buf).UnsafeRelease () } } };
392
388
PlatformMgr ().PostEventOrDie (&event);
393
389
}
394
390
395
- void BLEManagerImpl::NotifyBLESubscribed (bool indicationsEnabled, BLE_CONNECTION_OBJECT conId )
391
+ void BLEManagerImpl::NotifyBLESubscribed (BLE_CONNECTION_OBJECT conId, bool indicationsEnabled )
396
392
{
397
- ChipDeviceEvent event;
398
- event.Type = (indicationsEnabled) ? DeviceEventType::kCHIPoBLESubscribe : DeviceEventType::kCHIPoBLEUnsubscribe ;
399
- event.CHIPoBLESubscribe .ConId = conId;
393
+ ChipDeviceEvent event{ .Type = indicationsEnabled ? DeviceEventType::kCHIPoBLESubscribe : DeviceEventType::kCHIPoBLEUnsubscribe ,
394
+ .CHIPoBLESubscribe = { .ConId = conId } };
400
395
PlatformMgr ().PostEventOrDie (&event);
401
396
}
402
397
403
398
void BLEManagerImpl::NotifyBLEIndicationConfirmation (BLE_CONNECTION_OBJECT conId)
404
399
{
405
- ChipDeviceEvent event;
406
- event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm ;
407
- event.CHIPoBLEIndicateConfirm .ConId = conId;
400
+ ChipDeviceEvent event{ .Type = DeviceEventType::kCHIPoBLEIndicateConfirm , .CHIPoBLEIndicateConfirm = { .ConId = conId } };
408
401
PlatformMgr ().PostEventOrDie (&event);
409
402
}
410
403
411
404
void BLEManagerImpl::NotifyBLEConnectionEstablished (BLE_CONNECTION_OBJECT conId, CHIP_ERROR error)
412
405
{
413
- ChipDeviceEvent event;
414
- event.Type = DeviceEventType::kCHIPoBLEConnectionEstablished ;
406
+ ChipDeviceEvent event{ .Type = DeviceEventType::kCHIPoBLEConnectionEstablished };
415
407
PlatformMgr ().PostEventOrDie (&event);
416
408
}
417
409
418
410
void BLEManagerImpl::NotifyBLEDisconnection (BLE_CONNECTION_OBJECT conId, CHIP_ERROR error)
419
411
{
420
- ChipDeviceEvent event;
421
- event.Type = DeviceEventType::kCHIPoBLEConnectionError ;
422
- event.CHIPoBLEConnectionError .ConId = conId;
423
- event.CHIPoBLEConnectionError .Reason = error;
412
+ ChipDeviceEvent event{ .Type = DeviceEventType::kCHIPoBLEConnectionError ,
413
+ .CHIPoBLEConnectionError = { .ConId = conId, .Reason = error } };
424
414
PlatformMgr ().PostEventOrDie (&event);
425
415
}
426
416
@@ -429,9 +419,8 @@ void BLEManagerImpl::NotifyHandleConnectFailed(CHIP_ERROR error)
429
419
ChipLogProgress (DeviceLayer, " Connection failed: %" CHIP_ERROR_FORMAT, error.Format ());
430
420
if (mIsCentral )
431
421
{
432
- ChipDeviceEvent event;
433
- event.Type = DeviceEventType::kPlatformTizenBLECentralConnectFailed ;
434
- event.Platform .BLECentralConnectFailed .mError = error;
422
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLECentralConnectFailed ,
423
+ .Platform = { .BLECentralConnectFailed = { .mError = error } } };
435
424
PlatformMgr ().PostEventOrDie (&event);
436
425
}
437
426
}
@@ -440,27 +429,23 @@ void BLEManagerImpl::NotifyHandleNewConnection(BLE_CONNECTION_OBJECT conId)
440
429
{
441
430
if (mIsCentral )
442
431
{
443
- ChipDeviceEvent event;
444
- event.Type = DeviceEventType::kPlatformTizenBLECentralConnected ;
445
- event.Platform .BLECentralConnected .mConnection = conId;
432
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLECentralConnected ,
433
+ .Platform = { .BLECentralConnected = { .mConnection = conId } } };
446
434
PlatformMgr ().PostEventOrDie (&event);
447
435
}
448
436
}
449
437
450
438
void BLEManagerImpl::NotifyHandleWriteComplete (BLE_CONNECTION_OBJECT conId)
451
439
{
452
- ChipDeviceEvent event;
453
- event.Type = DeviceEventType::kPlatformTizenBLEWriteComplete ;
454
- event.Platform .BLEWriteComplete .mConnection = conId;
440
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLEWriteComplete ,
441
+ .Platform = { .BLEWriteComplete = { .mConnection = conId } } };
455
442
PlatformMgr ().PostEventOrDie (&event);
456
443
}
457
444
458
445
void BLEManagerImpl::NotifySubscribeOpComplete (BLE_CONNECTION_OBJECT conId, bool isSubscribed)
459
446
{
460
- ChipDeviceEvent event;
461
- event.Type = DeviceEventType::kPlatformTizenBLESubscribeOpComplete ;
462
- event.Platform .BLESubscribeOpComplete .mConnection = conId;
463
- event.Platform .BLESubscribeOpComplete .mIsSubscribed = isSubscribed;
447
+ ChipDeviceEvent event{ .Type = DeviceEventType::kPlatformTizenBLESubscribeOpComplete ,
448
+ .Platform = { .BLESubscribeOpComplete = { .mConnection = conId, .mIsSubscribed = isSubscribed } } };
464
449
PlatformMgr ().PostEventOrDie (&event);
465
450
}
466
451
@@ -574,7 +559,7 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer()
574
559
VerifyOrExit (ret == BT_ERROR_NONE, ChipLogError (DeviceLayer, " bt_gatt_server_create() failed: %s" , get_error_message (ret)));
575
560
576
561
// Create Service (BTP Service)
577
- ret = bt_gatt_service_create (Ble::CHIP_BLE_SERVICE_LONG_UUID_STR , BT_GATT_SERVICE_TYPE_PRIMARY, &service);
562
+ ret = bt_gatt_service_create (Ble::CHIP_BLE_SERVICE_SHORT_UUID_STR , BT_GATT_SERVICE_TYPE_PRIMARY, &service);
578
563
VerifyOrExit (ret == BT_ERROR_NONE, ChipLogError (DeviceLayer, " bt_gatt_service_create() failed: %s" , get_error_message (ret)));
579
564
580
565
// Create 1st Characteristic (Client TX Buffer)
@@ -583,7 +568,7 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer()
583
568
BT_GATT_PROPERTY_WRITE, // Write Request is not coming if we use WITHOUT_RESPONSE property. Let's use WRITE property and
584
569
// consider to use WITHOUT_RESPONSE property in the future according to the CHIP Spec 4.16.3.2. BTP
585
570
// GATT Service
586
- " CHIPoBLE_C1 " , strlen ( " CHIPoBLE_C1 " ) , &char1);
571
+ nullptr , 0 , &char1);
587
572
VerifyOrExit (ret == BT_ERROR_NONE,
588
573
ChipLogError (DeviceLayer, " bt_gatt_characteristic_create() failed: %s" , get_error_message (ret)));
589
574
@@ -604,8 +589,7 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer()
604
589
605
590
// Create 2nd Characteristic (Client RX Buffer)
606
591
ret = bt_gatt_characteristic_create (Ble::CHIP_BLE_CHAR_2_UUID_STR, BT_GATT_PERMISSION_READ,
607
- BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_INDICATE, " CHIPoBLE_C2" , strlen (" CHIPoBLE_C2" ),
608
- &char2);
592
+ BT_GATT_PROPERTY_READ | BT_GATT_PROPERTY_INDICATE, nullptr , 0 , &char2);
609
593
VerifyOrExit (ret == BT_ERROR_NONE,
610
594
ChipLogError (DeviceLayer, " bt_gatt_characteristic_create() failed: %s" , get_error_message (ret)));
611
595
@@ -618,6 +602,7 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer()
618
602
this );
619
603
VerifyOrExit (ret == BT_ERROR_NONE,
620
604
ChipLogError (DeviceLayer, " bt_gatt_server_set_read_value_requested_cb() failed: %s" , get_error_message (ret)));
605
+
621
606
ret = bt_gatt_server_set_characteristic_notification_state_change_cb (
622
607
char2,
623
608
+[](bool notify, bt_gatt_server_h gattServer, bt_gatt_h charHandle, void * self) {
@@ -628,13 +613,14 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer()
628
613
ChipLogError (DeviceLayer, " bt_gatt_server_set_characteristic_notification_state_change_cb() failed: %s" ,
629
614
get_error_message (ret)));
630
615
631
- // Create CCC Descriptor
632
- ret = bt_gatt_descriptor_create (Ble::CHIP_BLE_DESC_SHORT_UUID_STR, BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE,
616
+ ret = bt_gatt_descriptor_create (kClientCharacteristicConfigurationUUID , BT_GATT_PERMISSION_READ | BT_GATT_PERMISSION_WRITE,
633
617
desc_value, sizeof (desc_value), &desc);
634
618
VerifyOrExit (ret == BT_ERROR_NONE, ChipLogError (DeviceLayer, " bt_gatt_descriptor_create() failed: %s" , get_error_message (ret)));
619
+
635
620
ret = bt_gatt_characteristic_add_descriptor (char2, desc);
636
621
VerifyOrExit (ret == BT_ERROR_NONE,
637
622
ChipLogError (DeviceLayer, " bt_gatt_characteristic_add_descriptor() failed: %s" , get_error_message (ret)));
623
+
638
624
ret = bt_gatt_service_add_characteristic (service, char2);
639
625
VerifyOrExit (ret == BT_ERROR_NONE,
640
626
ChipLogError (DeviceLayer, " bt_gatt_service_add_characteristic() failed: %s" , get_error_message (ret)));
@@ -648,17 +634,15 @@ CHIP_ERROR BLEManagerImpl::RegisterGATTServer()
648
634
ret = bt_gatt_server_start ();
649
635
VerifyOrExit (ret == BT_ERROR_NONE, ChipLogError (DeviceLayer, " bt_gatt_server_start() failed: %s" , get_error_message (ret)));
650
636
651
- ChipLogDetail (DeviceLayer, " NotifyBLEPeripheralGATTServerRegisterComplete Success" );
652
- BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete (true , nullptr );
637
+ BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete (CHIP_NO_ERROR);
653
638
654
639
// Save the Local Peripheral char1 & char2 handles
655
640
mGattCharC1Handle = char1;
656
641
mGattCharC2Handle = char2;
657
642
return CHIP_NO_ERROR;
658
643
659
644
exit :
660
- ChipLogDetail (DeviceLayer, " NotifyBLEPeripheralGATTServerRegisterComplete Failed" );
661
- BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete (false , nullptr );
645
+ BLEManagerImpl::NotifyBLEPeripheralGATTServerRegisterComplete (TizenToChipError (ret));
662
646
return TizenToChipError (ret);
663
647
}
664
648
@@ -727,7 +711,7 @@ CHIP_ERROR BLEManagerImpl::StartBLEAdvertising()
727
711
VerifyOrExit (ret == BT_ERROR_NONE,
728
712
ChipLogError (DeviceLayer, " bt_adapter_le_set_advertising_device_name() failed: %s" , get_error_message (ret)));
729
713
730
- BLEManagerImpl::NotifyBLEPeripheralAdvConfiguredComplete (true , nullptr );
714
+ BLEManagerImpl::NotifyBLEPeripheralAdvConfiguredComplete (CHIP_NO_ERROR );
731
715
732
716
ret = bt_adapter_le_start_advertising_new (
733
717
mAdvertiser ,
@@ -742,8 +726,9 @@ CHIP_ERROR BLEManagerImpl::StartBLEAdvertising()
742
726
return CHIP_NO_ERROR;
743
727
744
728
exit :
745
- BLEManagerImpl::NotifyBLEPeripheralAdvStartComplete (false , nullptr );
746
- return ret != BT_ERROR_NONE ? TizenToChipError (ret) : err;
729
+ err = ret != BT_ERROR_NONE ? TizenToChipError (ret) : err;
730
+ BLEManagerImpl::NotifyBLEPeripheralAdvStartComplete (err);
731
+ return err;
747
732
}
748
733
749
734
CHIP_ERROR BLEManagerImpl::StopBLEAdvertising ()
@@ -758,7 +743,7 @@ CHIP_ERROR BLEManagerImpl::StopBLEAdvertising()
758
743
return CHIP_NO_ERROR;
759
744
760
745
exit :
761
- BLEManagerImpl::NotifyBLEPeripheralAdvStopComplete (false , nullptr );
746
+ BLEManagerImpl::NotifyBLEPeripheralAdvStopComplete (TizenToChipError (ret) );
762
747
return TizenToChipError (ret);
763
748
}
764
749
@@ -896,7 +881,7 @@ void BLEManagerImpl::HandleC1CharWriteEvent(BLE_CONNECTION_OBJECT conId, const u
896
881
// Copy the data to a packet buffer.
897
882
buf = System::PacketBufferHandle::NewWithData (value, len);
898
883
VerifyOrExit (!buf.IsNull (), err = CHIP_ERROR_NO_MEMORY);
899
- NotifyBLEWriteReceived (buf, conId );
884
+ NotifyBLEWriteReceived (conId, buf );
900
885
return ;
901
886
exit :
902
887
if (err != CHIP_NO_ERROR)
@@ -915,7 +900,7 @@ void BLEManagerImpl::HandleRXCharChanged(BLE_CONNECTION_OBJECT conId, const uint
915
900
// Copy the data to a packet buffer.
916
901
buf = System::PacketBufferHandle::NewWithData (value, len);
917
902
VerifyOrExit (!buf.IsNull (), err = CHIP_ERROR_NO_MEMORY);
918
- NotifyBLENotificationReceived (buf, conId );
903
+ NotifyBLENotificationReceived (conId, buf );
919
904
return ;
920
905
exit :
921
906
if (err != CHIP_NO_ERROR)
0 commit comments