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
I'm trying to implement a peripheral on a Pi that looks at the central's UUID on a willRead and figures out the reply based on some business logic. The problem is that because peripheral.write is async, there doesn't appear to be a way to dynamically change the value on a willRead in time for the response to go out.
Is there a recommended pattern to follow for this:
private func willRead(_ request: GATTReadRequest<Central>) -> ATTError? {
logger.info("Recevied read")
guard let peripheral else {
return nil
}
/// SET THE VALUE OF THE CHARACTERISTIC
}
The text was updated successfully, but these errors were encountered:
I'm trying to implement a peripheral on a Pi that looks at the central's UUID on a willRead and figures out the reply based on some business logic. The problem is that because peripheral.write is async, there doesn't appear to be a way to dynamically change the value on a willRead in time for the response to go out.
Is there a recommended pattern to follow for this:
The text was updated successfully, but these errors were encountered: