-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
esp_hid_host fails to pair with BT Classic 2.0 trackpad or mouse: Authentication fail reason 5 (IDFGH-8555) #10005
Comments
Could it have something to do with the pairing passkey/PIN of the trackpad? It has a default configured passkey 0000 and I can't change it. When running the demo I am never asked about a passkey, nor did I configure anything related. |
Update to latest master commit and test with an Apple Magic Mouse (no passkey!): same result
With v4.3.1:
So far I could only test Apple products as I don't have any other devices available right now. It would be interesting to see whether the same happens with a BT mouse/keyboard of a different brand, just to rule out brand specific reasons. The pairing passkey apparently doesn't change anything. Updated first post accordingly. |
@boernsen-development Please try with
Please attach the logs with modified |
Thank you for your response @BetterJincheng ! I tried that and got this build error with the code above:
So I replaced BT_AV_TAG by TAG. This is the error log I get:
Does this help? Please let me know if you need more. |
@boernsen-development I guess I have located the problem. Please test again with:
and
Wait for your reply. |
@boernsen-development As your device is BT Classic 2.0 which does not support Secure Simple Paring and use a FIXED PIN CODE. In this way, we let HOST to reply the specific pin code '0000' or '1234'. |
@BetterJincheng Thank you for the good idea! I indeed got one step further now. Actually, I tried to turn off Secure Simple Pairing from idf.py menuconfig before, but that fails to build --> #10069 Anyway, with your changes there is a new error now. Here is full log:
Do you have an idea how to solve that? (Should I open a new issue?) |
I also don't understand why I got the same original error with the Apple Magic Mouse (which has no PIN). However, with the latest master I realized the Magic Mouse seems to connect. So I tried again with the Trackpad. After I changed the pin_code from esp_hid_gap.c from originally 1,2,3,4 to 0,0,0,0 (everything else is original from the master commit bd18096):
It actually connects!!! (at least most of the time) |
@boernsen-development I think you can open a new issue to solve the new problem. Thanks! |
@BetterJincheng Thank you very much for all your help! I'm actually very confused now. With the latest master (2d9e75b), it all works without any changes. However, after that I tried release v5.0 and it also works!! I don't get why as I was sure I did try various versions. Also it doesn't ask for a PIN and the only PIN I can find in the sources is 1234 whereas the trackpad actually has PIN 0000. Still it connects with both versions no matter if I deactivate Simple Pairing Mode or not... (To build with deactivated Simple Pairing Mode, I still need the workaround from #10069) I actually felt I was quiet meticulous when testing to avoid overseeing anything. The only explanations I can come up with are:
Quiet mysterious for me... |
Answers checklist.
IDF version.
v5.1-dev-1390-g6a8810fa39
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.
No response
Development Kit.
ESP32 Dev Kit C V4
Power Supply used.
USB
What is the expected behavior?
I expected the esp_hid_host demo to successfully pair with my BT Classic 2.0 trackpad or mouse. If it doesn't pair I expect it to print an informative error or reference to further documentation for help to debug this.
What is the actual behavior?
Instead it prints:
Steps to reproduce.
Debug Logs.
More Information.
Possibly related to #8027.
The text was updated successfully, but these errors were encountered: