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: split prov.c into two separate modules #28457

Merged
merged 1 commit into from
Oct 28, 2020
Merged

Bluetooth: Mesh: split prov.c into two separate modules #28457

merged 1 commit into from
Oct 28, 2020

Conversation

LingaoM
Copy link
Collaborator

@LingaoM LingaoM commented Sep 17, 2020

The previous version coupled provisioner and device provisioning in a source file prov.c.
For only supporting device or provisioner, this will not be compiled separately, and coupling
in a file will cause unclear logic, which is not conducive to later maintenance, for example, support for remote provisioning.

Now it is divided into three files and managed separately, which is called prov.c prov_device.c and provisioner.c.

Add CONFIG_BT_MESH_PROV_DEVICE in Kconfig to control whether device provisioning is supported.
Use CONFIG_BT_MESH_PROVISIONER in Kconfig to control whether provisioner role is supported.

Add support for all provisioner OOB authentication implementations.

  • Support OOB Public Key
  • Support Input OOB Authentication
  • Support Ouput OOB Authentication
  • Support Static OOB Authentication

Signed-off-by: Lingao Meng mengabc1086@gmail.com

@trond-snekvik
Copy link
Contributor

cc @tsvehagen

Copy link
Collaborator

@tsvehagen tsvehagen left a comment

Choose a reason for hiding this comment

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

This is a very welcome change I think. Nice work.

subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
@trond-snekvik trond-snekvik marked this pull request as draft September 17, 2020 09:36
@trond-snekvik
Copy link
Contributor

Marking as draft, as the diff keeps changing. Please take it out of draft state when it's ready for review.

@github-actions github-actions bot added the area: API Changes to public APIs label Sep 25, 2020
@LingaoM LingaoM marked this pull request as ready for review October 1, 2020 17:36
@LingaoM
Copy link
Collaborator Author

LingaoM commented Oct 1, 2020

Remove draft since conflict has been solved and ready for review.

Copy link
Contributor

@trond-snekvik trond-snekvik left a comment

Choose a reason for hiding this comment

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

All in all, this looks very good, but I have some comments on the auth_start mechanism and the layer split:

subsys/bluetooth/mesh/Kconfig Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/pb_adv.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/prov_common.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisionee.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisionee.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisionee.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/Kconfig Outdated Show resolved Hide resolved
@LingaoM LingaoM requested a review from tsvehagen October 9, 2020 02:25
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/prov_bearer.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/prov.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/prov.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Show resolved Hide resolved
subsys/bluetooth/mesh/Kconfig Show resolved Hide resolved
subsys/bluetooth/mesh/prov.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/prov.c Outdated Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
subsys/bluetooth/mesh/provisioner.c Outdated Show resolved Hide resolved
include/bluetooth/mesh/main.h Outdated Show resolved Hide resolved
LingaoM added a commit to LingaoM/zephyr that referenced this pull request Apr 19, 2021
Zephyr Bluetooth Mesh did not check whether the proxy message
was actually sent out, so that the response message could
not be received during reset. It did not solve the status
callback of the proxy sending message, so a new problem was
introduced after PR(zephyrproject-rtos#28457) merged.

bt_mesh_prov_send(&buf, public_key_sent))

This PR will try to solve the above problem, and will fix
the problem due to thread competition, and PR(26668) will
not be necessary.

Compared with PR(zephyrproject-rtos#30138), it no longer consumes extra RAM
space and supports synchronization of group addresses

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
LingaoM added a commit to LingaoM/zephyr that referenced this pull request Jun 11, 2021
Zephyr Bluetooth Mesh did not check whether the proxy message
was actually sent out, so that the response message could
not be received during reset. It did not solve the status
callback of the proxy sending message, so a new problem was
introduced after PR(zephyrproject-rtos#28457) merged.

bt_mesh_prov_send(&buf, public_key_sent))

This PR will try to solve the above problem, and will fix
the problem due to thread competition, and PR(zephyrproject-rtos#26668) will
not be necessary.

Compared with PR(zephyrproject-rtos#30138), it no longer consumes extra RAM
space and supports synchronization of group addresses

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
jhedberg pushed a commit that referenced this pull request Jun 14, 2021
Zephyr Bluetooth Mesh did not check whether the proxy message
was actually sent out, so that the response message could
not be received during reset. It did not solve the status
callback of the proxy sending message, so a new problem was
introduced after PR(#28457) merged.

bt_mesh_prov_send(&buf, public_key_sent))

This PR will try to solve the above problem, and will fix
the problem due to thread competition, and PR(#26668) will
not be necessary.

Compared with PR(#30138), it no longer consumes extra RAM
space and supports synchronization of group addresses

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants