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

Migrate device controller to messaging layer API #4171

Closed
wants to merge 2 commits into from

Conversation

kghost
Copy link
Contributor

@kghost kghost commented Dec 11, 2020

Problem

Migrate to messaging layer #4170

Summary of Changes

Change device controller to messaging layer API instead of secure session manager.

Please ignore first commit, focus on the second commit. This PR depends on Channel API #4019, first commit is that PR

There are several issues need to be resolved:

  1. The address of the device shouldn't be persistent, it should be always discovered by mDNS. The address doesn't come from network provision. On WiFi network, the address is assigned by home AP, not chip hub, the network provision is not able to assign IP address to a device. And for IPv6, the address is rotated on a regular interval for security reasons.
  2. Move device commissioner (PASE procedure) to transport layer, and use Channel API to decouple it from device controller. Here is a diagram showing how to build a PASE session. The orange boxes will be implemented inside device controller; the green boxes are parameters to the ChannelBuilder; The blue boxes is the device commissioner, and IMHO, it should be moved into transport layer, because they are not device dependent.

image

@kghost kghost force-pushed the channel-controller branch from bc79875 to e46b6d3 Compare December 11, 2020 07:53
@bzbarsky-apple
Copy link
Contributor

@kghost This is still marked draft. Is it ready for review?

@kghost
Copy link
Contributor Author

kghost commented Dec 15, 2020

Not yet, we need to agree on Channel API first, this is also an illustration of use case of Channel API.

@bzbarsky-apple
Copy link
Contributor

OK. I was asking because there was an explicit review request, and I was trying to understand the state of things here. Please let me know if/when you want review here, or if you only want review for part of it which part.

@kghost
Copy link
Contributor Author

kghost commented Dec 15, 2020

This will not be a small change to device controller, we'd better discuss it first. We can hang on slack later.

I want to decouple controller from transport layer, and use messaging layer APIs to replace transport layer APIs. Messaging layer is much more friendly for applications.

This code is PoC of that direction, it is move forward to it but lots of details are missing.

@stale
Copy link

stale bot commented Feb 9, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale Stale issue or PR label Feb 9, 2021
@stale
Copy link

stale bot commented Feb 16, 2021

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale bot closed this Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controller lib stale Stale issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants