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: fix NO_ACTIONS scheduling #20054

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

HaavardRei
Copy link
Contributor

If the Scheduler Setup Server receives a Scheduler Action Set message setting the next scheduled task to NO_ACTIONS, it will schedule the next task in line.

Previously, the "canceled" task would be executed if it was first in line.

@HaavardRei HaavardRei requested a review from a team as a code owner January 23, 2025 13:44
@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. ble mesh Label for ble mesh PRbot. Add this if PR is related to ble mesh and you need to get review. labels Jan 23, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 23, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 6

Inputs:

Sources:

sdk-nrf: PR head: fe3772dc0061534852893881aab190e6966cf830

more details

sdk-nrf:

PR head: fe3772dc0061534852893881aab190e6966cf830
merge base: f36abd1818b4606e9d825bac64356764b5dca37d
target head (main): d73524b1a04bef31199c55bbcb3bc550c2a1e56a
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (2)
subsys
│  ├── bluetooth
│  │  ├── mesh
│  │  │  │ scheduler_srv.c
tests
│  ├── subsys
│  │  ├── bluetooth
│  │  │  ├── mesh
│  │  │  │  ├── scheduler_model
│  │  │  │  │  ├── action_planning
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  │ main.c

Outputs:

Toolchain

Version: 342151af73
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:342151af73_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 823
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-ble_mesh
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

@alxelax alxelax left a comment

Choose a reason for hiding this comment

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

Action still remains in persistent memory. If this is periodic action, it will start again after reset device.

subsys/bluetooth/mesh/scheduler_srv.c Outdated Show resolved Hide resolved
@HaavardRei
Copy link
Contributor Author

Action still remains in persistent memory. If this is periodic action, it will start again after reset device.

Won't it be cleared here? https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/bluetooth/mesh/scheduler_srv.c#L647
is_entry_defined returns false then store sets the data to NULL?

@HaavardRei HaavardRei force-pushed the mesh_scheduler_srv_cancel_work branch from e5db06a to f8b36f9 Compare January 24, 2025 06:59
Copy link
Contributor

@alxelax alxelax left a comment

Choose a reason for hiding this comment

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

LGTM just the minor comment

I suppose it is worth to provide PR link in Firesquad channel request, that customer can cherry-pick fix before release.

@HaavardRei
Copy link
Contributor Author

LGTM just the minor comment

I suppose it is worth to provide PR link in Firesquad channel request, that customer can cherry-pick fix before release.

They're in-the-loop through Jira, I'll ping them once it's merged :)

subsys/bluetooth/mesh/scheduler_srv.c Outdated Show resolved Hide resolved
@HaavardRei HaavardRei force-pushed the mesh_scheduler_srv_cancel_work branch from f8b36f9 to 1e05d9e Compare January 24, 2025 12:39
@HaavardRei HaavardRei requested a review from omkar3141 January 24, 2025 12:45
If the Scheduler Setup Server receives a Scheduler Action Set message
setting the next scheduled task to NO_ACTIONS, it will schedule the
next task in line.

Previously, the "canceled" task would be executed if it was first in
line.

Signed-off-by: Håvard Reierstad <[email protected]>
@HaavardRei HaavardRei force-pushed the mesh_scheduler_srv_cancel_work branch from 1e05d9e to be56440 Compare January 24, 2025 12:47
@alxelax alxelax removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 24, 2025
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 27, 2025
@HaavardRei HaavardRei removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 27, 2025
Adds a unit test for the scheduler model to verify that setting the
entry for the scheduled action to "NO_ACTIONS" will cancel the action.

Signed-off-by: Håvard Reierstad <[email protected]>
@HaavardRei HaavardRei force-pushed the mesh_scheduler_srv_cancel_work branch from 8c0bf78 to fe3772d Compare January 27, 2025 08:26
@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 27, 2025
@HaavardRei HaavardRei removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jan 27, 2025
Copy link
Contributor

@omkar3141 omkar3141 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@rlubos rlubos merged commit d6647eb into nrfconnect:main Jan 28, 2025
13 checks passed
@HaavardRei HaavardRei deleted the mesh_scheduler_srv_cancel_work branch January 28, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ble mesh Label for ble mesh PRbot. Add this if PR is related to ble mesh and you need to get review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants