Error when ProvisioningUrl passed to otJoinerStart() is null #7891
-
otjoinerstart documentation says the 'aProvisioningUrl' parameter can be null:
but, it seems not accepted. In openthread/src/core/meshcop/joiner.cpp Line 131 in 2ce3d3b there is:
So I get an error OT_ERROR_INVALID_ARGS if the ProvisioningUrl is null. Is it an error in the code? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@OlivierGre this line here does allow it to be VerifyOrExit(aProvisioningUrl == nullptr || IsValidUtf8String(aProvisioningUrl), error = kErrorInvalidArgs); The May be the error is caused by something else. |
Beta Was this translation helpful? Give feedback.
-
You're right. I have found that the error comes from:
and it is due to our pskd that is too small. It should be at least 6 characters long. Thanks for your support. |
Beta Was this translation helpful? Give feedback.
@OlivierGre this line here does allow it to be
nullptr
. It verifies it to be eithernullptr
or a valid UTF8 (and exits if it is not).The
PrepareJoinerFinalizeMessage()
also seem to allow it to benullptr
.May be the error is caused by something else.