diff --git a/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt b/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt index ca23f60d8d..3999e71253 100644 --- a/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt +++ b/pump/dana/src/main/java/info/nightscout/pump/dana/DanaPump.kt @@ -411,19 +411,19 @@ class DanaPump @Inject constructor( fun modelFriendlyName(): String = when (hwModel) { 0x01 -> "DanaR Korean" - 0x03 -> + 0x03 -> when (protocol) { 0x00 -> "DanaR old" 0x02 -> "DanaR v2" else -> "DanaR" // 0x01 and 0x03 known } - 0x05 -> + 0x05 -> if (protocol < 10) "DanaRS" else "DanaRS v3" - 0x06 -> "DanaRS Korean" - 0x07 -> "Dana-i (BLE4.2)" - 0x09 -> "Dana-i (BLE5)" - else -> "Unknown Dana pump" + 0x06 -> "DanaRS Korean" + 0x07 -> "Dana-i (BLE4.2)" + 0x09, 0x0A -> "Dana-i (BLE5)" + else -> "Unknown Dana pump" } fun pumpType(): PumpType = diff --git a/pump/danars/src/main/java/info/nightscout/pump/danars/services/BLEComm.kt b/pump/danars/src/main/java/info/nightscout/pump/danars/services/BLEComm.kt index 6cde1eca74..78ef823b75 100644 --- a/pump/danars/src/main/java/info/nightscout/pump/danars/services/BLEComm.kt +++ b/pump/danars/src/main/java/info/nightscout/pump/danars/services/BLEComm.kt @@ -573,7 +573,7 @@ class BLEComm @Inject internal constructor( disconnect("Non existing pairing key") } - if (danaPump.hwModel == 0x09) { + if (danaPump.hwModel == 0x09 || danaPump.hwModel == 0x0A) { bleEncryption.setBle5Key(storedPairingKey.encodeToByteArray()) aapsLogger.debug(LTag.PUMPBTCOMM, "<<<<< " + "ENCRYPTION__PUMP_CHECK BLE5 (OK)" + " " + DanaRSPacket.toHexString(decryptedBuffer)) // Dana-i BLE5 Pump