Hi everybody,
I just bought a Nodemcu ESP8266 Lolin module but when I tried to connect it to a wifi router it wouldn't connect but it could connect to an android hotspot.
I have searched every topic here but still haven't found the solution.
I use 2.4ghz WiFi and Wpa2 password protocol
could the WiFi router be 5GHz?
I seem to remember the ESP8266 only works at 2.4GHz
post your code (using code tags </>)?
- post your test code in code tags.
- How long is your SSID on the router?
- How long is your Password on the router?
Is it a hidden network?
I use this basic code from esp8266 library documentation
#include <ESP8266WiFi.h>
void setup()
{
Serial.begin(115200);
Serial.println();
WiFi.begin("Ronggolawe", "12345678");
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println();
Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {}
Nope, it showing ini WiFi network
Wifi status code is 3 say it CONNECTED but when I test ping, result is RTO
The router configuration is also 2.4 ghz and the password 10 characters long
if I run the code of post 5 (after editing SSID and password) it compiles links and runs on a ESP8266 setting Tools>Board to ESP8266 Dev Module
serial monitor displays
Connecting.............
Connected, IP address: 192.168.1.65
if I ping 192.168.1.65 on a PC CMD displays
C:\Users\bb>ping 192.168.1.65
Pinging 192.168.1.65 with 32 bytes of data:
Reply from 192.168.1.65: bytes=32 time=163ms TTL=255
Reply from 192.168.1.65: bytes=32 time=79ms TTL=255
Reply from 192.168.1.65: bytes=32 time=100ms TTL=255
Reply from 192.168.1.65: bytes=32 time=20ms TTL=255
Ping statistics for 192.168.1.65:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 20ms, Maximum = 163ms, Average = 90ms
do you have control of the router?
if so can it display the connected device IPs etc?
Yes i do, serial monitor print I'm connected but router I don't see device name in there
But it android hotspot it works
My router is TP-LINK wr840n
my router device list under 2.4HZ the ESP8266 is displayed as
![]()
no idea what your problem is
Yeah, idk what cause of this problem ![]()
Looks like the problem is router
I had to change to old router with legacy mode
Now it works well
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.