-
Notifications
You must be signed in to change notification settings - Fork 715
BLE Static Password ー During an ESP32 ⇔ iPhone pairing, even if wrong password the connection is not terminated #1003
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
One of those or both should return false:
|
Mr. Chegewara, I worked around with your advice, and lead me with authentication flag that i needed, as shown below:
However, it seems that forcing a BLEserver disconnect is not so easy for a beginner after all.
Again, hoping for someone's advice... |
My idea was to show you that you can send false from security callback which means esp32 refused/failed to authenticate. Also, in my understanding esp-idf low level library should disconnect if authentication failed, but here i might be wrong and i should check bluetooth specs to what are requirements. In theory not being authenticated is not end of world yet, because in some cases (many cases actually) some characteristics can be allowed to red/write without authentication and you may want to protect just few. That way it would be wrong if low level library would decide to disconnect if authentication failed. |
Mr. Chegewara,
Sorry for my slow comprehension... By the way...
Is there a more precise "arduinoish" command just for BLE disconnection? |
It was about issue 1 For issue 2 you could try this: |
Mr. Chegewara,
If the above is for ISSUE#1,
As for ISSUE#2,
|
I am assuming that peer device, smartphone, should get response it is not authenticated and maybe, but im not sure, low level esp-idf library will also register that device as non authenticated and wont let to read/write characteristics that require authorization. |
I understand now... As always, thanks for your advice. |
About ISSUE#1, As always, thanks for your advice. |
Was Issue #1 resolved? I'm having the same problem and I've tried all the suggestions in this thread. I enter the wrong password, but I can still connect with iOS, and also Android. I am using the Android app 'Serial Bluetooth Terminal'. I click to connect within the app, and it asks to pair. I click 'cancel' so it doesn't pair, without ever entering the password. I then click connect again, and it's connected. Ideas? |
Hi people,
I am a newbie, and I am using Adruino IDE to test ESP32 Bluetooth .
Currently, I am using the codes here: #793 (comment). Based on my test observations:
With this...
I would like to know, if there is a flag or a function that would tell that the password authentication / pairing is not successful.
My idea is to terminate the connect once the pairing is not successful. Below is a onConnect/onDisconnect sample sketch, and I am assuming there is a some sort of PasswordAuthenticationSuccessful version of this.
Hoping for someone's advice...
The text was updated successfully, but these errors were encountered: