-
Notifications
You must be signed in to change notification settings - Fork 36
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
Custom commissioner assertion #193
Comments
FYI: I reverted to commit b151bb5 and it works fine. |
@krbvroc1 Thanks for raising this issue. I can confirm that #185 did break backward compatibility. The latest Thread specification requires a commissioner getting Mesh-Local Prefix before sending I have submitted another PR #188 that resolves the compatibility issue so that caller-side code doesn't need to be changed. Can you cherry-pick #188 to see if it works for you? |
@wgtdkp I fetched this and rebuilt my custom commissioner. While it does not segfault, it fails on the petition attempt. To remove my custom code from the picture, I tried the commissioner-cli and got the same result:
Am I missing some configuration in the OTBR that is now required for this new method? Is the OTBR supposed to be listening on 49191 and am I missing a build flag when I rebuilt the OTBR? This works prior to the #185 . |
Can you confirm if the BR is running? What is the output of command "sudo ot-ctl state"? |
Yes, the OTBR is running ... State is 'router'. I do not see any tasks 'listening' to the UDP 49191 port. |
There are integration tests in the OTBR repo and I don't think there are changes that break the commissioning function.
|
Log
|
@krbvroc1 The log looks good to me and I can not reproduce this issue with e33021be for OTBR and #188 for ot-commissioner. Notice that the native commissioner and border agent currently can not co-exist on the OTBR.
sudo ot-ctl factoryreset
sudo ot-ctl dataset init new
Done
sudo ot-ctl dataset commit active
Done
sudo ot-ctl ifconfig up
Done
sudo ot-ctl thread start
Done
# Do not forget to change the pskc in commissioner config file.
sudo ot-ctl pskc
85e973c014fba5294fcca20910dcf5f1
Done
sudo ot-ctl state
leader
Done |
I never use it, it returns disabled.
factoryreset and reform - caused otbr-agent to start listening on port 49191. I have no idea why it was not listenining on port 49191 or why this was needed. With the exception of factoryreset, I have cleared the dataset and reformed numerous times the past several days during testing. So now my custom commissioner becomes the active commissioner. Further progress. I am using the cherry picked #188.
|
There lacks logging for the Border Agent events, I will create PR for this soon.
It is better to have the user be notified only once for a new Joiner request and we created #196 for this.
A DTLS connection will be established between the commissioner and joiner device, so it is expected that there will be multiple |
@wgtdkp I must apologize to you for the trouble with
I have now figured out that during my testing of your fix in #188, my custom commissioner was running in the background, having been started by 'systemd' at boot time on the OTBR. I neglected to disable it, so when I tried to run the test of #188 by hand, the port 49191 was not available because it was already in use. That is what triggered the above error. Again, sorry for that waste of your time. |
@krbvroc1 No worries!
Just out of curious, why your custom commissioner damon needs to listen on port |
My custom commissioner connects to the OTBR on port 49191
However it seems that once the OTBR receives a UDP 'connection' of 49191, it stops listening on that port for other connections.
but I did not. That is because it has already been started by systemd and OTBR was no longer listening on that port. |
I can confirm that this is true for current implementation. |
This commit includes several small changes: - Add logs for Border Agent Start and Stop events to help analysis commissioning issues such as openthread/ot-commissioner#193 (comment). - Start Border Agent when the native commissioner is stopped. - Add CLI command ba state to get current Border Agent state.
This commit includes several small changes: - Add logs for Border Agent Start and Stop events to help analysis commissioning issues such as openthread/ot-commissioner#193 (comment). - Start Border Agent when the native commissioner is stopped. - Add CLI command ba state to get current Border Agent state.
Previously I asked about an example and documentation #165
One was provided, but it looks like it was never merged #167
This morning, while trying to recreate what I did two months ago, I updated ot-commissioner to the latest commit, rebuilt my custom commissioner application, and it dies with an assertion after I have become active commissioner and I call SetCommissionerDataset();
It appears this is new code introduced in #185 @wgtdkp @jwhui
Other than backing out these changes, any idea what has broken? I am running my custom commissioner application on the border router (latest commit) and it does have a Mesh Local Prefix. The assert is that there is no Mesh Local Prefix.
Also the example code, when it gets merged in, may have highlighted this problem earlier?
The text was updated successfully, but these errors were encountered: