Giter VIP home page Giter VIP logo

esp32_ping's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esp32_ping's Issues

Memmory usage

Work fine, but after using the ESP32 a few hours it´s resets. Debugging i´ve found everytime i use ping_start(), eats 56 bytes of memory, resulting in a run out memory after a few hours working.
Here is the little piece of code i´m using to check my gateway:
if (ping_start(WiFi.gatewayIP(), 1, 0, 0, 5)) {PingCount=0; lcd.setCursor (10,0); lcd.print ((char)4);}
else {PingCount++; lcd.setCursor (10,0); lcd.print (" ");}

any ideas? thanks a lot

Arduino IDE can not compile pingtest.ino for ESP32

I am trying to complete a project in Arduino IDE using an ESP32 (mini kit MH ET Live).

Once a day, the code updates an RTC through NPT. The problem is that if there is no internet connection, the code stops.

To use a conditional that omits this instruction, I would need to verify that there is not an active connection to the Internet. I've thought about sending a ping and waiting for its return, but I have not found a library that works well for ESP32. I tried the libraries and the examples of ESP32_ping and ESP32Ping without success. The pbecchi library now gives an error that says it can not compile for the module that I use.

I would like to know how else I can verify that the ESP32 has an Internet connection.

I am a newbie in this field with three months since I started learning how to program. Hope someone can help me.

i hope this helps someone(:

void setup() {

Serial.begin(115200);
Serial.print("Connecting t ");
Serial.println(ssid);
// WiFi.mode(WIFI_STA);

WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.print("We got IP: ");
Serial.println(WiFi.localIP());
Serial.print("And gateway: ");
Serial.println(WiFi.gatewayIP());
}

// the loop function runs over and over again until power down or reset
void loop() {
Serial.print("For testing wifi we can always just ping the gateway");
if (ping_start(WiFi.gatewayIP(), 4, 0, 0, 5))
Serial.println("OK");
else
Serial.println("FAILED");
delay(10000);

}

'inet_addr_to_ipaddr' was not declared in this scope [SOLVED]

Thanks a lot for excellent library.

It works fine on ESP32, no compiler error.

Because something wrong on my PC, I did fresh install Windows 10 and Arduino IDE 1.8.8.

But after fresh install, ESP32 Ping doesn't work anymore.

Arduino IDE Compiler error in Ping.cpp line:

inet_addr_from_ipaddr(&to.sin_addr, addr);

The error message: 'inet_addr_to_ipaddr' was not declared in this scope

It seems this error cause by broken lwip library.

ESP32 Ping use 2 separate lwip libraries (Arduino library in C:\Program Files (x86)\Arduino and ESP32 library in C:\Users\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.1\tools\sdk\include\lwip\lwip folder).

But somehow the library connection is broken and cause 'inet_addr_to_ipaddr' was not declared in this scope error

Instead using Board Manager to install ESP32 package, also tried install ESP32 package by using git, but didn't help either. Still 'inet_addr_to_ipaddr' was not declared in this scope error

How to fix this error?

Please help...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.