DanaI 0x0A support

This commit is contained in:
Milos Kozak 2023-02-24 20:00:07 +01:00
parent da76506e01
commit 909e909525
2 changed files with 7 additions and 7 deletions

View file

@ -422,7 +422,7 @@ class DanaPump @Inject constructor(
else "DanaRS v3" else "DanaRS v3"
0x06 -> "DanaRS Korean" 0x06 -> "DanaRS Korean"
0x07 -> "Dana-i (BLE4.2)" 0x07 -> "Dana-i (BLE4.2)"
0x09 -> "Dana-i (BLE5)" 0x09, 0x0A -> "Dana-i (BLE5)"
else -> "Unknown Dana pump" else -> "Unknown Dana pump"
} }

View file

@ -573,7 +573,7 @@ class BLEComm @Inject internal constructor(
disconnect("Non existing pairing key") disconnect("Non existing pairing key")
} }
if (danaPump.hwModel == 0x09) { if (danaPump.hwModel == 0x09 || danaPump.hwModel == 0x0A) {
bleEncryption.setBle5Key(storedPairingKey.encodeToByteArray()) bleEncryption.setBle5Key(storedPairingKey.encodeToByteArray())
aapsLogger.debug(LTag.PUMPBTCOMM, "<<<<< " + "ENCRYPTION__PUMP_CHECK BLE5 (OK)" + " " + DanaRSPacket.toHexString(decryptedBuffer)) aapsLogger.debug(LTag.PUMPBTCOMM, "<<<<< " + "ENCRYPTION__PUMP_CHECK BLE5 (OK)" + " " + DanaRSPacket.toHexString(decryptedBuffer))
// Dana-i BLE5 Pump // Dana-i BLE5 Pump