Skip to content

Conversation

MirkoCovizzi
Copy link
Contributor

@MirkoCovizzi MirkoCovizzi commented Aug 21, 2025

WIP add Peer Manager.

TODOs:

  • Replace app_timer in auth_status_tracker.c and peer_manager_handler.c
  • Replace nrf_mtx_t in gatt_cache_manager.c
  • Replace crypto in nrf_ble_lesc.c
  • Replace FDS in peer_data_storage.c and peer_manager_handler.c
  • Replace nrf_atflags_t in peer_id.c and pm_buffer.c

List of changes compared to nrf5 SDK:

  • Restructured and moved headers to dedicated folders

  • Applied clang-format-15 to each file

  • Updated all licenses

  • Replaced ret_code_t with uint32_t

  • Connection state flags are not present in ble_conn_state so
    use the Kconfig BLE_CONN_STATE_USER_FLAG_COUNT instead.
    Convert the type ble_conn_state_user_flag_id_t to int.

  • The configurable values defined in peer_manager.packsc have
    been converted to Kconfig options with a python script, and
    replaced in the code.

  • Reformatted all Doxygen to fit NCS style

  • Removed nrf5 SDK logging in favor of Zephyr logging

  • DOS to unix line endings

  • Fix Checkpatch

  • Use Zephyr assert in sdk_macros.h

  • All includes of headers that do not exist in Bare Metal have
    been removed.

  • Changed NRF_ERROR_RESOURCES to NRF_ERROR_DATA_SIZE.
    This is in order to use NRF_ERROR_RESOURCES in stead of
    NRF_ERROR_STORAGE_FULL.

  • Changed NRF_ERROR_STORAGE_FULL to NRF_ERROR_RESOURCES.

  • Put central logic compilation behind Kconfig flag

  • Add some extra build dependencies

  • Update GATT Cache Manager by porting nrf_mtx logic

  • Update peer_id and pm_buffer to use atomic_t

@MirkoCovizzi MirkoCovizzi self-assigned this Aug 21, 2025
@MirkoCovizzi MirkoCovizzi added the DNM Do not merge label Aug 21, 2025
Copy link

You can find the documentation preview for this PR here.

@MirkoCovizzi MirkoCovizzi force-pushed the peer-manager branch 7 times, most recently from 8153c81 to a5ba7ad Compare August 22, 2025 08:48
@MirkoCovizzi MirkoCovizzi force-pushed the peer-manager branch 19 times, most recently from 694915b to 390ade8 Compare August 25, 2025 08:46
@MirkoCovizzi MirkoCovizzi force-pushed the peer-manager branch 20 times, most recently from 80df41c to 4f77bd5 Compare August 29, 2025 12:52
Add Connection state library.

Signed-off-by: Eivind Jølsgard <[email protected]>
Co-authored-by: Mirko Covizzi <[email protected]>
@MirkoCovizzi MirkoCovizzi force-pushed the peer-manager branch 5 times, most recently from e3c925d to 9e47d16 Compare September 1, 2025 08:34
Adds the Peer Manager.

List of changes compared to nrf5 SDK:

* Restructured and moved headers to dedicated folders

* Applied `clang-format-15` to each file

* Updated all licenses

* Replaced `ret_code_t` with `uint32_t`

* Connection state flags are not present in `ble_conn_state` so
  use the Kconfig `BLE_CONN_STATE_USER_FLAG_COUNT` instead.
  Convert the type `ble_conn_state_user_flag_id_t` to `int`.

* The configurable values defined in `peer_manager.packsc` have
  been converted to Kconfig options with a python script, and
  replaced in the code.

* Reformatted all Doxygen to fit NCS style

* Removed nrf5 SDK logging in favor of Zephyr logging

* DOS to unix line endings

* Fix Checkpatch

* Use Zephyr assert in `sdk_macros.h`

* All includes of headers that do not exist in Bare Metal have
  been removed.

* Changed `NRF_ERROR_RESOURCES` to `NRF_ERROR_DATA_SIZE`.
  This is in order to use `NRF_ERROR_RESOURCES` in stead of
  `NRF_ERROR_STORAGE_FULL`.

* Changed `NRF_ERROR_STORAGE_FULL` to `NRF_ERROR_RESOURCES`.

* Put central logic compilation behind Kconfig flag

* Add some extra build dependencies

* Update GATT Cache Manager by porting `nrf_mtx` logic

* Update `peer_id` and `pm_buffer` to use `atomic_t`

Signed-off-by: Mirko Covizzi <[email protected]>
Path workflows for integration development.

Signed-off-by: Mirko Covizzi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM Do not merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants