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
ESP-NOW bi-directional communications --- send & receive
Re: ESP-NOW bi-directional communications --- send & receive
ESPNOW_WIFI_IF is only defined in:
esp-idf/examples/wifi/espnow/main/espnow_example.h
and no where in arduino-esp32.
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
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
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
-
- Posts: 5
- Joined: Wed Nov 08, 2017 6:50 pm
Re: ESP-NOW bi-directional communications --- send & receive
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: Google [Bot] and 43 guests