This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Receiving onclientconnectionstate() - status=133 on custom Android BLE app that uses NUS service

Hello,

I am receiving the above error on Android BLE app while connecting to my pca10040 based board, and I developed this app with nRF Toolbox as a reference.

I am testing this on multiple Android versions and devices, out of which I dont face any problem on motorolla devic, or nexus device (android 7) or on one plus one with android 6.

I am specifically facing this issue on redmi 3s prime with android 6.0.1. On this device My connection handler will wait for some time and then it throws this error.

I have attached the logs with testing different devices:

 **Note : 1 = Connected state
         2 = Connecting state



Mi Redme 3s Prime (6.0.1 - Marshmallow)
Result: Fail

04-18 11:56:59.462 8852-8852/com.demo.bledoorlock D/BluetoothGatt: connect() - device: D0:35:52:F8:A9:59, auto: false
04-18 11:56:59.462 8852-8852/com.demo.bledoorlock D/BluetoothGatt: registerApp()
04-18 11:56:59.462 8852-8852/com.demo.bledoorlock D/BluetoothGatt: registerApp() - UUID=dd2097ce-ff94-42e4-a454-4c4401aa5482
04-18 11:56:59.466 8852-8892/com.demo.bledoorlock D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
04-18 11:56:59.467 8852-8852/com.demo.bledoorlock I/System.out: 2
04-18 11:57:00.740 8852-8888/com.demo.bledoorlock V/FA: Inactivity, disconnecting from the service
04-18 11:57:29.490 8852-8992/com.demo.bledoorlock D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=D0:35:52:F8:A9:59
04-18 11:57:29.491 8852-8852/com.demo.bledoorlock I/System.out: 2



Mi Redme 2 Prime (5.1.1 - Lollipop)
Result: Pass

04-18 11:54:13.871 25251-25251/com.demo.bledoorlock D/BluetoothGatt: connect() - device: D0:35:52:F8:A9:59, auto: false
04-18 11:54:13.871 25251-25251/com.demo.bledoorlock D/BluetoothGatt: registerApp()
04-18 11:54:13.871 25251-25251/com.demo.bledoorlock D/BluetoothGatt: registerApp() - UUID=cb431bbb-bc5e-459b-bdcf-f7ed1929fa01
04-18 11:54:13.871 25251-25580/com.demo.bledoorlock D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
04-18 11:54:13.871 25251-25251/com.demo.bledoorlock I/System.out: 2
04-18 11:54:14.071 25251-25267/com.demo.bledoorlock D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=D0:35:52:F8:A9:59
04-18 11:54:14.071 25251-25251/com.demo.bledoorlock I/System.out: 1
04-18 11:54:14.091 25251-25251/com.demo.bledoorlock D/BluetoothGatt: discoverServices() - device: D0:35:52:F8:A9:59
04-18 11:54:14.091 25251-25251/com.demo.bledoorlock I/ViewRootImpl: CPU Rendering VSync enable = true
04-18 11:54:14.091 25251-25580/com.demo.bledoorlock D/BluetoothGatt: onSearchComplete() = Device=D0:35:52:F8:A9:59 Status=0
04-18 11:54:14.101 25251-25580/com.demo.bledoorlock D/BluetoothGatt: setCharacteristicNotification() - uuid: 6e400003-b5a3-f393-e0a9-e50e24dcca9e enable: true



Oneplus One (6.0.1 - Marshmallow)
Result: Pass

04-18 11:58:16.768 28661-28661/com.demo.bledoorlock D/BluetoothGatt: connect() - device: D0:35:52:F8:A9:59, auto: false
04-18 11:58:16.768 28661-28661/com.demo.bledoorlock D/BluetoothGatt: registerApp()
04-18 11:58:16.768 28661-28661/com.demo.bledoorlock D/BluetoothGatt: registerApp() - UUID=a3af82f0-c095-4b06-a1fb-479d7d5f715e
04-18 11:58:16.770 28661-28674/com.demo.bledoorlock D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
04-18 11:58:16.777 28661-28661/com.demo.bledoorlock I/System.out: 2
04-18 11:58:17.073 28661-28675/com.demo.bledoorlock D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=D0:35:52:F8:A9:59
04-18 11:58:17.074 28661-28661/com.demo.bledoorlock I/System.out: 1
04-18 11:58:17.086 28661-28661/com.demo.bledoorlock D/BluetoothGatt: discoverServices() - device: D0:35:52:F8:A9:59
04-18 11:58:17.089 28661-28674/com.demo.bledoorlock D/BluetoothGatt: onSearchComplete() = Device=D0:35:52:F8:A9:59 Status=0
04-18 11:58:17.092 28661-28674/com.demo.bledoorlock D/BluetoothGatt: setCharacteristicNotification() - uuid: 6e400003-b5a3-f393-e0a9-e50e24dcca9e enable: true
04-18 11:58:17.159 28661-28697/com.demo.bledoorlock V/RenderScript: 0xaeee3000 Launching thread(s), CPUs 4
04-18 11:58:17.571 28661-28693/com.demo.bledoorlock V/FA: Inactivity, disconnecting from the service

Please suggest how to fix this?

EDIT:

mi_logs.zip

working_phone_log.zip

I made the sniffer work on windows and I have attached the log of working communication as against the logs when connecting on redmi 3s phone. If anybody understands the procedure now, please suggest where is the problem.

Parents
  • Hi Bjorn, Thanks for your prompt reply. As you correctly mentioned we are not able to see connection request being send when we try it through Mi phone. When we are executing Same thing from some other phone, We are able to see connection request packet. So we are not sure why it is showing different behavior as far as Mi phone is concerned. Any help and guidance on this is appreciated.

Reply
  • Hi Bjorn, Thanks for your prompt reply. As you correctly mentioned we are not able to see connection request being send when we try it through Mi phone. When we are executing Same thing from some other phone, We are able to see connection request packet. So we are not sure why it is showing different behavior as far as Mi phone is concerned. Any help and guidance on this is appreciated.

Children
No Data
Related