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

Unable to scan for or subscribe to characteristics #21

Open
nicg220 opened this issue Oct 22, 2021 · 3 comments
Open

Unable to scan for or subscribe to characteristics #21

nicg220 opened this issue Oct 22, 2021 · 3 comments

Comments

@nicg220
Copy link

nicg220 commented Oct 22, 2021

Hello.

I am able to search and find my BLE device, as well as successfully searching for a list of services. When I select 'scan characteristics' however, I am either met with no results, or the error "BleWinrtDll.cpp:429 ScanCharacteristicsAsync catch: Catastrophic failure". As such, I am unable to subscribe to and read incoming data from the device.

I'm just wondering if anyone has faced this issue?

Thank you!

@Ugobyte
Copy link

Ugobyte commented Jan 17, 2022

I faced a similar issue. I'm able to Find Devices, Find Services and Find Characteristics.
But I cannot Subscribe to Characteristics.

I noticed I can only Subscribe to known Characteristics such as Battery, Serial Number, Model Number, Heart Rate, etc...
(These are the Characteristics listed in BLE Documentation)

However, I created my own custom Characteristic in my Little BLE Pet project. I can see my custom-made characteristics but I cannot subscribe to them.
I get BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The Attribute cannot be written to.

@Ugobyte
Copy link

Ugobyte commented Jan 18, 2022

[SOLVED]

I got it to work. It has always worked.
When i do a BLEApi.SubscribeToCharateristic() It is successfully subscribing to my custom characteristics under the hood. The UI is just displaying error that isn't actually an error. Also, when i do a BLEApi.PollCharacteristics(), the bytes from my custom characteristics are coming in as well.

I'm guessing the BleWinrtDll.cpp:501 SubscribeCharacteristicAsync catch: The Attribute cannot be written to. error message probably means it does not know how to parse and display my custom characteristics.

@ehauner
Copy link
Contributor

ehauner commented Feb 4, 2022

This might be related to an issue I found where the characteristics dropdown in the Demo scene was not correctly hooked up to the SelectCharacteristic function in the Demo script, so it was always subscribing to the first characteristic regardless of your selection. See my post in #20 for more info.

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