smartboy
我们用GR5515芯片, APK上做OTA中遇到了一个问题。OTA有时候成功,有时候失败了。 失败的时候DFU转化失败了。已经发送DFU指令但是设备没有转化到DFU状态。
日志文件里面DFU task start打印出来了, 但是不知道什么原因设备不是跳到DFU状态。更奇怪的是这个问题只是release版APK上出现的, debug时候没发现。
请教这个问题怎么解决。
zhongchengzhi
您好,您可以在writeCmdProcedure和disconnect之间加个延时,如1s试试。
smartboy
V/CharacteristicWrite: doWork2
W/BleGatt: tryWriteCharacteristic
D/BluetoothGatt: writeCharacteristic() - uuid: a6ed0203-d344-460a-8075-b9e8ec90d71b
V/BleGatt: Writing characteristic a6ed0203-d344-460a-8075-b9e8ec90d71b (WRITE COMMAND, ret = true): [12]
V/CharacteristicWrite: doWork2
W/BleGatt: tryWriteCharacteristic
D/BluetoothGatt: writeCharacteristic() - uuid: a6ed0404-d344-460a-8075-b9e8ec90d71b
V/BleGatt: Writing characteristic a6ed0404-d344-460a-8075-b9e8ec90d71b (WRITE COMMAND, ret = false): [4]
E/JumpDfuCmd: finished with: resultCode = [-1], rootCause = [[JumpDfuCmd]: Failed to write characteristic.]
D/BluetoothGatt: onCharacteristicWrite() - Device=CF:15:30:**:**:** handle=17 Status=0
I/BleGatt: Data written to <a6ed0203-d344-460a-8075-b9e8ec90d71b>: [12] status: 0
E/StartDFU: finished with: resultCode = [-1], rootCause = [[JumpDfuCmd]: Failed to write characteristic.]
日志里这样错误出现了。
打开微信,使用“扫一扫”即可关注