Closed ujjvaljoshi4 closed 1 year ago
The issue is fixed by updating the MTU size in the code.
Now getting GATT_ERROR 133 when trying to connect BLE device after successfully paired. Here is the log from the Android studio:
2022-12-01 13:02:07.441 22470-22598 BluetoothGatt com.idevicesinc.sweetblue.toolbox D registerApp()
2022-12-01 13:02:07.441 22470-22598 BluetoothGatt com.idevicesinc.sweetblue.toolbox D registerApp() - UUID=1ca54f53-1c38-4470-a1df-ec9f8d7960ff
2022-12-01 13:02:07.446 22470-23408 BluetoothGatt com.idevicesinc.sweetblue.toolbox D onClientRegistered() - status=0 clientIf=16
2022-12-01 13:02:07.679 22470-22470 GestureDetector com.idevicesinc.sweetblue.toolbox I handleMessage TAP
2022-12-01 13:02:12.474 22470-22486 BluetoothGatt com.idevicesinc.sweetblue.toolbox D onClientConnectionState() - status=133 clientIf=16 device=5D:FA:A5:0A:C5:10
2022-12-01 13:02:12.518 22470-22486 P_BleDevic...r [Native] com.idevicesinc.sweetblue.toolbox W ABE(22486) onConnectionStateChange() [5D:FA:A5:0A:C5:10] - GATT_ERROR(133) STATE_DISCONNECTED(0)
2022-12-01 13:02:12.520 22470-22598 P_BleDevic...iveManager com.idevicesinc.sweetblue.toolbox I UPDATE(22598) updateNativeConnectionState() - STATE_DISCONNECTED(0)
2022-12-01 13:02:12.521 22470-22598 PA_Task com.idevicesinc.sweetblue.toolbox I UPDATE(22598) setState() - Connect(FAILED kd01rba1168_C510 148399736 ) - 3316
2022-12-01 13:02:12.521 22470-22598 P_TaskManager com.idevicesinc.sweetblue.toolbox I UPDATE(22598) print() - no current task []
2022-12-01 13:02:12.523 22470-22598 BluetoothGatt com.idevicesinc.sweetblue.toolbox D close()
2022-12-01 13:02:12.531 22470-22598 BluetoothGatt com.idevicesinc.sweetblue.toolbox D unregisterApp() - mClientIf=16
2022-12-01 13:02:12.537 22470-22598 P_ConnectionFailManager com.idevicesinc.sweetblue.toolbox W UPDATE(22598) onConnectionFailed() - NATIVE_CONNECTION_FAILED, timing=EVENTUALLY
2022-12-01 13:02:12.542 22470-22598 P_TaskManager com.idevicesinc.sweetblue.toolbox I UPDATE(22598) addTask() - Adding task to queue: Connect(CREATED kd01rba1168_C510 199015095 )
2022-12-01 13:02:12.543 22470-22598 P_TaskManager com.idevicesinc.sweetblue.toolbox I UPDATE(22598) print() - no current task [Connect(QUEUED kd01rba1168_C510 199015095 )]
2022-12-01 13:02:12.547 22470-22598 P_TaskManager com.idevicesinc.sweetblue.toolbox I UPDATE(22598) print() - Connect(EXECUTING kd01rba1168_C510 199015095 ) []
The second comment there looks to be a different issue. Please open a new issue if you haven't figured out the problem yet. Also, please be a bit more specific (does that happen every time? Have you tried bonding after getting connected?)
@ryanhubbell I opened a new issue for GATT_ERROR 133 with required details. Please check it out here.
I have cloned repo from the main branch and update code for required changes in toolbox application. I have converted the string to hex bytes and then to SHA-256 bytes. I am trying to write SHA-256 bytes to characteristic using write(). The write() function is getting called but didn't get any success or failure callback in ReadWriteListener.
Here is the code from the example if it is required:
The service and characteristic UUIDs I have provided in the above code are a dummy to show the format of the UUIDs. It is used to authenticate BLE devices with a mobile application.
Current behavior: The ReadWriteListener is not getting called for either success or failure when performing the write operation on a characteristic.
Expected behavior: The ReadWriteListener needs to be called for either success or failure when performing the write operation on a characteristic.
@ryanhubbell Could you please help me with this?