如何在Android应用程序中使用北欧DFU sdk实现安全DFU?
我正在使用北欧DFU sdk进行固件更新。它适用于普通的DFU模式。但是当我尝试安全DFU时,连接失败了。我在android应用程序中使用以下代码。
// Android应用代码//
new DfuServiceInitiator(Device MacAddress)
.setKeepBond(true)
.setDisableNotification(true)
.setZip(mFileStreamUri, mFileStreamUri.getPath())
.start(this, DFUService.class);
我有这种记录。
// log //
I/DfuBaseService: Connecting to the device...
D/BluetoothGatt: connect() - device: CA:E1:0D:C1:02:F1, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=37c55721-972b-4bf2-b0d0-034e92423ca6
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=7
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=7 device=CA:E1:0D:C1:
E/DfuBaseService: Connection state change error: 133 newState: 0
E/DfuBaseService: Device got disconnected before service discovery finished
D/BluetoothGatt: refresh() - device: CA:E1:0D:C1:02:F1
I/DfuBaseService: Refreshing result: true
I/DfuBaseService: Cleaning up...
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=7
E/radiance.smart.toilet.Activity.ConnectionActivity: onError: 4096
E/radiance.smart.toilet.Activity.ConnectionActivity: errorType: 0
E/radiance.smart.toilet.Activity.ConnectionActivity: message: DFU DEVICE DISCONNECTED
如何解决?