Skip to content

When you call rzb_fetchDeviceInformationKeys it does not actually read the first time #71

@tahirmt

Description

@tahirmt

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 values

I see the following logs

RZBLogLevelCommand - <DEVICE UUID> discoverServices:@[Device Information]

RZBLogLevelDelegate - peripheral:didDiscoverServices: - <DEVICE UUID> (null)

RZBLogLevelDelegateValue - Services=@[180A]

RZBLogLevelCommand - <DEVICE UUID> discoverCharacteristics:@[System ID, Model Number String, Serial Number String, Software Revision String, Firmware Revision String, Hardware Revision String, Manufacturer Name String, PnP ID] forService:180A

RZBLogLevelDelegate - peripheral:didDiscoverCharacteristicsForService:error: - <DEVICE UUID> (null)

RZBLogLevelDelegateValue - Characteristics=@[2A29, 2A24, 2A25]

However, if I call it again once the characteristics are discovered it returns the values and I see logs like

RZBLogLevelCommand - <DEVICE UUID> readValueForCharacteristic:Model Number String

RZBLogLevelCommand - <DEVICE UUID> readValueForCharacteristic:Serial Number String

RZBLogLevelCommand - <DEVICE UUID> readValueForCharacteristic:Manufacturer Name String

RZBLogLevelCommand - <DEVICE UUID> discoverCharacteristics:@[System ID, Software Revision String, Firmware Revision String, Hardware Revision String, PnP ID] forService:180A

RZBLogLevelDelegate - peripheral:didUpdateValueForCharacteristic:error: - <DEVICE UUID> (null)

RZBLogLevelDelegateValue - Value=<some value>

RZBLogLevelDelegate - peripheral:didUpdateValueForCharacteristic:error: - <DEVICE UUID> (null)

RZBLogLevelDelegateValue - Value=<some value>

RZBLogLevelDelegate - peripheral:didUpdateValueForCharacteristic:error: - <DEVICE UUID> (null)

RZBLogLevelDelegateValue - Value=<some value>

RZBLogLevelDelegate - peripheral:didDiscoverCharacteristicsForService:error: - <DEVICE UUID> 180A (null)

RZBLogLevelDelegateValue - Characteristics=@[2A29, 2A24, 2A25]

My understanding was that RZBluetooth handles the discovery of services and characteristics internally and I do not need to call discoverService and discoverCharacteristics methods...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions