Skip to content

Conversation

@lucasssvaz
Copy link
Member

Description of Change

This pull request enhances the ESP-NOW library by introducing support for configuring and managing the PHY rate for individual peers, improving logging, and adding error handling for peer management operations. The changes ensure that rate configuration can be set per peer before initialization and are applied correctly when ESP-NOW starts or when peers are added.

PHY Rate Configuration Enhancements

  • Added ability to set and get PHY rate configuration for each peer via new setRate() and getRate() methods in ESP_NOW_Peer, and included a default rate configuration macro (DEFAULT_ESPNOW_RATE_CONFIG). [1] [2] [3] [4] [5]
  • Modified peer creation and addition logic to accept and use rate configuration, ensuring the correct rate is set when a peer is added and when ESP-NOW is started. [1] [2] [3] [4]
  • Implemented _esp_now_set_all_peers_rate() to apply rate configuration to all peers after ESP-NOW initialization.

Improved Logging and Error Handling

  • Enhanced log messages for peer addition, removal, and error cases, making debugging and peer management more transparent. [1] [2] [3]
  • Added error logs when ESP-NOW is not initialized for relevant operations, improving feedback for incorrect usage. [1] [2] [3]

API Documentation and Usability

  • Clarified usage in header comments and added documentation for new rate configuration methods, making the API easier to use and understand for developers. [1] [2]

These changes collectively improve the flexibility, reliability, and maintainability of the ESP-NOW library, especially for applications requiring custom PHY rate settings per peer.

Test Scenarios

Tested locally

@lucasssvaz lucasssvaz self-assigned this Dec 5, 2025
@lucasssvaz lucasssvaz added the Area: ESP-NOW Issues and Feature Request about ESP-NOW Protocol label Dec 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lucasssvaz, 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.
- 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 0f9035a

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

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
ESP32C50‼️ +2K0.00⚠️ +0.230⚠️ +160.00⚠️ +0.03
ESP32S30⚠️ +20280.00⚠️ +0.230⚠️ +160.00⚠️ +0.04
ESP32S20⚠️ +20280.00⚠️ +0.240⚠️ +160.00⚠️ +0.04
ESP32C30‼️ +2K0.00⚠️ +0.240⚠️ +160.00⚠️ +0.05
ESP32C60‼️ +2K0.00⚠️ +0.240⚠️ +160.00⚠️ +0.04
ESP320‼️ +2K0.00⚠️ +0.230⚠️ +160.00⚠️ +0.04
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32C5ESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
libraries/ESP_NOW/examples/ESP_NOW_Broadcast_Master‼️ +2K⚠️ +16⚠️ +1992⚠️ +16⚠️ +2000⚠️ +16‼️ +2K⚠️ +16‼️ +2K⚠️ +16‼️ +2K0
libraries/ESP_NOW/examples/ESP_NOW_Broadcast_Slave‼️ +2K0⚠️ +19920⚠️ +20160‼️ +2K0‼️ +2K0‼️ +2K0
libraries/ESP_NOW/examples/ESP_NOW_Network‼️ +2K0⚠️ +19800⚠️ +19760‼️ +2K0‼️ +2K⚠️ +16‼️ +2K⚠️ +16
libraries/ESP_NOW/examples/ESP_NOW_Serial‼️ +2K⚠️ +16⚠️ +2028⚠️ +16⚠️ +2028⚠️ +16‼️ +2K⚠️ +16‼️ +2K⚠️ +16‼️ +2K⚠️ +16

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

Test Results

 83 files   83 suites   25m 48s ⏱️
 55 tests  55 ✅ 0 💤 0 ❌
598 runs  598 ✅ 0 💤 0 ❌

Results for commit 505e9c3.

@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: ESP-NOW Issues and Feature Request about ESP-NOW Protocol Status: Pending Merge Pull Request is ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants