-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Bluetooth classic serial connection PIN provided but pairing is without PIN #4566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Confirmed. The pin doesn't work as it should. |
Can confirm. This example seems to have commented out the |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Any news? |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
Same problem here. Any solution? Version 1.0.5 |
Hello, a lot of people also me, we are trying to find an option to set static PIN on Bluetooth classic serial connection when pairing. A way to input custom PIN not the default 123456.An old way was created for 1.0.1 version adding a custom libbt.a file that was disabling ssp as far as i know .We want to be able to have this option on newer versions. I'll appreciate anyone who really want to help |
Same here. It is unclear what the change was in that particular file, that
allowed it to work. Can the original author, please mention the change they
had to make, if they still have it with them?
Thanks
…On Thu, Apr 1, 2021, 13:21 hulktech ***@***.***> wrote:
Hello, a lot of people also me, we are trying to find an option to set
static PIN on Bluetooth classic serial connection when pairing. A way to
input custom PIN not the default 123456.An old way was created for 1.0.1
version adding a custom libbt.a file that was disabling ssp as far as i
know .We want to be able to have this option on newer versions. I'll
appreciate anyone who really want to help
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4566 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACSZTI6FMKRUWSOKETM63TGQQWVANCNFSM4UACGEIA>
.
|
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
push |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Push... |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
I have been looking for a way around this in order to get a PIN to work but have come up empty-handed for almost a year now. I am looking forward to a solution to this issue, especially in light of Braktooth vulnerabilities. |
This is the answer:
That means it requires to build bluetooth library with special config. |
How do I build a special config? I was under the impression that wasn't possible with the arduino-esp. |
Yes, it was not needed earlier, because it was bug in esp-idf v3.1 or 3.2. Since v3.3.x its been fixed. |
This seems to me outdated and solved already. Closing, if needed you can reopen it. Thanks for understanding. |
Hey @VojtechBartoska you have closed this issue as it is completed, could you please point to the example where we can see how this works?
and with this
But the ESP32 is paired with arduino device in both cases without asking for PIN. Thanks, |
Hi @dageci and @VojtechBartoska, I have the same problem, a PIN is provided but the pairing is made without asking for the PIN. What's wrong? |
Hi, |
Thanks for the reply, the example shows how to use the PIN to connect the master to a slave, but my situation is the opposite, create the slave with a PIN. How can I do that? |
I tried with this example, the Bluetooth slave is created. When I take my phone and I do the pairing processes the PIN is not required. I don't why.... |
I want to use esp32 blt in a commercial device. and it's scary that anybody can connect to my device. how it's not possible yet to have a pin while pairing? I directly talk to the esspersive and they don't answer it either. can anybody a working example? I'm using platformIO |
I'm in the same situation... |
@VojtechBartoska, any update on this ? I can also confirmed have the same issue with @Alain-Godo that the pin is not working when the Master (phone) connected to Slave (esp32). |
I tried it on the esp-idf-v5.1-libs branch I confirm the issue - I can connect with a phone to a slave which is expecting a PIN, but the phone doesn't even pop up the prompt for PIN and ESP32 reports "authentication success". And when I send something (via BTSerial app) it is transmitted correctly both ways. Also when using two ESPs (master and slave) with mismatching PINs they connect successfully and are able to communicate. I can connect with phone to master without pin - however i cannot connect with serial app and communicate with the ESP. Note that phone is also master and connecting 2 masters should not work anyway. I will investigate further... |
Thanks, @PilnyTomas !!! Seems like the PIN is never set actually... |
Thanks a lot !!! @PilnyTomas for reopening this thread. Below is some output from Serial Monitor with debug level set to "info". But @Alain-Godo ... sadly somehow from the debug output, the pin is being set, looks like somewhere in the code probably ignoring this request. This code run in setup SerialBT.begin(DEVICE_NAME);
SerialBT.setPin(BLUETOOTH_PIN); Below is the output
And Yes, phone can pair without pin (unfortunately no debug output during pairing process) and bluetooth serial data transfer running smoothly, I hope it can help for further investigation. |
Hello everyone, it has been a while since dug into this issue, but to be honest, this rabbit hole goes very deep and I was unable to find any clear reason why the legacy pairing using fixed PIN is not working. I will ask around in the company, but I can't promise anything. |
Hi @PilnyTomas , with the sample of Secure Simple Pairing, If I keep on responding with this when there is a request, it should be good enough to protect anyone to paired it blindly right ? SerialBT.confirmReply(false); Anyway, thank you for your effort, I hope the company might give us some answer or hint to solved it, in the mean time seems that SSP the only work around, I am a bit hesitate to use it because of the callback, last time my experience using callback is disrupting a bit during ongoing bt serial comm. |
SSP is superior to fixed PIN in security - it is simply newer and better. Some people already pointed out that disabling sdkconfig CONFIG_BT_SSP_ENABLED On the other according to this issue, it would seem that it's true - to use legacy pairing you need to turn off SSP. This however requires compiling the Arduino core, so doing this globally is not an option as it would create issues for others who are using SSP. The solution might be using Arduino as an IDF component. I will take look at this myself and if it works I will make some documentation and examples for this in the PR #8453 |
Understood, it is impossible to always released two different version for Arduino core. Your example will greatly help us when there is a need for legacy pairing, thanks a lot. |
I've tried now the PIN feature... and it still doen't work:
What I'm doing wrong? My project doen't have any display to show PIN to compare. And I don't want that somebody "just accepts" any shown pin. And I also doesn't have any physical buttons on the ESP32 to initiate any pairing access. I'm using ESP32 Dev Board with 2.0.14 IDE |
Hardware:
Board: ESP32 WEMOS D1 MINI
Core Installation version: 1.0.4
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
After flashing: Smartphone sees "ESP32test" asking if I would like to connect and it connects without asking for a PIN (tried different PINs with different length)
Expectation: Smartphone asks for PIN and connects after user inputs a correct PIN code
Sketch:
Using example sketch:
https://github.com/espressif/arduino-esp32/blob/master/libraries/BluetoothSerial/examples/SerialToSerialBTM/SerialToSerialBTM.ino
but with activated SerialBT.setPin(pin); (before or after SerialBT.begin is doesn't matter) and changed pin:
Debug Messages:
The text was updated successfully, but these errors were encountered: