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

[border-agent] add logging for border agent events #6481

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

wgtdkp
Copy link
Member

@wgtdkp wgtdkp commented Apr 19, 2021

This PR includes several small changes:

  1. Add logs for Border Agent Start and Stop events to help analysis commissioning issues such as Custom commissioner assertion ot-commissioner#193 (comment).
  2. Start Border Agent when the native commissioner is stopped.
  3. Add CLI command ba state to get current Border Agent state.

@google-cla google-cla bot added the cla: yes label Apr 19, 2021
@size-report
Copy link

size-report bot commented Apr 19, 2021

Size Report of OpenThread

Merging #6481 into main(8a0e7b8).

name branch text data bss total
ot-cli-ftd_1.1 main 429128 784 56224 486136
#6481 429400 784 56224 486408
+/- +272 0 0 +272
ot-cli-mtd_1.1 main 346960 784 46104 393848
#6481 347208 784 46104 394096
+/- +248 0 0 +248
ot-ncp-ftd_1.1 main 417720 784 59064 477568
#6481 417888 784 59064 477736
+/- +168 0 0 +168
ot-ncp-mtd_1.1 main 338860 784 48952 388596
#6481 339028 784 48952 388764
+/- +168 0 0 +168
ot-rcp_1.1 main 56764 564 19940 77268
#6481 56764 564 19940 77268
+/- 0 0 0 0
libopenthread-cli-ftd.a_1.1 main 43719 0 452 44171
#6481 43814 0 452 44266
+/- +95 0 0 +95
libopenthread-cli-mtd.a_1.1 main 35760 0 444 36204
#6481 35855 0 444 36299
+/- +95 0 0 +95
libopenthread-ftd.a_1.1 main 229511 24 38368 267903
#6481 229680 24 38368 268072
+/- +169 0 0 +169
libopenthread-mtd.a_1.1 main 161119 24 28256 189399
#6481 161288 24 28256 189568
+/- +169 0 0 +169
libopenthread-ncp-ftd.a_1.1 main 31352 0 5852 37204
#6481 31352 0 5852 37204
+/- 0 0 0 0
libopenthread-ncp-mtd.a_1.1 main 26200 0 5852 32052
#6481 26200 0 5852 32052
+/- 0 0 0 0
libopenthread-rcp.a_1.1 main 8703 0 4988 13691
#6481 8703 0 4988 13691
+/- 0 0 0 0
libopenthread-radio.a_1.1 main 14307 0 150 14457
#6481 14307 0 150 14457
+/- 0 0 0 0
ot-cli-ftd_1.2 main 451836 784 65076 517696
#6481 452084 784 65076 517944
+/- +248 0 0 +248
ot-cli-mtd_1.2 main 362036 784 46644 409464
#6481 362292 784 46644 409720
+/- +256 0 0 +256
ot-ncp-ftd_1.2 main 439296 784 67916 507996
#6481 439464 784 67916 508164
+/- +168 0 0 +168
ot-ncp-mtd_1.2 main 352232 784 49492 402508
#6481 352400 784 49492 402676
+/- +168 0 0 +168
ot-rcp_1.2 main 58064 564 19992 78620
#6481 58064 564 19992 78620
+/- 0 0 0 0
libopenthread-cli-ftd.a_1.2 main 46539 0 452 46991
#6481 46634 0 452 47086
+/- +95 0 0 +95
libopenthread-cli-mtd.a_1.2 main 38079 0 444 38523
#6481 38174 0 444 38618
+/- +95 0 0 +95
libopenthread-ftd.a_1.2 main 249005 24 47032 296061
#6481 249174 24 47032 296230
+/- +169 0 0 +169
libopenthread-mtd.a_1.2 main 173284 24 28608 201916
#6481 173453 24 28608 202085
+/- +169 0 0 +169
libopenthread-ncp-ftd.a_1.2 main 33076 0 5852 38928
#6481 33076 0 5852 38928
+/- 0 0 0 0
libopenthread-ncp-mtd.a_1.2 main 27460 0 5852 33312
#6481 27460 0 5852 33312
+/- 0 0 0 0
libopenthread-rcp.a_1.2 main 8703 0 4988 13691
#6481 8703 0 4988 13691
+/- 0 0 0 0
libopenthread-radio.a_1.2 main 15265 0 182 15447
#6481 15265 0 182 15447
+/- 0 0 0 0

Copy link
Member

@bukepo bukepo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this will conflict with #6450. Can we hold on this PR until #6450 is merged?

@wgtdkp
Copy link
Member Author

wgtdkp commented Apr 19, 2021

I guess this will conflict with #6450. Can we hold up this PR until #6450 is merged?

OK to me, not an urgent PR.

Copy link
Member

@simonlingoogle simonlingoogle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #6481 (cc05fd9) into main (8a0e7b8) will decrease coverage by 0.02%.
The diff coverage is 67.74%.

@@            Coverage Diff             @@
##             main    #6481      +/-   ##
==========================================
- Coverage   86.10%   86.08%   -0.03%     
==========================================
  Files         429      429              
  Lines       55101    55120      +19     
==========================================
+ Hits        47447    47452       +5     
- Misses       7654     7668      +14     
Impacted Files Coverage Δ
src/core/meshcop/border_agent.hpp 28.57% <ø> (+14.28%) ⬆️
src/cli/cli.cpp 84.24% <47.36%> (-0.31%) ⬇️
src/core/meshcop/border_agent.cpp 24.07% <100.00%> (+0.47%) ⬆️
src/core/meshcop/commissioner.cpp 93.91% <100.00%> (ø)
src/core/thread/mesh_forwarder_ftd.cpp 89.50% <0.00%> (-1.75%) ⬇️
src/core/thread/indirect_sender.cpp 93.62% <0.00%> (-0.99%) ⬇️
src/core/mac/mac_frame.hpp 96.29% <0.00%> (-0.93%) ⬇️
src/core/thread/mle_router.cpp 90.97% <0.00%> (-0.36%) ⬇️
src/core/thread/mle.cpp 94.38% <0.00%> (-0.32%) ⬇️
src/core/border_router/routing_manager.cpp 94.61% <0.00%> (-0.21%) ⬇️
... and 9 more

@wgtdkp wgtdkp requested a review from bukepo April 26, 2021 11:58
@wgtdkp wgtdkp requested a review from jwhui April 26, 2021 12:08
@jwhui jwhui merged commit 92335ef into openthread:main Apr 26, 2021
Abhayakara pushed a commit to Abhayakara/openthread that referenced this pull request Oct 6, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants