Closed krbvroc1 closed 2 months ago
Hey @krbvroc1, thanks for reporting this issue and digging into the code. It sounds good to allow this. I sent the PR https://github.com/openthread/ot-commissioner/pull/285 for fixing this. Could you help check if this works for you?
@wgtdkp Yes, I tested the fix and it works. Thanks.
I just spent a considerable time trying to figure out why passing some custom vendor data from my Joiner device to my custom commissioner (which uses ot-commissioner library) was invoking my application OnJoinerFinalize() with a nullptr for the vendorData. It turns out if the provisioningUrl is NULL, the vendorData sent from the Joiner is not passed along. I believe I traced the problem to the below code. I think this violates the Thread specification. There is NO mention that the vendorData MUST not be passed if not accompanied by a provisioningUrl. Can this be fixed please? As a workaround I could put some sort of data in the provisioningUrl, but that implies some extra joiner flow and it not really what I want to do.
https://github.com/openthread/ot-commissioner/blob/5223d71b8cfbcb4a22da2aae80c07dc801e4bf4a/src/library/joiner_session.cpp#L188-L195
Note that there is no such qualification in openthread itself... https://github.com/openthread/openthread/blob/473fbcaba93972b62d94c5e0492044bdda340e1f/src/core/meshcop/joiner.cpp#L436-L444