Hello,
I have to read cahracterististic with UDID "0x2A20" for service with UUID "0x180A". However, the function you have provided is
public func readValue<Value>(
forCharacteristicWithUUID characteristicUUID: UUID,
ofServiceWithUUID serviceUUID: UUID
) async throws -> Value? where Value: PeripheralDataConvertible
It takes UUID for characteristics and services but I can't pass them my UUIDs as they are 16 bit but this accepts only 128 bit.
However, we need to provide to corebluetooth CBUUID which also takes 16bit strings.
My question is how can I pass my 16 bit uuids to read values as UUID(uuidString:) returns nil if I pass 16 bit UUID in this uuidString parameter.
You're right! There's currently no way to use these convenience functions with 16bit (or 32bit!) strings unless you transform the UUID beforehand. I've added CBUUID overloads. Hope that helps!
Hello, I have to read cahracterististic with UDID "0x2A20" for service with UUID "0x180A". However, the function you have provided is
It takes
UUID
for characteristics and services but I can't pass them my UUIDs as they are 16 bit but this accepts only 128 bit. However, we need to provide to corebluetooth CBUUID which also takes 16bit strings.My question is how can I pass my 16 bit uuids to read values as
UUID(uuidString:)
returns nil if I pass 16 bit UUID in this uuidString parameter.