Comments (11)
Hallo @DerEchteJoghurt
Indeed, there was a bug in the logic to handle cross-transport key derivation during pairing. The stack did reject the request to derive an LE key, which causes Android to give up on Classic as well.
Please retest with the latest commit on develop.
from btstack.
Hallo @DerEchteJoghurt Indeed, there was a bug in the logic to handle cross-transport key derivation during pairing. The stack did reject the request to derive an LE key, which causes Android to give up on Classic as well. Please retest with the latest commit on develop.
Hey, thanks for the quick response! After pulling the latest changes from develop
I seem to be getting a lot more logs from sm.c
, unfortunately my phone still isn't able to connect.
I've attached the latest logs below:
log.pklg.zip
from btstack.
Weird. It is/was working with Android 14 on Pixel 7a (pretty close...). I'll attach the log from a Infineon CYW20707 (Ezurio BT-851 USB dongle).
In your log, the ESP32 responds with Command Status for Read Remote Extended Feature, but fails to actually do so. After 10 seconds, the connection fails. That looks like a bug in the ESP32 Controller. Which esp-idf version do you use? Can you try their latest version?
from btstack.
Hmm, I tried using the latest release and also the latest commits from the esp-idf, but with the same result. I also tried another ESP32 board.
Something worth noting is that my boards are not official Espressif development boards, but I assumed they work the same/have the same chip on a different board. Maybe someone with access to an official ESP32-WROOM-32D/U
development board can confirm this issue?
from btstack.
This is not an issue with your specific device, it looks like some kind of race condition in the proprietary Bluetooth Controller implementation.
Workaround: if you call gap_secure_connections_enable(false), CTKD is not possible and it will probably work for you.
from btstack.
This is not an issue with your specific device, it looks like some kind of race condition in the proprietary Bluetooth Controller implementation.
Ah good to know. I wonder if I can figure out a minimal example to reproduce this, so this can be reported to Espressif.
Workaround: if you call gap_secure_connections_enable(false), CTKD is not possible and it will probably work for you.
Yup, that works!
from btstack.
It would be great if you could post an issue on the esp-idf tracker. You can directly suggest to use the hid_mouse_demo - I do the same. Here, already the standard example shows the problem. If you do, please post the link to the issue here.
(I might try to reproduce, but I won't get around to that the next 3 weeks unfortunately)
from btstack.
Hey, sorry for the late response.
I submitted an issue to the esp-idf repo: espressif/esp-idf#13661
from btstack.
I got a response for the esp-idf issue, where they mentioned that the Read Remote Extended Feature command is not supported by the basic ESP32. I assume this should usually be covered by the SUPPORTED_HCI_COMMAND_READ_REMOTE_EXTENDED_FEATURES
check.
I noticed a small mistake here:
Line 163 in cb92fd3
According to the Bluetooth 5.0 Core Specification, bit 5 is the Read Remote Supported Features command.
This should probably
X( SUPPORTED_HCI_COMMAND_READ_REMOTE_EXTENDED_FEATURES , 2, 6)
, since bit 6 is the Read Remote Extended Features command:![image](https://private-user-images.githubusercontent.com/69429360/325205004-0ee3b634-6898-4746-897d-7686a59acb1e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg1MTQ3MDEsIm5iZiI6MTcxODUxNDQwMSwicGF0aCI6Ii82OTQyOTM2MC8zMjUyMDUwMDQtMGVlM2I2MzQtNjg5OC00NzQ2LTg5N2QtNzY4NmE1OWFjYjFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE2VDA1MDY0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5ODk0ZWE2MTRmZWVhMjU1NzE4Yzg2NDk4OGIwNzIxNGU3MjU1YzBiZjVhNzljNTkxMjQyODVhODFiNzEyOTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hhWefsx08ANyX3tpQu4MVA6NtztSgccAANRKJH23IEU)
This doesn't matter for the ESP32 though, since for both commands the bit is set.
To further test this I manually returned false
for the check here:
Line 3921 in cb92fd3
Unfortunately the example still doesn't work with this, I attached the logs without Read Remote Extended Features below.
log.pklg.zip
from btstack.
Good catch. I've updated the bit positions for SUPPORTED_HCI_COMMAND_READ_REMOTE_EXTENDED_FEATURES on the develop branch.
Back to your actual issue. In the last log, without the Read Remote Extended Features command & issue, the CTKD / SM Paring looks connect. Also, the SDP queries for HID and other services look ok. If this doesn't work, but it works without the CTKD, e.g. by disabled BR/EDR Secure Connections, we can compare the logs for these two cases. Could you post that here as well for completeness?
from btstack.
Using the updated libbtdm_app.a
from the esp-idf issue here, btstack now properly receives the Remote Extended Features Complete event and everything works as expected!
Let me know if I should close this, or if you still want the other logs.
from btstack.
Related Issues (20)
- Missing finalization of avdtp connection HOT 5
- Unexpected behavior of L2CAP LE Credit Based Flow Control Mode
- Pairing request is not answered HOT 1
- binding for java is missing some classes HOT 2
- L2CAP Connection Oriented Channels examples HOT 20
- Whatβs W2 or W4 prefix mean? HOT 1
- ESP32: Unexpected BNEP_EVENT_CHANNEL_CLOSED after ~40 sec with esp-idf v4.x and BR/EDR Secure Connections HOT 7
- Remove force baudrate to 3000000 for broadcom chipsets HOT 1
- Feature: HCI Transport for Linux/BlueZ HCI_CHANNEL_USER socket HOT 4
- Examples with address parsing logic seems wrong HOT 3
- Fails to compile on ESP32C6 HOT 8
- BT Sound bar and PS4 controller bandwidth clash HOT 16
- hid_host_demo: discoverable and connectable by default HOT 8
- hid_subevent_report_get_report is off by 1 byte HOT 4
- gap_inquiry_start from hid_host_demo never has rssi and name HOT 5
- hid_host_demo: Logitech Keyboard K810 HID descriptor not available HOT 5
- How to change HID host Bluetooth name? HOT 1
- ESP32 slave role Multiple SCO connection problem HOT 11
- Classic HID host: unreliable pairing to some Android devices HOT 55
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btstack.