FastBle icon indicating copy to clipboard operation
FastBle copied to clipboard

notify和write用的不是同一个UUID,notify不进onCharacteristicChanged方法

Open guhuixiong opened this issue 2 years ago • 3 comments

`bleManager.notify(bleDevice,BL2K_SERVICE,BL2K_CHARACTERISTIC,object : BleNotifyCallback() { override fun onNotifyFailure(exception: BleException?) { Log.d(TAG,"notifyDeviceState failure $exception") }

        override fun onNotifySuccess() {
            Log.d(TAG,"onNotifySuccess")
            _deviceState.postValue(DeviceState())
        }

        override fun onCharacteristicChanged(data: ByteArray?) {
            Log.d(TAG, "onCharacteristicChanged----")
            data?.let {
                val state = String(it)
                Log.d(TAG, "notifyDeviceState state:$state")
            
            }
        }
    })`

guhuixiong avatar Jun 14 '22 08:06 guhuixiong

请问这问题你解决了吗

lichao3140 avatar Jul 13 '22 18:07 lichao3140

请问这问题你解决了吗

还没有,怎么弄都不行

guhuixiong avatar Jul 19 '22 09:07 guhuixiong

解决了:https://github.com/Jasonchenlijian/FastBle/issues/574

wangjinchan avatar Jun 16 '23 01:06 wangjinchan