From a517a0ebdbb174bfd7c4615372c4aa1b423d8ff5 Mon Sep 17 00:00:00 2001 From: Marco Lima Date: Tue, 24 Oct 2023 21:26:28 +0100 Subject: [PATCH] Fixed requestMTU() updating with the wrong value. --- .../soares/leandro/blemadeeasy/BluetoothConnection.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/quevedo/soares/leandro/blemadeeasy/BluetoothConnection.kt b/lib/src/main/java/quevedo/soares/leandro/blemadeeasy/BluetoothConnection.kt index 92e0051..9c48620 100644 --- a/lib/src/main/java/quevedo/soares/leandro/blemadeeasy/BluetoothConnection.kt +++ b/lib/src/main/java/quevedo/soares/leandro/blemadeeasy/BluetoothConnection.kt @@ -307,10 +307,10 @@ class BluetoothConnection internal constructor(private val device: BluetoothDevi } // Request for MTU change - this.log("Request MTU on device: ${device.address} (${mtu} bytes)") - val success = this.gatt?.requestMtu(mtu) ?: false + this.log("Request MTU on device: ${device.address} (${bytes} bytes)") + val success = this.gatt?.requestMtu(bytes) ?: false if (success) { - this.log("MTU change request success on: ${device.address} (value: $mtu)") + this.log("MTU change request success on: ${device.address} (value: $bytes)") } else { this.error("Could not request MTU change on: ${device.address}") }