-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hello, can you help us with non broadcast device?
This how our code look like.
Our progress is we have stable connection with scales and also get some data from it but we can't parse weight data from payload
Example Data:
Received data: [167, 0, 4, 5, 87, 147, 226, 237, 183, 121, 122]
Received data: [167, 0, 4, 5, 87, 154, 225, 237, 183, 127, 122]
void _discoverAndSubscribe(List<BluetoothService> services) async {
final service = services.firstWhere((service) => service.serviceUuid.str.equal(ElinkBleCommonUtils.elinkConnectDeviceUuid));
for (var characteristic in service.characteristics) {
await characteristic.setNotifyValue(true);
if (characteristic.uuid.str.equal(ElinkBleCommonUtils.elinkWriteAndNotifyUuid)) {
_setHandShake(characteristic);
}
if (characteristic.uuid.str.equal(ElinkBleCommonUtils.elinkNotifyUuid)) {
characteristic.onValueReceived.listen((data) async {
_processReceivedData(data, characteristic);
});
}
}
}
Future<void> _setHandShake(BluetoothCharacteristic characteristic) async {
final List<int> handshakeData = [0xA6, 0x03, 0x42, 0x01, 0x00, 0x46, 0x6A];
await characteristic.write(handshakeData.toList(), withoutResponse: true);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels