You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
Concerning Characteristic.ValueUpdated, I encountered two things:
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?
(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
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Concerning Characteristic.ValueUpdated, I encountered two things:
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?
(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
The text was updated successfully, but these errors were encountered: