espressif / esp-now

A connectionless Wi-Fi communication protocol
Apache License 2.0
477 stars 90 forks source link

Provisioning doesn't work if CONFIG_ESPNOW_APP_SECURITY is enabled (AEGHB-519) #103

Closed MRusinov closed 5 months ago

MRusinov commented 5 months ago

If CONFIG_ESPNOW_APP_SECURITY is enabled then ESPNOW_DATA_LEN defined as ESPNOW_SEC_PACKET_MAX_SIZE which is defined as (ESPNOW_PAYLOAD_LEN - TAG_LEN - IV_LEN), i.e. 218 bytes total.

Calling espnow_prov_initiator_send() gives error on ret = espnow_send(ESPNOW_DATA_TYPE_PROV, responder_addr, prov_data, sizeof(espnow_prov_data_t), &frame_head, portMAX_DELAY); telling that data size is greater than ESPNOW_DATA_LEN (221 > 218)

lhespress commented 5 months ago

@MRusinov Please apply the patch as the attachment. prov.zip