trap ICMP ping
Posted: Sat Feb 17, 2018 3:28 am
esp32/ 8266 both natively return a ping when pinged from other device.
I need to figure out how to trap the ping and respond with an LED.
I can't help but think if ping is native trapping it should be possible.
I found: #define ICMP_IRQ 15 is in Documents\Arduino\hardware\espressif\esp32\tools\sdk\include\lwip\lwip\icmp.h along with several others.
Is there some way to react to it maybe similar to:
with Debug set to Verbose there is no log out when i ping the ESP32.
I need to figure out how to trap the ping and respond with an LED.
I can't help but think if ping is native trapping it should be possible.
I found: #define ICMP_IRQ 15 is in Documents\Arduino\hardware\espressif\esp32\tools\sdk\include\lwip\lwip\icmp.h along with several others.
Is there some way to react to it maybe similar to:
Code: Select all
void WiFiEvent(WiFiEvent_t event)
{
switch (event) {
case SYSTEM_EVENT_AP_START:
WiFi.softAPsetHostname(AP_SSID);
break;
case SYSTEM_EVENT_STA_START:
WiFi.setHostname(AP_SSID);
break;
}
}