Closed
Description
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.1
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Ubuntu
Description:
The ESP32 dos not answer ARP requests.
At startup, the ESP32 sends a gratuitous ARP.
Once ESP32 startup is complete, I flush the arp cache on my Ubuntu machine (sudo ip -s -s neigh flush all) and attempt to ping the ESP32. The ARP requests sent by my machine are left unanswered.
I suspect this is a known issue, as the ESP32 sends gratuitous ARP about once per minute. This works as a temporary workaround, but in some applications, ARP requests need to be answered.
Sketch: (leave the backquotes for code formatting)
//Change the code below by your sketch
#include <WiFi.h>
#include <aREST.h>
// WiFi parameters
String ssid = "MYSSID";
String password= "MYPASSWORD";
#pragma region aRESTandWiFi
// The port to listen for incoming TCP connections
#define LISTEN_PORT 80
// Create an instance of the server
WiFiServer server(LISTEN_PORT);
void setup(void)
{
// Start Serial
Serial.begin(115200);
delay(5000);
// Connect to WiFi
Serial.print("Connecting to wifi with ssid/password: " + ssid + "/" + password);
WiFi.begin(ssid.c_str(), password.c_str());
while (WiFi.status() != WL_CONNECTED) {
delay(500);
//write_to_logs("...");
}
Serial.print("WiFi connected");
Serial.print("\n");
Serial.print(WiFi.localIP()); // Print the IP address
Serial.print("\n");
}
void loop() {
}
Debug Messages:
Connecting to wifi with ssid/password: MYSSID/MYPASSWORD[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:342] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:385] _eventCallback(): STA IP: 192.168.1.39, MASK: 255.255.255.0, GW: 192.168.1.1
WiFi connected
192.168.1.39