Skip to content

isConnected not working when i get gatt 133 error #47

Open
@MikhailNatalenko

Description

@MikhailNatalenko

When my ble device disconnects me i get the gatt status 133. BleGattCoroutine throws an exception
com.beepiz.bluetooth.gattcoroutines.OperationFailedException as expected, and then i want to check BLE status with isConnected() method. In this situatuion i expect 'false' but i get 'true'. Is it a bug?

I am sorry but I can't provide you a minimal sketch right now i do something like:

try{
    gatt.connect() 
    // ...Do all preparations
    //turn off ble device for example 
    gatt.readCharacteristic(characteristic)
} catch (e: Exception){
  if (!gatt.isConnected()) doSomethingWithError() // i expect that doSomethingWithError() will happend
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions