Jasonchenlijian / FastBle

Android Bluetooth Low Energy (BLE) Fast Development Framework. It uses simple ways to filter, scan, connect, read ,write, notify, readRssi, setMTU, and multiConnection.
Apache License 2.0
5.29k stars 1.22k forks source link

FastBle 写入异常Code= 102,如何解决? #510

Open wzy888 opened 3 years ago

wzy888 commented 3 years ago

onWriteFailure: BleException { code=102, description='gatt writeCharacteristic fail'}

chen-fuhai commented 3 years ago

重连

kingiis commented 3 years ago

MTU没毛病的 ,要在订阅读写后,去申请完毕再 读写数据

wangyuan0217 commented 3 years ago

onWriteFailure: BleException { code=102, description='gatt writeCharacteristic fail'}

一般在连接成功不能立马setMtu 或者立马 write 。 ble连接成功建立通信后要加个短暂的delay在setMtu或者write,不然会102。

330132662 commented 3 years ago

插眼

massimilianochiodi commented 2 years ago

A pause after detecting the device and connecting solves problem 102

kingiis commented 2 years ago

onWriteFailure: BleException { code=102, description='gatt writeCharacteristic fail'}

哦 对的 所有蓝牙通病 100ms延迟

liuyiyuan commented 1 year ago

I met the same question; when I unbind a ble device, then try rebind to it; tips: 'wreite writeCharacteristic fai'; what should I do

330132662 commented 1 year ago

本邮箱不作为工作生活用 请联系 @.***

twilight2dev commented 1 month ago

anything new? i'm still having this issue, even with the delay added

wang6793453 commented 1 month ago

一定要先订阅再去写入