OpenBluetoothToolbox / SimpleBLE

SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android.
https://www.simpleble.org
Other
701 stars 118 forks source link

Failed to connect to device using examples/connect program on windows 10 #157

Closed hellozyemlya closed 1 year ago

hellozyemlya commented 1 year ago

On windows 10 connect always gives "A method was called at an unexpected time." error when trying to connect to device. Device is custom one, nrf based.

kdewald commented 1 year ago

Hey @hellozyemlya, thanks for the report.

What version of the library gave you this error?

hellozyemlya commented 1 year ago

It was latest master branch.

kdewald commented 1 year ago

Can you try the code from this MR to see if it makes things better? https://github.com/OpenBluetoothToolbox/SimpleBLE/pull/166

kdewald commented 1 year ago

Hey @hellozyemlya, I'm not sure if we talked about this over Discord or if it was somebody else.

When dealing with custom firmware, it is possible (especially on older SDKs) for the firmware to cause this issue on the host. A few things have been changed recently that should make this more stable. I'll close this issue but feel free to reopen if it's still happening.