espressif / esp-now

A connectionless Wi-Fi communication protocol
Apache License 2.0
506 stars 93 forks source link

provisioning example problem (AEGHB-30) #12

Closed poky closed 1 year ago

poky commented 2 years ago

Hi, I have problem trying the provisioning example, the initiator works fine and able to retrieve the ssid/pass from the responder for the first 3 tries (manually resets for the testing purpose) , but after about 4 or 5 times, it shows the following warning and unable to retrieve ssid info, does anyone know what the problem might be? Thanks!

W (845) espnow_prov: [espnow_prov_initator_recv, 123]: recv_data->type != ESPNOW_PROV_TYPE_WIFI: 0

provisioning

The responder seems stopped working, but no error message, works again after reset, but same thing happened

LJYSP commented 2 years ago

It seems that countdown is error in provisioning_responder function, you can try this:

    for (int32_t start_ticks = xTaskGetTickCount(), recv_ticks = pdMS_TO_TICKS(30 * 1000); recv_ticks > 0;
            recv_ticks = pdMS_TO_TICKS(30 * 1000) - (xTaskGetTickCount() - start_ticks)) {
lhespress commented 1 year ago

@poky I see you poky reacted with thumbs up emoji, so it has resolve your issue, right? Please close the issue if yes, thanks.