-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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: Adding Mesh 1.1 Subnet Bridge #78400
Bluetooth: Mesh: Adding Mesh 1.1 Subnet Bridge #78400
Conversation
Adding documentation and function calles for the API's in Bridge Configuration Client model and Bridge Configuration Server model. Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
The `brg_cfg` module implements the states needed for subnet bridge feature. It provides two states - enable state, and bridging table state. APIs are provided to access and modify the states. The module handles responsibility of persistence of the states. Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Changes status type to be status codes defined in Mesh Protocol 4.3.14 as defined for the `BRIDGING_TABLE_STATUS` message. Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Change the parameters of the bridge table add function to take an entry struct rather than the fields of an entry. Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Implements the Bridge Configuration Client model. Adds opcodes for all Bridge messages to `foundation.h`. Adds client-side support for these messages. Adds a new Kconfig option for the Bridge Configuration Client model to configure the waiting time for respones for acked messages. Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds the Bridge Configuration Client commands to Mesh shell. Unifies documentation for shell Kconfig options. Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Adds implementation for the Bridge Configuration Server model. Updates `brg_cfg` module to add sanity check for bt_mesh_brg_cfg_tbl_remove() API. Also, updates the unit test accordingly. Adds documentation for the Bridge Configuration Server model Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Adds subnet bridging functionality to the network layer. Also fixes brg_cfg_srv for minor issues to get it working. Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
Added support for the Bridge Configuration client and server to the tester application. Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Fixed bugs found while running PTS test. Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
Added high-level documentation for Subnet Bridge, connecting models together and explaining usage. Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
We store only filled up entries, but want to restore the entire table. `bt_mesh_setting_set` fails if the restored length didn't match the provided length. This commit fixes the restoring of the bridging table by allowing to restore any size as long as the stored size is less than the allocated one and it is a multiple of the size of a single entry. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Though nvs backend checks whether the data passed to it is identical to the stored one, this isn't guaranteed by other the settings api. We can also avoid going into the settings subsystem since we know what was actually changed. This commit adds 2 flags that allow to control whether Subnet Bridge or Bridging Table states were changed and skips storing if the certain state was not changed. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The initial implementation of RPL check for Subnet Bridge wasn't fully correct. It decides whether to relay or not a PDU based on RPL of only received messages. However, the spec section 3.9.8 says: ``` In addition, a Subnet Bridge node shall implement replay protection for all Access and Transport Control messages that are sent to bridged subnets. A Subnet Bridge node shall maintain the most recent IVISeq value for each source address authorized to send messages to bridged subnets. Messages received by the Subnet Bridge node with the IVISeq value less than or equal to the last stored value from that source address shall be discarded immediately upon reception. When a message is retransmitted to a bridged subnet, the stored IVISeq value shall be updated. In this way, bridged subnets are protected against replay attacks from other subnets. ``` This was noticed with MESH/NODE/SBR/NET/BV-02-C test. It passes when PTS misses the message at step 3 and 4, and fails when PTS manages to receive the message. This commit fixes the wrong behavior by removing argument for `bt_mesh_rpl_check` function making store a new message and bypassing `local_match` check in case of Subnet Bridge node. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Add constants for directions so that they can be used in the subnet bridge client api. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When relaying a Network PDU to another subnet, we need to update sub field of rx structure so that correct credentials are used. We also need to update NID field of the Network PDU. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
The Subnet Bridge node must bridge traffic regardless of the Relay state. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When a synchronous API is used, the content of `buf` will not be valid by the time the thread that called the synchronous API is woken up again. Therefore, the simplest way to solve this is when a user allocates the buffer which will be filled up with the content of the buffer passed to the model callback. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If relay feature doesn't have own adv set, it should use the main adv set to send messages. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
We must tcheck if buf has enough tailroom to fit another pair of keys or pair addresses with direction. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
If use `IS_ENABLED` macro inside if statements but not as preprocessor directives, we can always compile the code for settings even if settings are not used. This allows to reduce amount of firmwares we need to build in CI to ensure that code compiles. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds Bridge Configuration Server to the mesh_shell sample. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit adds the following tests: - Simple test for bridging table - Test bridging table state changes - Test persistence storage of subnet bridge - Test IV Index update with subnet bridge - Test network key removal for subnet bridge Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
When a message with invalid parameters is received, we must ignore it. In this commit we check invalid parameters first. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Unfortunatelly new Qualification Workspace is not able to properly import ICS if file is UNIX line endings. |
e710ab5
to
7a200c9
Compare
7a200c9
to
2b07971
Compare
How is it possible the build and compliance checks are failing? Weren't those run on the collab branch? |
Ah, this thing again. @nashif @carlescufi once other CI issues have been resolved this will again need a merge override due to the CRLF line endings. |
We created an issue long time ago: #70360. This is closed now, but the problem still exists. |
Hi @Balaklaka, there are a couple of clang-format warnings related to coding style. Could you fix them? |
2b07971
to
3dc0aa6
Compare
77192df
to
84c5365
Compare
Fixed, only "Unfortunatelly new Qualification Workspace is not able to properly import ICS if file is UNIX line endings." left |
Removed deprecated native_posix as test platform. Added unique sim_ids for tests with the psa as a overlay. Fixed clang-format issues. Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
84c5365
to
5616b1a
Compare
@carlescufi, I assume this PR won't show up in the mergelist due to failing CI. How it can be merged? It has 2 approvals now and CI is failing because of line endings in pts files. |
Adding the Mesh Protocol v1.1 functionality for the Subnet Bridge functionality.
This PR contain:
Signed-off-by: Ingar Kulbrandstad ingar.kulbrandstad@nordicsemi.no
Fixes #74961