espressif / esp-now

A connectionless Wi-Fi communication protocol
Apache License 2.0
486 stars 91 forks source link

The ESP-NOW frame length (AEGHB-98) #59

Closed petrkucerak closed 1 year ago

petrkucerak commented 1 year ago

In ESP-NOW documentation is described the frame format is as:

------------------------------------------------------------------------------------------------------------
| MAC Header | Category Code | Organization Identifier | Random Values | Vendor Specific Content |   FCS   |
------------------------------------------------------------------------------------------------------------
  24 bytes         1 byte              3 bytes               4 bytes             7~255 bytes        4 bytes

and the Vendor Specific Content:

-------------------------------------------------------------------------------
| Element ID | Length | Organization Identifier | Type | Version |    Body    |
-------------------------------------------------------------------------------
    1 byte     1 byte            3 bytes         1 byte   1 byte   0~250 bytes

I'd like to ask how is possible that the body length is 250 B, but if the Body is full, Vendor Specific Content is 257 B.

Is a problem in my thought or the specification is wrong?

Link for documentation: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_now.html The Reddit discusion: https://www.reddit.com/r/esp32/comments/11ruo1w/the_espnow_frame_length/

lhespress commented 1 year ago

@petrkucerak Thanks for your feedback, the Body length should be 0~248 bytes. We'll update the document ASAP.

lhespress commented 1 year ago

@petrkucerak The document has update, thanks again.

------------------------------------------------------------------------------------------------------------
| MAC Header | Category Code | Organization Identifier | Random Values | Vendor Specific Content |   FCS   |
------------------------------------------------------------------------------------------------------------
  24 bytes         1 byte              3 bytes               4 bytes             7~257 bytes        4 bytes