2

I'm trying to setup BLE client-server comm on android devices. From the server side, I could advertise and see connection updates successfully. On the client side, I could connect to the server , discover its services and characteristics. However, when I try to write the characteristic, I'm receiving status 133 in onCharacteristicWrite()

I'm not sure why it is happening..!! Need some help..

I've tried to do the following, but they didn't make any impact: -> adding setWriteType -> Changing the UUID to a private one

Do I have to get permissions before writing at client side?

grad9
  • 39
  • 11
  • Do you perform any operation e.g. readCharacteristic/writeCharacteristic in parallel? The BLE stack has problems with parallel execution, you should serialize them. – Christopher Sep 27 '16 at 06:13
  • Do you use several connections in parallel? I got status 133, if tried to connect to more than seven devices. – Christopher Sep 27 '16 at 06:17
  • Can you post the logcat output? – Emil Sep 27 '16 at 10:48
  • @Christopher I am scanning continuously even after connection has been made...Can it also cause the problem? I checked further and the problem seemed to be due to response code at server side, which I chose as different when sending response using sendResponse – grad9 Sep 28 '16 at 04:16
  • Hmm, I do not think that this might cause the status 133. I do the same and it is no problem. Error 133 is only described as GATT_ERROR: https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/android-4.4.4_r2.0.1/stack/include/gatt_api.h – Christopher Sep 28 '16 at 06:05

1 Answers1

0

I would start from checking the property of the characteristics. Checkout this thread for more information.

If the above actions does not help then try to verify that the attributes of the BLE server side are correct. For example: if you just connecting (with no pairing or bonding) then since it's an non-encrypted link the attributes of the characteristic shouldn't include any encryption enabled.

Community
  • 1
  • 1
Tomer Petel
  • 334
  • 3
  • 11