-
Notifications
You must be signed in to change notification settings - Fork 47
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
When you call rzb_fetchDeviceInformationKeys it does not actually read the first time #71
Comments
I see this behavior in our code as well; I just worked around it. I haven't dug in to investigate why it is happening yet. |
Interesting -- that's not good! Can you include a full log dump? |
@KingOfBrian Like I posted above these are the logs I see When I read it the first time I get
And when I read it the second time
And for obvious reasons I am obscuring the device UUID and the values being read... As you can see when I call it the first time I do not get any My
As you can see the |
@KingOfBrian It seems it only happens if you call it for characteristics that are not present in the device. So if the device has all of the characteristics, the I logged the result of the read and it appears if there are characteristics that are not found in the peripheral it returns error for all the characteristics the first time and the second time it works. First time reading
Second time reading
|
That matches up with what we saw as well. Our workaround was to only request the device info keys we knew were supported by our device(s). |
I'm not entirely sure why this would result in all nil given the code, but it just seems like a bug. It'd be great if one of you could put up a PR. I don't have a device with a DeviceInfo Service at the moment, so it'd be a bit of pain to do one. I think explicitly discovering services and then reading all of the discovered services might work better. |
@cpatterson-lilly That's exactly what I did. I only requested the ones that are there in my peripherals and it works fine. @KingOfBrian but services discovery is already there so it shouldn't be needed. I'll see if discovering services first changes anything. |
After connection at some point I am calling
rzb_fetchDeviceInformationKeys
to read device information. However, the first call to this always returns nil values as it doesn't actually read the valuesI see the following logs
However, if I call it again once the characteristics are discovered it returns the values and I see logs like
My understanding was that
RZBluetooth
handles the discovery of services and characteristics internally and I do not need to calldiscoverService
anddiscoverCharacteristics
methods...The text was updated successfully, but these errors were encountered: