toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 41 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoJson @ 6.21.3
|-- ArduinoLog @ 1.1.1
|-- arduino-timer @ 2.3.1
|-- PubSubClient @ 2.8.0
|-- ESP8266HTTPUpdateServer @ 1.0
|-- ESP8266mDNS @ 1.2
|-- ESP8266WebServer @ 1.0
|-- ESP8266WiFi @ 1.0
|-- EEPROM @ 1.0
Building in release mode
Warning! We have just detected upload_port as IP address or host name of ESP device. upload_protocol is switched to espota.
Please specify upload_protocol = espota in platformio.ini project configuration file.
Compiling .pio\build\nodemcuv2\src\main.cpp.o
src\main.cpp: In function 'void onWifiConnect(const WiFiEventStationModeGotIP&)':
src\main.cpp:67:17: error: 'mDNS_NAME' was not declared in this scope
67 | if(MDNS.begin(mDNS_NAME)) {
| ^~~~~
src\main.cpp: In function 'void callback(char, byte, unsigned int)':
src\main.cpp:84:21: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
84 | for (int i = 0; i < length; i++) {
| ^~
src\main.cpp: In function 'void setup()':
src\main.cpp:224:17: error: 'mDNS_NAME' was not declared in this scope
224 | WiFi.hostname(mDNS_NAME);
| ^~~~~
*** [.pio\build\nodemcuv2\src\main.cpp.o] Error 1
====================================================================================== [FAILED] Took 4.86 seconds ======================================================================================
I'm not a programmer. Please be patient with me. I might be doing something wrong.
I saw you do some changes in the code which deals with mDNS_NAME
After performing a build, I get the following error:
Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
Verbose mode can be enabled via
-v, --verbose
option CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html PLATFORM: Espressif 8266 (4.2.1) > NodeMCU 1.0 (ESP-12E Module) HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash PACKAGES:upload_port
as IP address or host name of ESP device.upload_protocol
is switched toespota
. Please specifyupload_protocol = espota
inplatformio.ini
project configuration file. Compiling .pio\build\nodemcuv2\src\main.cpp.o src\main.cpp: In function 'void onWifiConnect(const WiFiEventStationModeGotIP&)': src\main.cpp:67:17: error: 'mDNS_NAME' was not declared in this scope 67 | if(MDNS.begin(mDNS_NAME)) { | ^~~~~ src\main.cpp: In function 'void callback(char, byte, unsigned int)': src\main.cpp:84:21: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare] 84 | for (int i = 0; i < length; i++) { |^~src\main.cpp: In function 'void setup()': src\main.cpp:224:17: error: 'mDNS_NAME' was not declared in this scope 224 | WiFi.hostname(mDNS_NAME); | ^~~~~ *** [.pio\build\nodemcuv2\src\main.cpp.o] Error 1 ====================================================================================== [FAILED] Took 4.86 seconds ======================================================================================