Skip to content

nimble/host: Rework ble_gatts_notify_multiple_custom - #2229

Merged
sjanc merged 1 commit into
apache:masterfrom
sjanc:gatt_multi
Aug 11, 2026
Merged

nimble/host: Rework ble_gatts_notify_multiple_custom#2229
sjanc merged 1 commit into
apache:masterfrom
sjanc:gatt_multi

Conversation

@sjanc

@sjanc sjanc commented May 11, 2026

Copy link
Copy Markdown
Contributor

Simplify ble_gatts_notify_multiple_custom implementation:

  • reject if peer doesn't support it (app shall check it)
  • fail if doesn't git in single ATT packet
  • fix missing cleanups on error
  • fix missing endianess convertions

ble_gatts_notify_multiple() is now very thin wrapper on top of ble_gatts_notify_multiple_custom().

@sjanc

sjanc commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

#AutoPTS run mynewt GATT/SR/GAN/BV-02-C

@codecoup-tester

Copy link
Copy Markdown

Scheduled PR #2229 (comment), board: nrf52, estimated start time: 11:07:28, test case count: 1, estimated duration: 0:12:46

Test cases to be runGATT/SR/GAN/BV-02-C

@codecoup-tester

Copy link
Copy Markdown

AutoPTS Bot results:

Failed tests (1)GATT GATT/SR/GAN/BV-02-C RUNNING

goto err;
}

if ((supported & 0x04) == 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe supported features bit offsets should be globally available, to get rid of magic numbers

https://github.com/apache/mynewt-nimble/blob/master/nimble/host/services/gatt/src/ble_svc_gatt.c#L31-L37

@piotrnarajowski piotrnarajowski Jul 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly 👍🏻

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add those in ble_svc_gatt.h (after fixing masks value), also I don't think _NONE and _ALL are required

Simplify ble_gatts_notify_multiple_custom implementation:
 - reject if peer doesn't support it (app shall check it)
 - fail if doesn't git in single ATT packet
 - fix missing cleanups on error
 - fix missing endianess convertions

ble_gatts_notify_multiple() is now very thin wrapper on top of
ble_gatts_notify_multiple_custom().

@piotrnarajowski piotrnarajowski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this with #2269 by running GATT/SR/GAN/BV-02-C qualification test case. Also tried to issue a multiple handle value ntf with 12 HLV which exceeded mtu and properly triggered early exit.

@sjanc
sjanc marked this pull request as ready for review July 22, 2026 13:42
@sjanc
sjanc merged commit 684406a into apache:master Aug 11, 2026
21 of 22 checks passed
@sjanc
sjanc deleted the gatt_multi branch August 11, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants