# ESP32 thing WiFi connection issues.

**URL:** <https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767>\
**Category:** Wifi\
**Created:** [April 12, 2022, 3:24pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767 "2022-04-12T15:24:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sixthsantos](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sixthsantos](https://community.sparkfun.com/u/sixthsantos)\
**Post date:** [April 12, 2022, 3:24pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/1 "2022-04-12T15:24:21Z")

</div>

Hello there,

I am having trouble connecting my esp32 thing to WIFI it will not work with any router or even the hot spot on my phone.

if I open the serial port in Auruino ide it get stuck on wifi conecting …

I have run the wifi scanner code it picks up the networks in the area.

The code being implemented is the (Example14\_NTRIPServer)

#include \<WiFi.h\>

#include “secrets.h”

WiFiClient ntripCaster;

#include \<Wire.h\>

#include \<SparkFun\_u-blox\_GNSS\_Arduino\_Library.h\> //[http://librarymanager/All#SparkFun\_u-blox\_GNSS](http://librarymanager/All#SparkFun_u-blox_GNSS)

SFE\_UBLOX\_GNSS myGNSS;

//Global Variables

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

long lastSentRTCM\_ms = 0; //Time of last data pushed to socket

int maxTimeBeforeHangup\_ms = 10000; //If we fail to get a complete RTCM frame after 10s, then disconnect from caster

uint32\_t serverBytesSent = 0; //Just a running total

long lastReport\_ms = 0; //Time of last report of bytes sent

//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

void setup()

{

Serial.begin(115200); // You may need to increase this for high navigation rates!

while (!Serial)

; //Wait for user to open terminal

Serial.println(F(“SparkFun u-blox Example”));

Wire.begin();

[//myGNSS.enableDebugging](https://myGNSS.enableDebugging)(); // Uncomment this line to enable debug messages

if (myGNSS.begin() == false) //Connect to the u-blox module using Wire port

{

Serial.println(F(“u-blox GNSS not detected at default I2C address. Please check wiring. Freezing.”));

while (1)

;

}

Serial.print(“Connecting to local WiFi”);

WiFi.begin(ssid, password);

while (WiFi.status() != WL\_CONNECTED)

{

delay(500);

Serial.print(“.”);

}

Serial.print("\nWiFi connected with IP: ");

Serial.println(WiFi.localIP());

Serial.print("\nWiFi connected with IP: ");

Serial.println(WiFi.localIP());

(secrets.h) Folder is as follows

//Your WiFi credentials

const char \*ssid = “Anthony’s iPhone”;

const char \*password = “test”;

//RTK2Go works well and is free

const char casterHost = “[caster.emlid.com](http://caster.emlid.com)”;

const uint16\_t casterPort = 2101;

const char mountPoint = “XXXXXX”; //The mount point you want to push data to

const char mountPointPW = “XXXXXX”;

Is something missing ?

Thank You!

Sixthsantos

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [April 12, 2022, 5:48pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/2 "2022-04-12T17:48:37Z")

</div>

Try putting \<secrets.h\> instead of “secrets.h” and see that gets it going…

Also, for the WiFi example [https://learn.sparkfun.com/tutorials/es … ample-wifi](https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide?_ga=2.47969312.68139774.1649691356-30930043.1643964608#arduino-example-wifi) - does the serial monitor return anything when inputting “0” to make the URL request?

---

<div class="post-metadata">

**Author:** ![sixthsantos](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sixthsantos](https://community.sparkfun.com/u/sixthsantos)\
**Post date:** [April 12, 2022, 6:16pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/3 "2022-04-12T18:16:32Z")

</div>

unfortunately \<secrets.h\> did not work returned with no such file or directory. Not sure what you mean by imputing “0”

---

<div class="post-metadata">

**Author:** ![sixthsantos](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sixthsantos](https://community.sparkfun.com/u/sixthsantos)\
**Post date:** [April 12, 2022, 6:35pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/4 "2022-04-12T18:35:44Z")

</div>

If your referring to the “0” button on the board then nothing occurs.

---

<div class="post-metadata">

**Author:** ![paulvha](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@paulvha](https://community.sparkfun.com/u/paulvha)\
**Post date:** [April 12, 2022, 7:12pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/5 "2022-04-12T19:12:19Z")

</div>

Try to choose an easier SSID to connect to instead of “Anthony’s iPhone”. Something “iphone”. Sometimes special characters or space are not appreciated

In the sketch print your SSID and password and double-check these are correct.

---

<div class="post-metadata">

**Author:** ![sixthsantos](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sixthsantos](https://community.sparkfun.com/u/sixthsantos)\
**Post date:** [April 13, 2022, 12:07am UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/6 "2022-04-13T00:07:17Z")

</div>

Thank you Paulvha! Changing the wifi ssid to a name without characters worked! Unfortunately now I can’t get it to connect to emlid. This may be a dumb question but in the serial viewer it has all the connections complete then goes to “Press any key to start serving” I press multiple keys and nothing happens. In the setup guide it shows this normal but I do I need to press something else? Then upon opening Tera viewer I get a bunch of characters and symbols not “total bytes sent to caster” I apologize for so many questions but I am total noob to programming.

Thank You!

Sixthsantos

---

<div class="post-metadata">

**Author:** ![paulvha](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@paulvha](https://community.sparkfun.com/u/paulvha)\
**Post date:** [April 13, 2022, 7:55am UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/7 "2022-04-13T07:55:54Z")

</div>

press on your keyboard. Normally that works.

The “bunch of symbols” is often the result of incorrect baudrate of the viewer. Needs to be set to 115200, 8,N,1

---

<div class="post-metadata">

**Author:** ![sixthsantos](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@sixthsantos](https://community.sparkfun.com/u/sixthsantos)\
**Post date:** [April 18, 2022, 3:47pm UTC](https://community.sparkfun.com/t/esp32-thing-wifi-connection-issues/43767/8 "2022-04-18T15:47:22Z")

</div>

Thank you paulvha! I had not seen the spot on the of the serial port window to send to the esp32 I was just just pressing keys on the keyboard lol!

Thank you!

Sixthsantos
