Skip to content

feat(openthread): Add RLOC16 in otPrintNetworkInformation() #11480

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

Merged
merged 2 commits into from
Jun 18, 2025

Conversation

lboue
Copy link
Contributor

@lboue lboue commented Jun 18, 2025

By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes

Checklist

  1. Please provide specific title of the PR describing the change, including the component name (eg. „Update of Documentation link on Readme.md“)
  2. Please provide related links (eg. Issue which will be closed by this Pull Request)
  3. Please update relevant Documentation if applicable
  4. Please check Contributing guide
  5. Please confirm option to "Allow edits and access to secrets by maintainers" when opening a Pull Request

This entire section above can be deleted if all items are checked.


Description of Change

Add RLOC16 in otPrintNetworkInformation(). RLOC16, which represents the last 16 bits of the RLOC.
https://openthread.io/guides/thread-primer/ipv6-addressing#how_a_routing_locator_is_generated

Tests scenarios

Tested with ESP32-C6 DevKit. I got the RLOC16

09:19:59.609 -> ==============================================
09:19:59.609 -> Role: Router
09:19:59.609 -> RLOC16: 0x3c00
09:19:59.609 -> Network Name: MyHome
09:19:59.609 -> Channel: 25
09:19:59.609 -> PAN ID: 0x1234
09:19:59.609 -> Extended PAN ID: a748dbb0ecc9****
09:19:59.609 -> Network Key: 7226b9ec8288c183a90c8ee53f******

Related links

Closes #11479

@lboue lboue requested a review from SuGlider as a code owner June 18, 2025 09:25
Copy link
Contributor

github-actions bot commented Jun 18, 2025

Warnings
⚠️

The source branch "RLOC16" incorrect format:

  • contains uppercase letters. This can cause troubles on case-insensitive file systems (macOS).
    Please rename your branch.

👋 Hello lboue, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 9b18d00

Copy link
Contributor

github-actions bot commented Jun 18, 2025

Test Results

 76 files   76 suites   12m 45s ⏱️
 38 tests  38 ✅ 0 💤 0 ❌
241 runs  241 ✅ 0 💤 0 ❌

Results for commit 9b18d00.

♻️ This comment has been updated with latest results.

Copy link
Contributor

Memory usage test (comparing PR against master branch)

The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32C6💚 -110K⚠️ +50💚 -10.440.00💚 -3840💚 -0.820.00
ESP32H2💚 -110K⚠️ +46💚 -10.250.00💚 -3760💚 -0.820.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C6ESP32H2
ExampleFLASHRAMFLASHRAM
libraries/OpenThread/examples/CLI/COAP/coap_lamp0000
libraries/OpenThread/examples/CLI/COAP/coap_switch0000
libraries/OpenThread/examples/CLI/SimpleCLI0000
libraries/OpenThread/examples/CLI/SimpleNode⚠️ +460⚠️ +460
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/ExtendedRouterNode⚠️ +500⚠️ +460
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/LeaderNode0000
libraries/OpenThread/examples/CLI/SimpleThreadNetwork/RouterNode0000
libraries/OpenThread/examples/CLI/ThreadScan0000
libraries/OpenThread/examples/CLI/onReceive0000
libraries/OpenThread/examples/Native/SimpleThreadNetwork/LeaderNode💚 -110K💚 -384💚 -110K💚 -376
libraries/OpenThread/examples/Native/SimpleThreadNetwork/RouterNode💚 -110K💚 -384💚 -110K💚 -376

@SuGlider SuGlider added Area: OpenThread Issues and Feature Request about OpenThread Protocol Status: Review needed Issue or PR is awaiting review labels Jun 18, 2025
@SuGlider SuGlider added this to the 3.2.1 milestone Jun 18, 2025
@SuGlider SuGlider moved this from Todo to In Review in Arduino ESP32 Core Project Roadmap Jun 18, 2025
@SuGlider
Copy link
Collaborator

Thanks @lboue! LGTM.

@SuGlider SuGlider added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Jun 18, 2025
@SuGlider SuGlider merged commit f788911 into espressif:master Jun 18, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OpenThread Issues and Feature Request about OpenThread Protocol Status: Pending Merge Pull Request is ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

[Request] Add RLOC16 in console output running RouterNode.
3 participants