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

Reading from non-existent characteristic causes all reads to fail #103

Open
dandan78 opened this issue Apr 26, 2019 · 0 comments
Open

Reading from non-existent characteristic causes all reads to fail #103

dandan78 opened this issue Apr 26, 2019 · 0 comments

Comments

@dandan78
Copy link

dandan78 commented Apr 26, 2019

Issue

Upon connecting to a device, I have code that reads from its characteristics to determine the initial state of the UI. However, there exist two variants of the peripheral device and they differ by one characteristic, which is present in Variant A, but missing from Variant B.

At present, the app just goes ahead and reads them all. However, this approach results in all read operations on all of the characteristics failing when connected to a Variant B device. Is this how it is meant to work? I would expect only the read operation on the missing characteristic to fail.

The error code is:

Error Domain=com.raizlabs.bluetooth Code=6 "(null)" UserInfo={undiscoveredUUIDs=(
"00000000-0000-0000-0000-000000000005"

The same error message is repeated for each of the read operations.

I do of course realize there are many ways to work around this issue, such as simply checking for the presence of the offending characteristic before reading from it. Nevertheless, I wanted to report this since the behavior I have observed doesn't make sense to me.

@dandan78 dandan78 changed the title Reading from non-existing characteristic causes all reads to fail Reading from non-existent characteristic causes all reads to fail Apr 26, 2019
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

1 participant