Closed farfarfromhome closed 10 months ago
I suspect you're using an outdated version of the Arduino framework.
That was it. Thanks for your quick response. I am hoping your library will fix instability I see with AsyncMqttClient.
fingers crossed. You're on esp32 so probably no need to use the async version and it will be more stable.
The simple-esp32 example fails to compile on Visual Studio/PlatformIO.
Processing ESP32Test (platform: espressif32; board: nodemcu-32s; framework: arduino) ---------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via
-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/nodemcu-32s.html PLATFORM: Espressif 32 (4.4.0+sha.314a54f) > NodeMCU-32S HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:~~~~~~ C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:89:9: note:candidate expects 3 arguments, 4 provided .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSync.cpp: In member function 'virtual bool espMqttClientInternals::ClientSync::connect(const char, uint16_t)': .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSync.cpp:43:71: error: no matching function for call to 'WiFiClient::setSocketOption(int, int, int, unsigned int)' client.setSocketOption(IPPROTO_TCP, TCP_NODELAY, &val, sizeof(int)); ^ In file included from .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSync.h:13, from .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSync.cpp:11: C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:89:9: note: candidate: 'int WiFiClient::setSocketOption(int, char, size_t)' int setSocketOption(int option, char* value, size_t len); ^
~~~~~~ C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiClient.h:89:9: note:candidate expects 3 arguments, 4 provided * [.pio\build\ESP32Test\libf12\espMqttClient\Transport\ClientSync.cpp.o] Error 1 .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.cpp: In member function 'virtual bool espMqttClientInternals::ClientSecureSync::connect(IPAddress, uint16_t)': .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.cpp:29:71: error: no matching function for call to 'WiFiClientSecure::setSocketOption(int, int, int, unsigned int)' client.setSocketOption(IPPROTO_TCP, TCP_NODELAY, &val, sizeof(int)); ^ In file included from .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.h:13, from .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.cpp:11: C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.h:83:9: note: candidate: 'int WiFiClientSecure::setSocketOption(int, char, size_t)' int setSocketOption(int option, char value, size_t len); ^
~~~~~~ C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.h:83:9: note: candidate expects 3 arguments, 4 provided .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.cpp: In member function 'virtual bool espMqttClientInternals::ClientSecureSync::connect(const char, uint16_t)': .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.cpp:43:71: error: no matching function for call to 'WiFiClientSecure::setSocketOption(int, int, int, unsigned int)' client.setSocketOption(IPPROTO_TCP, TCP_NODELAY, &val, sizeof(int)); ^ In file included from .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.h:13, from .pio/libdeps/ESP32Test/espMqttClient/src/Transport/ClientSecureSync.cpp:11: C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.h:83:9: note: candidate: 'int WiFiClientSecure::setSocketOption(int, char, size_t)' int setSocketOption(int option, char value, size_t len); ^~~~~~~ C:/Users/barry/.platformio/packages/framework-arduinoespressif32/libraries/WiFiClientSecure/src/WiFiClientSecure.h:83:9: note: candidate expects 3 arguments, 4 provided [.pio\build\ESP32Test\libf12\espMqttClient\Transport\ClientSecureSync.cpp.o] Error 1`