2

When I connect ble after I try to open the notification, but often return BleGattException status = 133, sometimes it will sometimes not .

this is my code :

    mConnectingDevice.establishConnection(false)
   .doOnNext(this::storeConnect)
   .flatMap(rxBleConnection -> rxBleConnection.setupNotification(notifyUuid))
   .observeOn(AndroidSchedulers.mainThread())
   .flatMap(notificationObservable -> notificationObservable)
   .observeOn(AndroidSchedulers.mainThread())
   .subscribe(this::onNotify, this::connectFail);

connectFail return BleGattException status = 133

This is the print log // behind my comments:

   08-22 14:12:00.777 31399-31399/com.evan.yeeuusample D/BluetoothAdapter:        STATE_ON
   08-22 14:12:00.781 31399-31399/com.evan.yeeuusample D/BluetoothGatt: connect() - device: F0:65:A0:1A:20:16, auto: false 

mConnectingDevice.establishConnection(false)

   08-22 14:12:00.781 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp()
   08-22 14:12:00.782 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp() - UUID=58cec16e-bb91-4603-bd28-11da0e5e17c0
   08-22 14:12:00.785 31399-31410/com.evan.yeeuusample D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5

   08-22 14:12:02.965 31399-31410/com.evan.yeeuusample D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 
   device=F0:65:A0:1A:20:16   

connectstatus 133

   08-22 14:12:02.969 31399-31399/com.evan.yeeuusample D/BluetoothManager: getConnectionState()
   08-22 14:12:02.970 31399-31399/com.evan.yeeuusample D/BluetoothManager: getConnectedDevices
   08-22 14:12:02.997 31399-31399/com.evan.yeeuusample D/BluetoothGatt: close() 

connect fail gatt is close

   08-22 14:12:02.997 31399-31399/com.evan.yeeuusample D/BluetoothGatt: unregisterApp() - mClientIf=5

Continue to try to connect:

   08-22 14:17:35.278 31399-31399/com.evan.yeeuusample D/BluetoothGatt: connect() - device: F0:65:A0:1A:20:16, auto: false
   08-22 14:17:35.278 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp()
   08-22 14:17:35.278 31399-31399/com.evan.yeeuusample D/BluetoothGatt: registerApp() - UUID=b8fa445c-aab2-46d1-b2c2-e67bb475caf9
   08-22 14:17:35.280 31399-31411/com.evan.yeeuusample D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
   08-22 14:17:43.666 31399-31441/com.evan.yeeuusample D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=F0:65:A0:1A:20:16

Failed to connect again! Is there any solution? i do not know why the connection status is 133, gatt has been closed! Now this state happens frequently, help me thank you .

BleGattException status return 133

Dariusz Seweryn
  • 3,212
  • 2
  • 14
  • 21
Jeong Woo
  • 65
  • 1
  • 9
  • This seems to be an Android BLE Stack issue on a lower level. Have you checked the HCI snoop log? What phone do you use? What peripheral? – Dariusz Seweryn Aug 28 '17 at 14:33
  • Intelligent device Bluetooth module is nordic, I used Huawei and xiaomi are such a phenomenon, I now practice in the doOnUububscribe () method to re-connect, the problem is certainly there @DariuszSeweryn – Jeong Woo Sep 09 '17 at 02:18

1 Answers1

0

Please using nRF connect app for test your device: https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp

If the app can be connect to your device, I think issue of rxble lib.

  • nRF connection device is normal, and disconnect again after the connection will not appear 133, I have submitted the issue on rxble, but they think this is question not issue, to the closed. – Jeong Woo Sep 09 '17 at 02:07