d03n3rfr1tz3 / esp32-divoom

Divoom Proxy for ESP32
MIT License
8 stars 0 forks source link

Error on build #2

Closed JonasJoKuJonas closed 4 months ago

JonasJoKuJonas commented 4 months ago

Hi,

I really like your project, especially now that I can control it directly from an ESP and not have to use it near my HA instance.

But I ran into some issues on build. I don't know if the problem is on my side because I'm not very experienced, but I would appreciate a reply from you.

Error:

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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: 
 - framework-arduinoespressif32 @ 3.20006.221224 (2.0.6) 
 - tool-esptoolpy @ 1.40400.0 (4.4.0) 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 35 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AsyncTCP @ 1.1.1
|-- PubSubClient @ 2.8.0
|-- BluetoothSerial @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- WiFi @ 2.0.0
Building in release mode
Compiling .pio\build\esp32dev\src\hardware\bluetoothctl.cpp.o
Generating partitions .pio\build\esp32dev\partitions.bin
Compiling .pio\build\esp32dev\lib67e\AsyncTCP\AsyncTCP.cpp.o
Compiling .pio\build\esp32dev\libb5a\PubSubClient\PubSubClient.cpp.o
Compiling .pio\build\esp32dev\lib68c\BluetoothSerial\BTAddress.cpp.o
Compiling .pio\build\esp32dev\lib68c\BluetoothSerial\BTAdvertisedDeviceSet.cpp.o
Compiling .pio\build\esp32dev\lib68c\BluetoothSerial\BTScanResultsSet.cpp.o
Compiling .pio\build\esp32dev\lib68c\BluetoothSerial\BluetoothSerial.cpp.o
Compiling .pio\build\esp32dev\lib824\WiFi\WiFi.cpp.o
Compiling .pio\build\esp32dev\lib824\WiFi\WiFiAP.cpp.o
Compiling .pio\build\esp32dev\lib824\WiFi\WiFiClient.cpp.o
Compiling .pio\build\esp32dev\lib824\WiFi\WiFiGeneric.cpp.o
Compiling .pio\build\esp32dev\lib824\WiFi\WiFiMulti.cpp.o
src/hardware/bluetoothctl.cpp: In static member function 'static void BluetoothHandler::setup()':
src/hardware/bluetoothctl.cpp:19:37: error: no matching function for call to 'BluetoothSerial::register_callback(void (&)(esp_spp_cb_event_t, esp_spp_cb_param_t*))'
     serialBT.register_callback(event);
                                     ^
In file included from src/hardware/bluetoothctl.h:8,
                 from src/hardware/bluetoothctl.cpp:2:
C:/Users/k104j/.platformio/packages/framework-arduinoespressif32/libraries/BluetoothSerial/src/BluetoothSerial.h:56:19: note: candidate: 'esp_err_t BluetoothSerial::register_callback(void (**)(esp_spp_cb_event_t, esp_spp_cb_param_t*))'
         esp_err_t register_callback(esp_spp_cb_t * callback);
                   ^~~~~~~~~~~~~~~~~
C:/Users/k104j/.platformio/packages/framework-arduinoespressif32/libraries/BluetoothSerial/src/BluetoothSerial.h:56:19: note:   no known conversion for argument 1 from 'void(esp_spp_cb_event_t, esp_spp_cb_param_t*)' to 'void (**)(esp_spp_cb_event_t, esp_spp_cb_param_t*)'
src/hardware/bluetoothctl.cpp: In static member function 'static bool BluetoothHandler::check(bool)':
src/hardware/bluetoothctl.cpp:53:45: error: no matching function for call to 'BluetoothSerial::register_callback(void (&)(esp_spp_cb_event_t, esp_spp_cb_param_t*))'
             serialBT.register_callback(event);
                                             ^
In file included from src/hardware/bluetoothctl.h:8,
                 from src/hardware/bluetoothctl.cpp:2:
C:/Users/k104j/.platformio/packages/framework-arduinoespressif32/libraries/BluetoothSerial/src/BluetoothSerial.h:56:19: note: candidate: 'esp_err_t BluetoothSerial::register_callback(void (**)(esp_spp_cb_event_t, esp_spp_cb_param_t*))'
         esp_err_t register_callback(esp_spp_cb_t * callback);
                   ^~~~~~~~~~~~~~~~~
C:/Users/k104j/.platformio/packages/framework-arduinoespressif32/libraries/BluetoothSerial/src/BluetoothSerial.h:56:19: note:   no known conversion for argument 1 from 'void(esp_spp_cb_event_t, esp_spp_cb_param_t*)' to 'void (**)(esp_spp_cb_event_t, esp_spp_cb_param_t*)'
*** [.pio\build\esp32dev\src\hardware\bluetoothctl.cpp.o] Error 1
========================================================= [FAILED] Took 10.58 seconds =========================================================
d03n3rfr1tz3 commented 4 months ago

You tried to build it with Espressif 32 (5.4.0) and framework-arduinoespressif32 @ 3.20006.221224 (2.0.6), which both are a bit outdated by now. somewhere in between these versions and the latest versions, someone changed the definition of that callback, where you get an error now.

I fixed it by also adding concrete versions to the platformio.ini for both. therefore PlatformIO should automatically download and install the correct versions for you. 😎