美文网首页
FastBle报错

FastBle报错

作者: 星_025f | 来源:发表于2022-07-06 10:31 被阅读0次

    参考:https://blog.csdn.net/Guceekll/article/details/123203725
    参考:https://www.i4k.xyz/article/qq_21071977/108972406
    参考:https://blog.csdn.net/baidu_26352053/article/details/54571688
    参考:https://blog.csdn.net/weixin_44068690/article/details/116041455

    BluetoothGattCallback:onConnectionStateChange status: 22  newState: 0  currentThread: 144
    发生原因:断开连接后重新连接间操作过快导致
    解决办法:断开连接后增加限制连接间隔时间
    
     BluetoothGatt: onClientConnectionState() - status=133 clientIf=6 device=******************
     status: 133
     newState: 0
     currentThread: 152
     连接失败====101=====Gatt Exception Occurred! 
    
     发生原因:频繁操作断开重连
    
    一:安卓版本问题,缺少了参数
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                            mBluetoothGatt = bluetoothDevice.connectGatt(MainActivity.this,
                                    true, gattCallback, TRANSPORT_LE);
                        } else {
                            mBluetoothGatt = bluetoothDevice.connectGatt(MainActivity.this,
                                    true, gattCallback);
    }
    
    二:Gatt调用close释放资源
    三:系统硬件有关
    
    BluetoothGatt: onClientConnectionState() - status=8 clientIf=5 device=******************
    status: 8
    newState: 0
    currentThread: 144  
    
    https://blog.csdn.net/weixin_44068690/article/details/116041455
    

    相关文章

      网友评论

          本文标题:FastBle报错

          本文链接:https://www.haomeiwen.com/subject/extybrtx.html