Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Mesh: Fixes after proxy advertising unable to send messages #79686

Merged

Conversation

LingaoM
Copy link
Collaborator

@LingaoM LingaoM commented Oct 11, 2024

When Proxy advertising or PB-GATT Advertising Enabled and use a same advertising sets.

As adv_start will call multi HCI Command will cause syswork_q yield. At same time, if another thread(BT RX) all schedule_send will cause unable send mesh message, because ADV_FLAG_ACTIVE was be set, but ADV_FLAG_PROXY not set currentlly.

Add ADV_FLAG_SCHEDULE_PENDING indicate mesh buf has been pendings but not scheduled, so when proxy advertising enable, let's take again, as we can't break or terminated adv_start, so we must waiting proxy advertising enabled.

But after #68558

The k_work_is_pending always true in send_pending_adv, which cause unable to send more mesh message until more mesh message comming

@LingaoM LingaoM added the bug The issue is a bug, or the PR is fixing a bug label Oct 11, 2024
@LingaoM LingaoM added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Oct 11, 2024
@PavelVPV PavelVPV removed the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Oct 11, 2024
Copy link
Collaborator

@PavelVPV PavelVPV left a comment

Choose a reason for hiding this comment

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

Please move the relay related change to a different PR, it is confusing as PR description says different thing. Also a bit difficult to review as gatt adv is an issue and relay change is an improvement

subsys/bluetooth/mesh/Kconfig Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/adv_ext.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/adv_ext.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/adv_ext.c Outdated Show resolved Hide resolved
When Proxy advertising or PB-GATT Advertising Enabled and use a same
advertising sets.

As adv\_start will call multi HCI Command will cause syswork_q yield.
At same time, if another thread(BT RX) all schedule\_send will cause
unable send mesh message, because ADV\_FLAG\_ACTIVE was be set, but
ADV\_FLAG\_PROXY not set currentlly.

Add ADV\_FLAG\_SCHEDULE\_PENDING indicate mesh buf has been pendings
but not scheduled, so when proxy advertising enable, let's take again,
as we can't break or terminated adv\_start, so we must waiting proxy
advertising enabled.

But after zephyrproject-rtos#68558

The `k_work_is_pending` always true in `send_pending_adv`, which cause
unable to send more mesh message until more mesh message comming

Signed-off-by: Lingao Meng <[email protected]>
@henrikbrixandersen henrikbrixandersen merged commit 537d215 into zephyrproject-rtos:main Oct 16, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Mesh area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants