tobozo / ESP32-BLECollector

ᛡᛒ BLE Scanner + Data persistence on SD Card for M5Stack, M5Core2, Odroid-Go, ESP32-Wrover-Kit and other models
https://youtu.be/G07loGS04Vg
MIT License
276 stars 31 forks source link

M5Stack-fire Compile Error #45

Closed LuckyFishGeek closed 1 year ago

LuckyFishGeek commented 1 year ago

ESP32-Chimera-Core : 1.4.6 ESP32 Development Board : 2.0.3 device: M5Stack-fire

error log: `Arduino:1.8.19 (Windows 10), Development Board:"M5Stack-FIRE, Enabled, Default (2 x 6.5 MB app, 3.6 MB SPIFFS), 921600, Warn"

In file included from C:\Users\Administrator\Documents\Arduino\libraries\ESP32-Chimera-Core\src/ESP32-Chimera-Core-Config.h:1,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Display.h:1,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Settings.h:199,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\ESP32-BLECollector.ino:50:

C:\Users\Administrator\Documents\Arduino\libraries\ESP32-Chimera-Core\src/Config.h:55:21: note: #pragma message: ESP32 Arduino 2.0.3 (0x142fceb8) detected

     #pragma message "ESP32 Arduino 2.0.3 (0x142fceb8) detected"

                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Settings.h:265,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\ESP32-BLECollector.ino:50:

C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\UI.h: In static member function 'static void UIUtils::screenShot()':

UI.h:430:21: error: request for member 'snap' in 'M5.ChimeraCore::ECCKernel::ScreenShot', which is of pointer type 'ScreenShotService*' (maybe you meant to use '->' ?)

       M5.ScreenShot.snap("BLECollector", false); // filename prefix, show image after capture

                     ^~~~

In file included from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Settings.h:268,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\ESP32-BLECollector.ino:50:

C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\BLE.h: In static member function 'static void BLEScanUtils::screenShotTask(void*)':

BLE.h:904:23: error: request for member 'init' in 'M5.ChimeraCore::ECCKernel::ScreenShot', which is of pointer type 'ScreenShotService*' (maybe you meant to use '->' ?)

         M5.ScreenShot.init( &M5.Lcd, BLE_FS );

                       ^~~~

BLE.h:905:27: error: request for member 'begin' in 'M5.ChimeraCore::ECCKernel::ScreenShot', which is of pointer type 'ScreenShotService*' (maybe you meant to use '->' ?)

         if( M5.ScreenShot.begin() ) {

                           ^~~~~

C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\BLE.h: In static member function 'static void BLEScanUtils::scanInit()':

BLE.h:1200:17: error: 'class NimBLEScan' has no member named 'setAdvertisedDeviceCallbacks'

       pBLEScan->setAdvertisedDeviceCallbacks( FoundDeviceCallback );

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

request for member 'snap' in 'M5.ChimeraCore::ECCKernel::ScreenShot', which is of pointer type 'ScreenShotService*' (maybe you meant to use '->' ?)
tobozo commented 1 year ago

hey thanks for the feedback,

Looks like the BLECollector needs to catch up with the new versions of the core and libraries :wink: It may take some time tough as some parts of the app will need a full rewrite.

Meanwhile you can try those workarounds:

M5.ScreenShot errors

Either replace any instance of M5.ScreenShot. by a M5.ScreenShot-> as suggested by the error message, or downgrade the version of Chimera-Core until it does not complain.

I'd suggest the former as there was a significant gain in memory/flash space when the ScreenShot service was moved to pointers.

Nimble error:

Same temporary solution, downgrade the version in your library manager until it stops complaining.

LuckyFishGeek commented 1 year ago

Snipaste_2022-10-26_11-35-21 Modified like this?

tobozo commented 1 year ago

only -> sorry about the typo

image

tobozo commented 1 year ago

there are other errors after that, I'll push an update today but it'll be based on espressif package 2.0.5

tobozo commented 1 year ago

I've pushed an update on the master, tested on Arduino and Platformio with my old M5Fire, it's been running for half an hour without a glitch.

LuckyFishGeek commented 1 year ago

new error : 'class NimBLEScan' has no member named 'setAdvertisedDeviceCallbacks'

Compiler Environment:

ESP32-Chimera-Core 1.4.6 ESP32 Development Board : 2.0.5


log:

Arduino:1.8.19 (Windows 10), development board:"M5Stack-FIRE, Enabled, Default (2 x 6.5 MB app, 3.6 MB SPIFFS), 921600, None, Disabled"

In file included from C:\Users\Administrator\Documents\Arduino\libraries\ESP32-Chimera-Core\src/ESP32-Chimera-Core-Config.h:1,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Display.h:1,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Settings.h:199,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\ESP32-BLECollector.ino:50:

C:\Users\Administrator\Documents\Arduino\libraries\ESP32-Chimera-Core\src/Config.h:68:21: note: #pragma message: ESP32 Arduino 2.0.5 (0x2d6ca351) detected

     #pragma message "ESP32 Arduino 2.0.5 (0x2d6ca351) detected"

                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\Settings.h:268,

                 from C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\ESP32-BLECollector.ino:50:

C:\Users\Administrator\Desktop\ESP32-BLECollector-master\ESP32-BLECollector\BLE.h: In static member function 'static void BLEScanUtils::scanInit()':

BLE.h:1201:17: error: 'class NimBLEScan' has no member named 'setAdvertisedDeviceCallbacks'

       pBLEScan->setAdvertisedDeviceCallbacks( FoundDeviceCallback );

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

exit status 1

'class NimBLEScan' has no member named 'setAdvertisedDeviceCallbacks'
tobozo commented 1 year ago

update your Nimble-Arduino library to the latest release

LuckyFishGeek commented 1 year ago

ok i try it thanks

LuckyFishGeek commented 1 year ago

Compilation is complete, but nothing is displayed on the screen after install firmware

Snipaste_2022-10-26_22-22-09

I use Visual Studio Code to install the firmware Snipaste_2022-10-26_22-23-09

It's already night here. Thank you for your help. Go to bed earlier. Good night.

tobozo commented 1 year ago

just update all your libraries, this means LovyanGFX too

LuckyFishGeek commented 1 year ago

It may not be the libraries, I checked the ones already installed and they are all the latest versions Snipaste_2022-10-27_08-08-19 Snipaste_2022-10-27_08-08-47 Snipaste_2022-10-27_08-09-11 Snipaste_2022-10-27_08-07-55

tobozo commented 1 year ago

Those are screenshots from Arduino IDE, but you spoke about Visual Studio?

The NimbleScan error message is very strange, can you check you have only one installtion of Nimble-Arduino ?

It looks like you have an old one too :-)

LuckyFishGeek commented 1 year ago

Finally succeeded, I was too stupid! Thank you for your help! I wish you a good mood every day 1666833938371

LuckyFishGeek commented 1 year ago

The last question: what are the functions of the three buttons? I don't seem to see it in the readme documentation

tobozo commented 1 year ago

Brightness +/- and toggle the vendor filter (hides BLE addresses with unknown vendor)

        if( M5.BtnA.wasPressed() ) {
          UI.brightness -= UI.brightnessIncrement;
          setBrightnessCB();
        }
        if( M5.BtnB.wasPressed() ) {
          UI.brightness += UI.brightnessIncrement;
          setBrightnessCB();
        }
        if( M5.BtnC.wasPressed() ) {
          toggleFilterCB();
        }