-->
Page 1 of 1

Unable to make changes in WiFi.cpp file of ESP8266

PostPosted: Thu May 25, 2017 9:08 am
by sabiha patan 123
I have added Serial.print("xxx"); in WiFi.cpp file at the beginning of begin(ssid, pswrd) function. But those changes are not getting reflected (Text is not printed when WiFi.begin() is called) in the sketch.

How can I make changes in WiFi.cpp file (My objective is to add serial.print command to WiFi.cpp file)?

Re: Unable to make changes in WiFi.cpp file of ESP8266

PostPosted: Thu May 25, 2017 9:44 am
by QuickFix
Not sure if its wise to edit WiFi.cpp, you'd better use debug logging instead (whenever possible).

But to answer your question: presumably your Serial is not initialized yet (with Serial.begin()).

Re: Unable to make changes in WiFi.cpp file of ESP8266

PostPosted: Thu May 25, 2017 1:14 pm
by gbafamily1
You are changing the wrong file. WiFi.h is probably for the Arduino WiFi shield. The file you want is named ESP8266WiFi.cpp.