openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
404 stars 228 forks source link

Update ot-br-posix WebUI and REST to expose more `commissioner joiner add <eui64> <pskd> <timeout>` customization #1799

Open rretanubun opened 1 year ago

rretanubun commented 1 year ago

Current state

The current ot-br-posix WebUI and REST-API assumes a promiscuous joiner mode (no eui64) and an assumed joiner timeout of 120 seconds (thread default).

ref: https://github.com/openthread/ot-br-posix/blob/main/src/web/web-service/frontend/res/js/app.js#L412-L421

While this is convenient for demo purposes, this is also not how most customers would expect to commission devices onto their network.

Proposed solution

Update the WebUI and REST handler to expose and accept additional parameters (eui64 and timeout) Bonus: since most thread stacks support 2 simultaneous joiners, maybe up to 2 joiner can be specified at once.

Alternate

We ended up creating custom REST-endpoints to support this for now.

Context

I am unclear if dropping this support from our TBR's WebUI and REST-API handler will break matter device onboarding, is there other onboarding systems relying on promiscuous joiners that the community is aware of?

Thank you for everyone's time.

wgtdkp commented 1 year ago

It sounds good to add such support.

I am unclear if dropping this support from our TBR's WebUI and REST-API handler will break matter device onboarding, is there other onboarding systems relying on promiscuous joiners that the community is aware of?

Matter is not relying on this kind of Thread commissioning, they define their own protocol for Thread network provisioning.

We ended up creating custom REST-endpoints to support this for now.

Would you like to contribute the implementation back to OTBR? I think OTBR-web should support both modes of "specifying the eui64" and "allowing all joiners".

OmegaRelay commented 1 day ago

Just to add to this I do currently have a pull request open #2515 requiring review which adds commissioner support to the rest api where joiners can be added to the commissioner using pskd, timeout and either eui64 or discerner