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 request command into commissioner #297

Closed
wants to merge 6 commits into from

Conversation

ZhangLe2016
Copy link
Contributor

@ZhangLe2016 ZhangLe2016 commented Sep 26, 2024

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 rloc16

{
"Rloc16": "0xcc00"
}
[done]
diag get rloc16 fdce:bb1d:37f6:6978:0000:00ff:fe00:fc00

{
"Rloc16": "0xcc00"
}
[done]

ZhangLe2016 and others added 6 commits September 26, 2024 06:21
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": [
        "fdcebb1d37f66978000000fffe00fc37",
        "fdcebb1d37f66978000000fffe00fc11",
        "fdcebb1d37f66978000000fffe00fc10",
        "fdcebb1d37f66978000000fffe00fc38",
        "fd110022000000000effb88e150d6192",
        "fdcebb1d37f66978000000fffe00fc00",
        "fdcebb1d37f66978000000fffe00cc00",
        "fdcebb1d37f669786346d24762e87ba8",
        "fe80000000000000bcda411761f56516"
    ]
}
[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": [
        "fdcebb1d37f66978000000fffe00fc37",
        "fdcebb1d37f66978000000fffe00fc11",
        "fdcebb1d37f66978000000fffe00fc10",
        "fdcebb1d37f66978000000fffe00fc38",
        "fd110022000000000effb88e150d6192",
        "fdcebb1d37f66978000000fffe00fc00",
        "fdcebb1d37f66978000000fffe00cc00",
        "fdcebb1d37f669786346d24762e87ba8",
        "fe80000000000000bcda411761f56516"
    ]
}
[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": [
        "fdcebb1d37f66978000000fffe00fc37",
        "fdcebb1d37f66978000000fffe00fc11",
        "fdcebb1d37f66978000000fffe00fc10",
        "fdcebb1d37f66978000000fffe00fc38",
        "fd110022000000000effb88e150d6192",
        "fdcebb1d37f66978000000fffe00fc00",
        "fdcebb1d37f66978000000fffe00cc00",
        "fdcebb1d37f669786346d24762e87ba8",
        "fe80000000000000bcda411761f56516"
    ]
}
[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 ZhangLe2016 closed this Oct 9, 2024
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.

1 participant