ESP-NOW bi-directional communications --- send & receive

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: ESP-NOW bi-directional communications --- send & receive

Postby WiFive » Fri Jan 12, 2018 8:55 am

peer->ifidx = ESPNOW_WIFI_IF;

I think Mac address for espnow should be WiFi.macAddress() regardless of mode

State just means whether other device has added us as peer yet

robbyr
Posts: 8
Joined: Thu Jan 11, 2018 3:58 am

Re: ESP-NOW bi-directional communications --- send & receive

Postby robbyr » Fri Jan 12, 2018 9:46 am

ESPNOW_WIFI_IF is only defined in:

esp-idf/examples/wifi/espnow/main/espnow_example.h

and no where in arduino-esp32.

Code: Select all

/* ESPNOW can work in both station and softap mode. It is configured in menuconfig. */
#if CONFIG_STATION_MODE
#define ESPNOW_WIFI_MODE WIFI_MODE_STA
#define ESPNOW_WIFI_IF   ESP_IF_WIFI_STA
#else
#define ESPNOW_WIFI_MODE WIFI_MODE_AP
#define ESPNOW_WIFI_IF   ESP_IF_WIFI_AP
#endif
I had :
peer.ifidx = ESP_IF_WIFI_STA;

changed to:
peer.ifidx = ESP_IF_WIFI_AP;

And everything is HUNKY DORY!! That was the only change I needed to get it working. I still need to do some research to figure out why this is. and to understand it better.

Thank you so very much WiFive and chegewara! -R

forkus2000
Posts: 5
Joined: Wed Nov 08, 2017 6:50 pm

Re: ESP-NOW bi-directional communications --- send & receive

Postby forkus2000 » Tue Jan 30, 2018 2:44 am

I have the same problem !!! Can you publish both codes mastes and slave !!! with bidirectional communications !!! Thans again

Who is online

Users browsing this forum: No registered users and 66 guests