Skip to content

Commit

Permalink
Merge pull request #43 from Marco012/master
Browse files Browse the repository at this point in the history
Fixed requestMTU() updating with the wrong value.
  • Loading branch information
LeandroSQ authored Oct 24, 2023
2 parents b483665 + a517a0e commit 3aa0455
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
Expand Down

0 comments on commit 3aa0455

Please sign in to comment.