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

[api] enable DIAG_GET query function into commissioner #304

Merged
merged 9 commits into from
Nov 26, 2024

Conversation

ZhangLe2016
Copy link
Contributor

@ZhangLe2016 ZhangLe2016 commented Nov 25, 2024

This PR adds DIAG_GET query command into the commissioner module, all owing users to query diagnostic TLV (ExtMacAddr) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb

[done]
> start 192.168.9.2 49154
[done]
> netdiag query extaddr

Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]

…owing users to query diagnostic TLV (Ipv6Address) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb

[done]
> start 192.168.9.2 49154
[done]
> diag query extmac

Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
> diag query rloc16 fda1:7966:fc90:d97:0:ff:fe00:bc00

Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "MacAddr": 48128
}
[done]
…owing users to query diagnostic TLV (Ipv6Address) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extmac
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
>> diag query rloc16 fda1:7966:fc90:d97:0:ff:fe00:bc00
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "MacAddr": 48128
}
[done]
…owing users to query diagnostic TLV (Ipv6Address) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extmac
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
>> diag query rloc16 fda1:7966:fc90:d97:0:ff:fe00:bc00
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "MacAddr": 48128
}
[done]
…owing users to query diagnostic TLV (Ipv6Address) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extmac
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
>> diag query rloc16 fda1:7966:fc90:d97:0:ff:fe00:bc00
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "MacAddr": 48128
}
[done]
@ZhangLe2016 ZhangLe2016 changed the title This PR adds DIAG_GET query command into the commissioner module, all… [api] enable DIAG_GET query function into commissioner Nov 25, 2024
@ZhangLe2016 ZhangLe2016 requested a review from wgtdkp November 25, 2024 06:03
@ZhangLe2016 ZhangLe2016 marked this pull request as ready for review November 25, 2024 06:03
include/commissioner/commissioner.hpp Outdated Show resolved Hide resolved
src/app/cli/interpreter.cpp Outdated Show resolved Hide resolved
tests/integration/test_cli.sh Outdated Show resolved Hide resolved
This PR adds DIAG_GET query command into the commissioner module, allowing users to query diagnostic TLV (extaddr) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extaddr
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
This PR adds DIAG_GET query command into the commissioner module, allowing users to query diagnostic TLV (extaddr) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extaddr
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
include/commissioner/commissioner.hpp Outdated Show resolved Hide resolved
include/commissioner/commissioner.hpp Outdated Show resolved Hide resolved
include/commissioner/commissioner.hpp Outdated Show resolved Hide resolved
include/commissioner/commissioner.hpp Outdated Show resolved Hide resolved
src/app/cli/interpreter.cpp Outdated Show resolved Hide resolved
src/library/commissioner_impl.cpp Show resolved Hide resolved
This PR adds DIAG_GET query command into the commissioner module, allowing users to query diagnostic TLV (extaddr) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extaddr
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
This PR adds DIAG_GET query command into the commissioner module, allowing users to query diagnostic TLV (extaddr) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extaddr
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
This PR adds DIAG_GET query command into the commissioner module, allowing users to query diagnostic TLV (extaddr) from a peer Thread device by setting the device's mesh local address than TLV mask bits flag.

Test:

>> config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
>> start 192.168.9.2 49154
[done]
>> diag query extaddr
Peer Address: fda1:7966:fc90:d97:0:ff:fe00:bc00
Content: {
    "ExtMacAddr": "6e56946f67040080"
}
[done]
@ZhangLe2016 ZhangLe2016 requested a review from jwhui November 25, 2024 10:03
@ZhangLe2016
Copy link
Contributor Author

@jwhui , could you please review this PR for me? Thanks a lot.

@ZhangLe2016
Copy link
Contributor Author

@jwhui Could you please take a look at my code? I would be very grateful for your feedback.

@jwhui jwhui merged commit 3d6e813 into openthread:main Nov 26, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants