Skip to content

Support ESP-Now Version 2 packet size #11261

Open
@carstenkoester

Description

@carstenkoester

Related area

WiFi, ESP-Now

Hardware specification

No specific hardware

Is your feature request related to a problem?

As per the ESP-NOW User Guide and Programming guide, ESP-NOW supports Version v2.0 with an increased maximum packet length.

However, the current Arduino ESP-NOW library still truncates the packet at 250 bytes - ref. https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP_NOW/src/ESP32_NOW.cpp#L389-L391 and other places in that file.

Describe the solution you'd like

It would be useful to expose the increased packet size through the library, to allow users of the ESP-Now library to leverage the functionality of sending large packets.

Based on the documentation, it looks like ESP-NOW v1.0 vs v2.0 is merely a function of ESP-IDF versions. ie. older versions of ESP-IDF support version 1 packet size and newer versions of ESP-IDF support version 2 packet size, with no change in API and no hardware dependency (as in, one doesn't need to run a specific board to benefit from the ESP-NOW v2.0)? If that is the case, then it should be safe to simply replace references to ESP_NOW_MAX_DATA_LEN with ESP_NOW_MAX_DATA_LEN_V2 in these files.

I've tested this with the fork at https://github.com/espressif/arduino-esp32/compare/master...carstenkoester:arduino-esp32:espnow-v2-packet-size?expand=1 and at least in a basic test, was able to to transmit a 1000-byte ESP-NOW packet from an ESP32S3 dev board to an (older) Adafruit Huzzah32, with the change required on the transmitter side only. I haven't been able to test other variations eg. ESP_NOW_Serial though.

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions