Skip to content
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 pair on windows 11 and android, works fine on MacOS #157

Open
SirSlotocato opened this issue Jan 4, 2023 · 4 comments
Open

Cannot pair on windows 11 and android, works fine on MacOS #157

SirSlotocato opened this issue Jan 4, 2023 · 4 comments

Comments

@SirSlotocato
Copy link

SirSlotocato commented Jan 4, 2023

Hello! When I try to pair on windows, it shows a "try to connect again to the device"(or a similar message, I have the os in italian) after trying for a really short time. On android it try for longer, but the result is the same. On mac i need to try 1/2 times maybe, but it seems to work fine...
It's the multiple buttons example, but with only 2 buttons, and same happens when trying with a platformio project i found(from github).
I'm on latest version

@LeeNX
Copy link

LeeNX commented Jan 7, 2023

Only run into connection issues, if another BLE host/server device is scanning for bluetooth devices and lists my BLE-Gamepad device. Solution was to disconnect and turn off all bluetooth hosts/servers while trying to pair device initially. I have been thinking of adding an LED noting if my BLE-Gamepad is connected or advertising.

@SirSlotocato
Copy link
Author

I'm testing if it's actually working good, but I maybe found a solution. trying an example for nimble, i found that it works "good", just need to do some retries for actually pairing, but not a big deal. The main difference in the init for the server was that in the example of nimble-arduino, they call the setMinPreferred with a 0x12, i tried to add it to the module, and now it seems to work... I'll do some more test, if it work maybe I create a merge request

@seikosantana
Copy link

seikosantana commented Apr 6, 2023

@SirSlotocato would you mind to share more details what fixes it? I'm having the same issue.

@SirSlotocato
Copy link
Author

@seikosantana sorry i missed the notif mail T_T I just added to line 1418 in BleGamepad.cpp
pAdvertising->setMinPreferred(0x12);
you can find the file in the library, and it's just a workaround.

It's not a real fix, it works better but sometimes it has a lot of delay. and it need a lot of retryes to actually connect, but after its paired it work, just with the delay i said before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants