Skip to content

Commit

Permalink
Fix esp32 platform bluedroid, should send indication instead of notif…
Browse files Browse the repository at this point in the history
…ication. (#28923)

* Fix esp32 platform bluedroid implementation, should send indication instead of notification

* Add comments

* Restyled by clang-format

---------

Co-authored-by: Ryan Ma <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jan 22, 2024
1 parent e2430a7 commit 4450979
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/platform/ESP32/bluedroid/BLEManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,9 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU
ChipLogDetail(Ble, "Sending indication for CHIPoBLE TX characteristic (con %u, len %u)", conId, data->DataLength());
#endif

err = MapBLEError(esp_ble_gatts_send_indicate(mAppIf, conId, mTXCharAttrHandle, data->DataLength(), data->Start(), false));
// Set param need_confirm as false will send notification, otherwise indication.
err = MapBLEError(
esp_ble_gatts_send_indicate(mAppIf, conId, mTXCharAttrHandle, data->DataLength(), data->Start(), true /* need_confirm */));
if (err != CHIP_NO_ERROR)
{
ChipLogError(DeviceLayer, "esp_ble_gatts_send_indicate() failed: %s", ErrorStr(err));
Expand Down

0 comments on commit 4450979

Please sign in to comment.