Author Topic: NodeMCU suddenly cannot connect to internet  (Read 994 times)

0 Members and 1 Guest are viewing this topic.

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
NodeMCU suddenly cannot connect to internet
« on: June 25, 2018, 06:51:58 am »
My NodeMCU was, till yesterday, very easilly connecting to the internet.
Untill I installed a library, Thermistor_library-master.
From that moment the NodeMCU can no way connect to the internet!!!

I removed the library (deleted the library 's folder from C:\Users\Pan\Documents\Arduino), I tried previous sketches that worked 100% in the past, but NOTHING!
It cannot connect.
I even tried another (unused) NodeMCU and the same thing happens!
I 'm desperate, I don't know what to do!
Any help is welcome.

(I have made no changes to the router 's credentials or any of it 's settings)
« Last Edit: June 25, 2018, 08:13:44 am by panoss »
 

Offline Naguissa

  • Regular Contributor
  • *
  • Posts: 114
  • Country: es
    • Foro de electricidad, electrónica y DIY / HUM en español
Re: NodeMCU suddenly cannot connect to internet
« Reply #1 on: June 25, 2018, 12:11:36 pm »
Have you tried most simple solution? Restarting your WiFi/Router....


Sometimes routers, APs and so on goes nuts.....


My NodeMCU was, till yesterday, very easilly connecting to the internet.
Untill I installed a library, Thermistor_library-master.
From that moment the NodeMCU can no way connect to the internet!!!

I removed the library (deleted the library 's folder from C:\Users\Pan\Documents\Arduino), I tried previous sketches that worked 100% in the past, but NOTHING!
It cannot connect.
I even tried another (unused) NodeMCU and the same thing happens!
I 'm desperate, I don't know what to do!
Any help is welcome.

(I have made no changes to the router 's credentials or any of it 's settings)

Offline panossTopic starter

  • Frequent Contributor
  • **
  • Posts: 325
  • Country: gr
Re: NodeMCU suddenly cannot connect to internet
« Reply #2 on: June 25, 2018, 02:05:08 pm »
Yes, I tried this.

Well the solution was that I replaced this code:
Code: [Select]
    WiFi.begin(ssid, password);   

with this:
Code: [Select]
    WiFi.disconnect(true);
    WiFi.setAutoConnect(false);
    WiFi.setPhyMode(WIFI_PHY_MODE_11G);
    WiFi.begin(ssid, password);
    WiFi.printDiag(Serial);
    Serial.println(WiFi.getPhyMode());

and...got connected!!!

Then I removed the new code and replaced it with the old one:
Code: [Select]
    WiFi.begin(ssid, password);   
and works fine too!!!

I have no idea why the use of the previous code 'cured' it!! :-//
 
The following users thanked this post: Naguissa


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf