-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Cannot connect to device running ble50_security_server example from iPhone (IDFGH-14584) #15340
Comments
Hi @dimitar-kunchev , could you please share your iOS version? The issue looks quite similar to a known iOS compatibility issue, please check #12911, my colleague has shared a workaround solution in the comments. If the solution provided does not meet your requirements, please feel free to leave a comment and share your requirements in detail, we'll try our best to help you. :) |
I have tested this with iOS 18.2.1 |
P.S.: While writing my previous comment, I saw it establishing a connection from my iPhone on BLE 5. It did spit the usual connection errors but after a while, it established a connection and fetched the services properly. I checked out some old code I have on nRF chips and I see I had to drop the service from the advertisement to get it working there too. It's been years but I recall we had some weird iOS behavior there. So this certainly is an iOS problem. However, I have been able to get it going on nRF with BLE 5.0 so it should be possible on ESP too. |
Hi @dimitar-kunchev , in our view the issue is related to the unexpected behavior from iPhone side, referring to #12911 (comment). In brief, iPhone didn't send TX LL data within the correct time range after sending the AUX_CONNECT_REQ PDU, which is incompliant with Core Spec, causing ESP chip as slave to disconnect with reason 0x3e. A possible workaround described in #12911 (comment) is ESP chip side
iPhone side
In this way, ESP chip is advertising in BLE 5.0 but being connected in BLE 4.2, which could avoid unexpected BLE 5.0 behavior from iPhone side during connection establishment. We hope the suggestion could help. :) |
Answers checklist.
IDF version.
5.4
Espressif SoC revision.
ESP32-C6
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-C6-DevKitC
Power Supply used.
USB
What is the expected behavior?
I should be able to connect to the device with an iOS app (e.g. nRF Connect)
What is the actual behavior?
The connection cannot be established. The log output indicates the phone keeps reconnecting and eventually fails.
Steps to reproduce.
Debug Logs.
More Information.
It works fine with the BLE 4.2 examples.
I have experimented with custom code on the ESP to mess with the security and with the advertisement, I have experimented with custom app code
It works fine connecting from an Android phone and various PCs.
Doesn't work on several iPhones I have tried (X, 13, 15, etc)
I have tried with 5.4 release and with the master branch - no difference.
The text was updated successfully, but these errors were encountered: