Open Adminius opened 4 months ago
Hello everyone, Does anyone have a solution? When pairing an ESP32 module with a smartphone, I would like this module to request a predefined password in the code.... This with the “BluetoothSerial.h” library i just added 'true' in SerialBT.begin("ESP BT PIN Test", true); but still doesnt work... It seems that the following code is correct but the connection is made directly without a pin code `# include "BluetoothSerial.h"
BluetoothSerial SerialBT;
const char* pin="1234";
void setup() { Serial.begin(9600);
SerialBT.setPin(pin); SerialBT.begin("ESP BT PIN Test", true); Serial.println("The device ESP32 started, now you can pair it with bluetooth!");
} void loop(){ {`
Unfortunately, this is not possible without compiling your own libraries, but you can set it up with Simple Secure Pairing (a random connect string).
Thanks for your answer, SSP is giving the smartphone the code to enter.... I would like to have that kind of behavior, like in the Meshstastic Program but it semms to be very difficult to do.
Board
ESP32 Dev Module /Wemos D1 mini ESP32
Device Description
ESP32 dev board (WROOM 32D) also tested with Wemos/Lolin D1 mini ESP32 Version
Hardware Configuration
nothing attached
Version
other
IDE Name
Arduino 1.8.13
Operating System
Windows 11
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921000
Description
Official ESP32 Version v2.0.16 installed via Arduino IDE Board manager
Sketch
Debug Message
Other Steps to Reproduce
Smartphone asks If i would like to pair and pairs with ESP32 without asking for a PIN and also doesn't show any PIN to compare...
Also you can use in core included example SerialToSerialBT.ino with uncommented
#define USE_PIN
, It doesn't asks for any PINs also.in #6061 was mentioned that PIN issue was fixed, but maybe only if connect ESP master to (ESP) slave? In my case ESP32 is a slave and Smartphone (Samsung Galaxy S23) is a master.
My old issue was clossed, but I still don't have any solution: #4566
I have checked existing issues, online documentation and the Troubleshooting Guide