Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

[iOS] Characteristic Update weirdness #56

Open
sktron opened this issue Aug 19, 2015 · 0 comments
Open

[iOS] Characteristic Update weirdness #56

sktron opened this issue Aug 19, 2015 · 0 comments

Comments

@sktron
Copy link

sktron commented Aug 19, 2015

Concerning Characteristic.ValueUpdated, I encountered two things:

  1. CharacteristicReadEventArgs.Characteristic instance unrelated to the event?
    In my handler for said event, the Characteristic instance passed in the eventargs apparently always is some other of the characteristics I discovered for a device, not the one that was updated.
    Why would that be?

  2. (sender as ICharacteristic).Value == null
    This one is probably due to our custom BLE device, which is the server, having faults in the GATT profile. But maybe it's not or could be handled better*, so I'll mention it.
    While we have transferred data from a small characteristic (5 bytes payload) via notification from BLE server device to the iPhone, a 20-byte payload one does trigger the Updated event, but the Value property of the characteristic instance passed-in as sender is NULL, I guess this should never happen, somewhere something is broken? When successfully receiving the reply on the 5-byte one, that was on the instance passed as 'sender' - so I suppose that's the correct instance to grab in the ValueUpdated handler.

Do you have any idea under which circumstances this could happen, i.e. what could be wrong in a GATT profile that would make this happen (generate ValueUpdated event with NULL for Characteristic.Value )?

Alas, in Peryton-BLE sniffer, I don't see the message which could be the "broken notification", whereas I do see the one which is received correctly.


*' e.g. if faulty messages are received, there could be an event or other mechanism that notifies the application code that a device is sending non-conformant messages

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant