-
Notifications
You must be signed in to change notification settings - Fork 37
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 request command into commissioner #301
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR adds a DIAG_GET request command to the commissioner module, allowing users to request one or more diagnostic TLVs from a peer Thread device by setting the device's mesh local address and TLV mask bits flag. Supported Diagnostic TLVs ExtMacAddress Rloc16 Mode Route64 LeaderData Eui64 Ipv6Address ChildTable Test: config set pskc 445f2b5ca6f2a93a55ce570a70efeecb [done] start 192.168.9.2 49154 [done] diag get leaderdata { "DataVersion": 70, "PartitionId": 1612549395, "RouterId": 51, "StableDataVersion": 249, "Weighting": 64 } [done] diag get ipaddr { "Ipv6 Addresses": [ "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc31", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc11", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc10", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc38", "fd11:0022:0000:0000:0eff:b88e:150d:6192", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00", "fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00", "fdce:bb1d:37f6:6978:6346:d247:62e8:7ba8", "fe80:0000:0000:0000:bcda:4117:61f5:6516" ] } [done] diag get rloc16 { "Rloc16": "0xcc00" } [done] diag get rloc16 fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00 { "Rloc16": "0xcc00" } diag get route64 fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00 { "IdSequence": 20, "Mask": "0000000000001000", "RouteData": [ "{\n \"IncommingLinkQuality\": 0,\n \"OutgoingLinkQuality\": 0,\n \"RouteCost\": 1,\n \"RouterId\": 51\n}" ] } [done]
This PR adds a DIAG_GET request command to the commissioner module, allowing users to request one or more diagnostic TLVs from a peer Thread device by setting the device's mesh local address and TLV mask bits flag. Supported Diagnostic TLVs ExtMacAddress Rloc16 Mode Route64 LeaderData Eui64 Ipv6Address ChildTable Test: config set pskc 445f2b5ca6f2a93a55ce570a70efeecb [done] start 192.168.9.2 49154 [done] diag get leaderdata { "DataVersion": 70, "PartitionId": 1612549395, "RouterId": 51, "StableDataVersion": 249, "Weighting": 64 } [done] diag get ipaddr { "Ipv6 Addresses": [ "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc31", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc11", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc10", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc38", "fd11:0022:0000:0000:0eff:b88e:150d:6192", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00", "fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00", "fdce:bb1d:37f6:6978:6346:d247:62e8:7ba8", "fe80:0000:0000:0000:bcda:4117:61f5:6516" ] } [done] diag get rloc16 { "Rloc16": "0xcc00" } [done] diag get rloc16 fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00 { "Rloc16": "0xcc00" } diag get route64 fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00 { "IdSequence": 20, "Mask": "0000000000001000", "RouteData": [ "{\n \"IncommingLinkQuality\": 0,\n \"OutgoingLinkQuality\": 0,\n \"RouteCost\": 1,\n \"RouterId\": 51\n}" ] } [done]
This PR adds a DIAG_GET request command to the commissioner module, allowing users to request one or more diagnostic TLVs from a peer Thread device by setting the device's mesh local address and TLV mask bits flag. Supported Diagnostic TLVs ExtMacAddress Rloc16 Mode Route64 LeaderData Eui64 Ipv6Address ChildTable Test: config set pskc 445f2b5ca6f2a93a55ce570a70efeecb [done] start 192.168.9.2 49154 [done] diag get leaderdata { "DataVersion": 70, "PartitionId": 1612549395, "RouterId": 51, "StableDataVersion": 249, "Weighting": 64 } [done] diag get ipaddr { "Ipv6 Addresses": [ "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc31", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc11", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc10", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc38", "fd11:0022:0000:0000:0eff:b88e:150d:6192", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00", "fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00", "fdce:bb1d:37f6:6978:6346:d247:62e8:7ba8", "fe80:0000:0000:0000:bcda:4117:61f5:6516" ] } [done] diag get rloc16 { "Rloc16": "0xcc00" } [done] diag get rloc16 fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00 { "Rloc16": "0xcc00" } diag get route64 fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00 { "IdSequence": 20, "Mask": "0000000000001000", "RouteData": [ "{\n \"IncommingLinkQuality\": 0,\n \"OutgoingLinkQuality\": 0,\n \"RouteCost\": 1,\n \"RouterId\": 51\n}" ] } [done]
This PR adds a DIAG_GET request command to the commissioner module, allowing users to request one or more diagnostic TLVs from a peer Thread device by setting the device's mesh local address and TLV mask bits flag. Supported Diagnostic TLVs ExtMacAddress Rloc16 Mode Route64 LeaderData Eui64 Ipv6Address ChildTable Test: config set pskc 445f2b5ca6f2a93a55ce570a70efeecb [done] start 192.168.9.2 49154 [done] diag get leaderdata { "DataVersion": 70, "PartitionId": 1612549395, "RouterId": 51, "StableDataVersion": 249, "Weighting": 64 } [done] diag get ipaddr { "Ipv6 Addresses": [ "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc31", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc11", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc10", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc38", "fd11:0022:0000:0000:0eff:b88e:150d:6192", "fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00", "fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00", "fdce:bb1d:37f6:6978:6346:d247:62e8:7ba8", "fe80:0000:0000:0000:bcda:4117:61f5:6516" ] } [done] diag get rloc16 { "Rloc16": "0xcc00" } [done] diag get rloc16 fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00 { "Rloc16": "0xcc00" } diag get route64 fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00 { "IdSequence": 20, "Mask": "0000000000001000", "RouteData": [ "{\n \"IncommingLinkQuality\": 0,\n \"OutgoingLinkQuality\": 0,\n \"RouteCost\": 1,\n \"RouterId\": 51\n}" ] } [done]
ZhangLe2016
commented
Oct 14, 2024
std::string ToString() const; | ||
}; | ||
|
||
struct Child |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if the child data could be obtained by OT code
Is this PR obsoleted now? @ZhangLe2016 If true, could you close it? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a DIAG_GET request command to the commissioner module, allowing users to request one or more diagnostic TLVs from a peer Thread device by setting the device's mesh local address and TLV mask bits flag.
Supported Diagnostic TLVs
ExtMacAddress
Rloc16
Mode
Route64
LeaderData
Eui64
Ipv6Address
ChildTable
Test:
config set pskc 445f2b5ca6f2a93a55ce570a70efeecb
[done]
start 192.168.9.2 49154
[done]
diag get leaderdata
{
"DataVersion": 70,
"PartitionId": 1612549395,
"RouterId": 51,
"StableDataVersion": 249,
"Weighting": 64
}
[done]
diag get ipaddr
{
"Ipv6 Addresses": [
"fdce:bb1d:37f6:6978:0000:00ff:fe00:fc31",
"fdce:bb1d:37f6:6978:0000:00ff:fe00:fc11",
"fdce:bb1d:37f6:6978:0000:00ff:fe00:fc10",
"fdce:bb1d:37f6:6978:0000:00ff:fe00:fc38",
"fd11:0022:0000:0000:0eff:b88e:150d:6192",
"fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00",
"fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00",
"fdce:bb1d:37f6:6978:6346:d247:62e8:7ba8",
"fe80:0000:0000:0000:bcda:4117:61f5:6516"
]
}
[done]
diag get rloc16
{
"Rloc16": "0xcc00"
}
[done]
diag get rloc16 fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00
{
"Rloc16": "0xcc00"
}
diag get route64 fdce:bb1d:37f6:6978:0000:00ff:fe00:cc00
{
"IdSequence": 20,
"Mask": "0000000000001000",
"RouteData": [
"{\n "IncommingLinkQuality": 0,\n "OutgoingLinkQuality": 0,\n "RouteCost": 1,\n "RouterId": 51\n}"
]
}
[done]