1

I want to know if the network to which esp connected has internet connectivity or not. How can I send a ping request using esp32?

  • We expect you to have done some basic research before asking a question (and explain why what you've found doesn't work) – hardillb May 3 '19 at 16:07
  • 2
    a quick google search of esp32 ping provides plenty of results. :-) – oh.dae.su May 3 '19 at 18:18
  • 1
    use the http client to fetch a small file/page from the internet, one that you expect will always be up. – dandavis May 10 '19 at 18:54
3

If you want to test internet connectivity the best way is to request http://google.com. If your device is connected to internet, you would get 301 as response code.

| improve this answer | |
0

You can ping some address and see if it is reachable. You can use this library for the same.

| improve this answer | |
  • Are you sure? That just means you are connected to an access point, not that you have internet access. – hardillb Apr 6 at 8:54
  • Ohh yeah, foolish me. I misunderstood something in the question. I have edited the answer. – Prateek Apr 6 at 12:04
  • This is now basically a link only answer which will become useless if the link breaks. – hardillb Apr 6 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.