ECTO-1A / AppleJuice

Apple BLE proximity pairing message spoofing
Apache License 2.0
1.7k stars 147 forks source link

Compilation error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'String' #64

Open zeorzero15 opened 10 months ago

zeorzero15 commented 10 months ago
C:\Users\admin\Desktop\EvilAppleJuice-ESP32-master\src\EvilAppleJuice-ESP32-INO\EvilAppleJuice-ESP32-INO.ino: In function 'void loop()': C:\Users\admin\Desktop\EvilAppleJuice-ESP32-master\src\EvilAppleJuice-ESP32-INO\EvilAppleJuice-ESP32-INO.ino:80:37: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'String' 80 oAdvertisementData.addData(std::string((char*)DEVICES[index], 31)); ^~~~~~~~~
std::string {aka std::__cxx11::basic_string}
In file included from C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEServer.h:22, from C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEDevice.h:21, from C:\Users\admin\Desktop\EvilAppleJuice-ESP32-master\src\EvilAppleJuice-ESP32-INO\EvilAppleJuice-ESP32-INO.ino:5: C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEAdvertising.h:36:29: note: initializing argument 1 of 'void BLEAdvertisementData::addData(String)' 36 void addData(String data); // Add data to the payload. ~^~ C:\Users\admin\Desktop\EvilAppleJuice-ESP32-master\src\EvilAppleJuice-ESP32-INO\EvilAppleJuice-ESP32-INO.ino:83:37: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'String' 83 oAdvertisementData.addData(std::string((char*)SHORT_DEVICES[index], 23)); ^~~~~~~~~~~
std::string {aka std::__cxx11::basic_string}

C:\Users\admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEAdvertising.h:36:29: note: initializing argument 1 of 'void BLEAdvertisementData::addData(String)' 36 | void addData(String data); // Add data to the payload. | ~^~

exit status 1

Compilation error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'String'

DimitriiVM commented 8 months ago
Добрый день. Такая же проблема пол года назад компилился скейтч сейчас собрать нужно было еще и перестал работать. Что может быть? "C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\esp-12.2.0_20230208/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-3662303f31/esp32/flags/cpp_flags" -Wall -Werror=all -Wextra -Os -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ADAFRUIT_FEATHER_ESP32_V2 -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ADAFRUIT_FEATHER_ESP32_V2\"" "-DARDUINO_VARIANT=\"adafruit_feather_esp32_v2\"" -DARDUINO_PARTITION_default_8MB "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:adafruit_feather_esp32_v2:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashSize=8M,PartitionScheme=default_8MB,DebugLevel=none,PSRAM=enabled,LoopCore=1,EventsCore=1,EraseFlash=none,ZigbeeMode=default\"" -DESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue -mfix-esp32-psram-cache-strategy=memw -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-3662303f31/esp32/flags/defines" "-ID:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2" -iprefix "C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-3662303f31/esp32/include/" "@C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-3662303f31/esp32/flags/includes" "-IC:\Users\Admin\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.1-3662303f31/esp32/dio_qspi/include" "-IC:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\cores\esp32" "-IC:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\variants\adafruit_feather_esp32_v2" "-Ic:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src" "-IC:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src" "@C:\Users\Admin\AppData\Local\Temp\arduino\sketches\AF478D17A30836E2BCF0AE2E8D96BC36/build_opt.h" "@C:\Users\Admin\AppData\Local\Temp\arduino\sketches\AF478D17A30836E2BCF0AE2E8D96BC36/file_opts" "C:\Users\Admin\AppData\Local\Temp\arduino\sketches\AF478D17A30836E2BCF0AE2E8D96BC36\sketch\BLE_iBeacon2.ino.cpp" -o "C:\Users\Admin\AppData\Local\Temp\arduino\sketches\AF478D17A30836E2BCF0AE2E8D96BC36\sketch\BLE_iBeacon2.ino.cpp.o" In file included from C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLECharacteristic.h:20, from C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEService.h:18, from C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEClient.h:23, from C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEUtils.h:19, from D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino:3: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEDescriptor.h:28:7: error: redefinition of 'class BLEDescriptor' 28 class BLEDescriptor { ^~~~~ In file included from c:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src/BLECharacteristic.h:25, from c:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src/BLEService.h:23, from c:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src/BLEDevice.h:25, from D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino:2: c:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src/BLEDescriptor.h:28:7: note: previous definition of 'class BLEDescriptor' 28 class BLEDescriptor { ^~~~~ C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLECharacteristic.h:56:7: error: redefinition of 'class BLECharacteristic' 56 class BLECharacteristic { ^~~~~ c:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src/BLECharacteristic.h:45:7: note: previous definition of 'class BLECharacteristic' 45 class BLECharacteristic { ^~~~~ C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEService.h:52:7: error: redefinition of 'class BLEService' 52 class BLEService { ^~~~~~ c:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE\src/BLEService.h:28:7: note: previous definition of 'class BLEService' 28 class BLEService { ^~~~~~ D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino: In function 'void setBeacon()': D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino:101:30: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'String' 101 oAdvertisementData.addData(strServiceData); ^~~~~~
std::string {aka std::__cxx11::basic_string}

In file included from C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEServer.h:22, from C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEService.h:19: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE\src/BLEAdvertising.h:36:29: note: initializing argument 1 of 'void BLEAdvertisementData::addData(String)' 36 | void addData(String data); // Add data to the payload. | ~^~ D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino: In function 'void setup()': D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino:122:14: error: 'init' is not a member of 'BLEDevice' 122 | BLEDevice::init(""); | ^~~~ D:\Project\ARDUINO ESP32\BluetoothSerialTEST\BLE_iBeacon2\BLE_iBeacon2.ino:127:29: error: 'getAdvertising' is not a member of 'BLEDevice' 127 | pAdvertising = BLEDevice::getAdvertising(); | ^~~~~~ Multiple libraries were found for "BLEDevice.h" Used: C:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE Not used: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE Using library ArduinoBLE at version 1.3.6 in folder: C:\Users\Admin\Documents\Arduino\libraries\ArduinoBLE Using library BLE at version 2.0.0 in folder: C:\Users\Admin\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-alpha3\libraries\BLE exit status 1

Compilation error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string'} to 'String'