Open DrkRCR opened 5 months ago
I'm having the exact same problem
same issue.
Same issue as well...no idea how to fix but AI says to rework BleKeyboard.cpp lol :(.
EDIT— got it working on the BLECombo fork, will share what I did in a sec
same issue.
Fixed it by looking at a recent pull request: https://github.com/T-vK/ESP32-BLE-Keyboard/pull/303
All you gotta do is change BleKeyboard.h/c where he made the changes! Works like a charm now.
thanks! Will try later
Hey guys, im super new to ESP32's, but im having the same issue.
dkyazzentwatwa when you say change the BleKeyboard.h/c what do you mean by that? Can you specify exactly where I should go to make those changes? If you could help me on this I would really appreciate that man.
OK here's what worked for me (this note is for other beginners who are a bit stuck!):
Open BleKeyboard.h and BleKeyboard.cpp in your text editor (in your libraries folder)
Go to the link posted by [dkyazzentwatwa] https://github.com/T-vK/ESP32-BLE-Keyboard/pull/303
Use Find/Replace and replace all instances of std::string with String
Save, and recompile.
Thanks to dkyazzentwatwa for finding it for us!
Thanks, Your Replies really helped me I was almost giving up!
fyi for anyone else: just doing a find and replace for std::string is not enough enough as there are other changes in line 100 necessary (see PR linked above).
Why is this not getting merged if a fix is known for this issue?
~~~~~In file included from c:\Users\vedde\Documents\Arduino\libraries\ESP32_BLE_Keyboard\BleKeyboard.cpp:7: C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLEDevice.h:41:27: note: initializing argument 1 of 'static void BLEDevice::init(String)' 41 | static void init(String deviceName); // Initialize the local BLE environment. |'} to 'String'
78 | void setValue(String value);
| '} to 'uint16_t&' {aka 'short unsigned int&'}
79 | void setValue(uint16_t &data16);
| cxx11::basic_string'} to 'uint32_t&' {aka 'long unsigned int&'}
80 | void setValue(uint32_t &data32);
| '} to 'int&'
81 | void setValue(int &data32);
| '} to 'float&'
82 | void setValue(float &data32);
| cxx11::basic_string'} to 'double&'
83 | void setValue(double &data64);
|
~^~~~ c:\Users\vedde\Documents\Arduino\libraries\ESP32_BLE_Keyboard\BleKeyboard.cpp:116:32: error: no matching function for call to 'BLECharacteristic::setValue(std::string&)' 116 | hid->manufacturer()->setValue(deviceManufacturer); |~~~~~~~^~~~~~ In file included from C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLEServer.h:23, from C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLEDevice.h:21: C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:77:8: note: candidate: 'void BLECharacteristic::setValue(uint8_t, size_t)' 77 | void setValue(uint8_t data, size_t size); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:77:8: note: candidate expects 2 arguments, 1 provided C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:78:8: note: candidate: 'void BLECharacteristic::setValue(String)' 78 | void setValue(String value); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:78:24: note: no known conversion for argument 1 from 'std::string' {aka 'std::cxx11::basic_string~^~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:79:8: note: candidate: 'void BLECharacteristic::setValue(uint16_t&)' 79 | void setValue(uint16_t &data16); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:79:27: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string~~^~C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:80:8: note: candidate: 'void BLECharacteristic::setValue(uint32_t&)' 80 | void setValue(uint32_t &data32); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:80:27: note: no known conversion for argument 1 from 'std::string' {aka 'std::~~^~C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:81:8: note: candidate: 'void BLECharacteristic::setValue(int&)' 81 | void setValue(int &data32); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:81:22: note: no known conversion for argument 1 from 'std::string' {aka 'std::cxx11::basic_string~^~C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:82:8: note: candidate: 'void BLECharacteristic::setValue(float&)' 82 | void setValue(float &data32); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:82:24: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string~^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:83:8: note: candidate: 'void BLECharacteristic::setValue(double&)' 83 | void setValue(double &data64); | ^~~~ C:\Users\vedde\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.1\libraries\BLE\src/BLECharacteristic.h:83:25: note: no known conversion for argument 1 from 'std::string' {aka 'std::~~^~~~exit status 1
Compilation error: exit status 1