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

Laptop BLE no issue Resolving Characteristics, Desktop has issues... #51

Open
nonlin opened this issue Jun 15, 2023 · 2 comments
Open

Comments

@nonlin
Copy link

nonlin commented Jun 15, 2023

So tested this with laptop, after a windows update I had to get the latest intel BLE drivers but laptop can resolve services and characteristics and then write to device.

On Desktop my motherboards BLE could not resolve services until I updated the intel BLE driver but it would then never resolve characteristics. I went out and got an ASUS BLE Dongle and it too has the same issue, and if I can't resolve the characteristics I can't write to the device or subscribe.

Has anyone noticed any odd issues like this? Where it works on some machines but not others?

The Same BLE project by microsoft has no issue, so I'll be looking at their code and trying to understand what may be different.

@nonlin
Copy link
Author

nonlin commented Jun 15, 2023

Notice there are two different ways to obtain services?

One is via the ScanServicesAsync which uses the same calls in the example.

The other is via retreiveServices which uses GetGattServicesForUuidAsync.

Not sure why we do it two different ways but the way its done in ScanServiceAsync seems to work on my PC where as the GetGattServicesForUuidAsync doesn't seem to work on my PC but does for my laptop.

@adabru
Copy link
Owner

adabru commented Jul 4, 2023

Thank you for posting the results of your investigation!

Not sure why we do it two different ways

GetGattServicesAsync is used to explore available services, GetGattServicesForUuidAsync is used to retreive a previously known service, without the need to list all services. Given your description of your driver, one random guess of mine is that your driver doesn't support that api?

the way its done in ScanServiceAsync seems to work on my PC

I guess you can add the services found during ScanServiceAsync to the cache. That way you can run a service scan before you retrieve the characteristic.

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

2 participants