khoih-prog / AsyncMQTT_Generic

Arduino Arduino Library for ESP8266, ESP32, Portenta_H7, STM32 and RP2040W asynchronous MQTT client implementation. This library, ported to support ESP32, WT32_ETH01 (ESP32 + LAN8720), ESP8266, Portenta_H7 (Ethernet or WiFi) and STM32 (LAN8742A or LAN8720 Ethernet), Teensy 4.1 using QNEthernet, RASPBERRY_PI_PICO_W with CYW43439 WiFi. Currently supporting TLS/SSL for ESP32 only
MIT License
61 stars 10 forks source link

Stuck on this error #24

Closed ajinkya-open closed 1 year ago

ajinkya-open commented 1 year ago

platform.ini file as below

[common]
# ------------------------------------------------------------------------------
# PLATFORM:
#   !! DO NOT confuse platformio's ESP8266 development platform with Arduino core for ESP8266
#   platformIO 1.5.0 = arduino core 2.3.0
#   platformIO 1.6.0 = arduino core 2.4.0
#   platformIO 1.7.3 = arduino core 2.4.1
#   platformIO 1.8.0 = arduino core 2.4.2
# ------------------------------------------------------------------------------
esp8266_platform_2_3_0 = espressif8266@1.5.0
esp8266_platform_2_4_0 = espressif8266@1.6.0
esp8266_platform_2_4_1 = espressif8266@1.7.3
esp8266_platform_2_4_2 = espressif8266@1.8.0

[env]
framework = arduino
upload_speed = 460800
monitor_speed = 38400

[env:esp8266_make]
platform = ${common.esp8266_platform_2_4_0}
# platform = ${common.esp8266_platform_2_4_1}
board = esp01_1m
#board = esp01
#board = esp12e
#board = esp01
#board_build.f_cpu = 80000000L

#for BTX type ic Z logo ic
board_build.flash_mode = dout 
build_flags = 
    -g 
    #-D DEBUG_FAUXMO=Serial 
    #-D  DEBUG_FAUXMO_VERBOSE_TCP=0 
    #-D  DEBUG_FAUXMO_VERBOSE_UDP=0 
    -D PIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
    #-D  PIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
    #-D PUYA_SUPPORT=1
    #-D XMC_SUPPORT=1
lib_deps =   
     vintlabs/FauxmoESP @ 3.4
     bblanchon/ArduinoJson @ 6.12
     knolleary/PubSubClient @ 2.8
     me-no-dev/ESP Async WebServer @ 1.2.2
     me-no-dev/ESPAsyncTCP @ 1.2.2
     me-no-dev/AsyncTCP @ 1.1.1
     khoih-prog/AsyncMQTT_Generic @ 1.8.0

lib_ignore =
   STM32Ethernet
   STM32duino LwIP
    WiFi
   Teensy41_AsyncTCP
   ESPAsync_WiFiManager
   WebServer_WT32_ETH01
   STM32AsyncTCP
   AsyncTCP_SSL
   AsyncTCP_RP2040W
   Portenta_H7_AsyncTCP
   WebServer_ESP32_W5500
   WebServer_ESP32_ENC

In file included from lib/async-mqtt-client-develop/src/AsyncMqttClient.hpp:29:0, from lib/async-mqtt-client-develop/src/AsyncMqttClient.cpp:1:

lib/async-mqtt-client-develop/src/AsyncMqttClient.cpp: In member function 'uint16_t AsyncMqttClient::publish(const char*, uint8_t, bool, const char*, size_t, bool, uint16_t)':
lib/async-mqtt-client-develop/src/AsyncMqttClient/Helpers.hpp:47:33: error: 'class EspClass' has no member named 'getMaxFreeBlockSize'
   #define GET_FREE_MEMORY() ESP.getMaxFreeBlockSize()
                                 ^
lib/async-mqtt-client-develop/src/AsyncMqttClient.cpp:739:30: note: in expansion of macro 'GET_FREE_MEMORY'
   if (_state != CONNECTED || GET_FREE_MEMORY() < MQTT_MIN_FREE_MEMORY) return 0;
                              ^
Compiling .pio/build/esp8266_make/lib500/async-mqtt-client-develop/AsyncMqttClient/Packets/Out/Connect.cpp.o
*** [.pio/build/esp8266_make/lib500/async-mqtt-client-develop/AsyncMqttClient.cpp.o] Error 1
ajinkya-open commented 1 year ago

compiled by updating libraries lets see if hardwre works as intended

updated platform ini

esp8266_platform_2_7_0 = espressif8266@2.5.0

[env]
framework = arduino
upload_speed = 460800
monitor_speed = 38400

[env:esp8266_make]
##platform = ${common.esp8266_platform_2_4_0}
platform = ${common.esp8266_platform_2_7_0}
# platform = ${common.esp8266_platform_2_4_1}
khoih-prog commented 1 year ago

Hi @ajinkya-open

It seems you're using the async-mqtt-client library. Then open the issue there.

Try to compile on Arduino IDE first if you're not familiar with how PIO is working. Also post the issue there if you can't figure out what's wrong.

Also try to include MRE so that other people can help you out.

The issue is closed now as not using this library.

Good Luck,