Android-DFU-Library
Android-DFU-Library copied to clipboard
DFU mode connection problem.
Hi, I've tried using this library in an Android project, but some device can't enter the DFU mode. So, I tried it various way such as reconnect device. That devices with problem can enter DFU mode after more than 3 minutes. It is not normal case. It seems that a lot of similar problems have occurred. I'm wondering if any further updates to this issue have been or are in progress.
Hi @choa0707,
Could you provide the LogCat logs? Enable them in your DfuSrevice by returning true from isDebug()
, like here: https://github.com/NordicSemiconductor/Android-nRF-Toolbox/blob/master/app/src/main/java/no/nordicsemi/android/nrftoolbox/dfu/DfuService.java#L52
Hi @philips77 . I have the same issue. I have tested many kinds of Android smartphone. Most of the test phone entered the DFU mode within 3 minutes. However, some smartphones had a problem, which phones are LG V10 and LG X401. My project was tested with DFU version 1.8.0.
First LG V10 it never enters DFU mode or needs a very long time to enter DFU mode almost 10~20minute. There is no error Toast, which I mean GATT ERROR or DISCONNECT. The following log always repeat without end.
>12-19 19:56:35.071 27348-27348/com.dearpeople.divecomputer I/ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-19 19:56:35.171 27348-27348/com.dearpeople.divecomputer I/ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-19 19:56:35.181 27348-27348/com.dearpeople.divecomputer D/BluetoothAdapter: getBleQmState() : state = 110
12-19 19:56:35.181 27348-27348/com.dearpeople.divecomputer D/BluetoothGatt: close() : called... getState() = 12, getBleQmState() = 110
12-19 19:56:35.181 27348-27348/com.dearpeople.divecomputer D/BluetoothGatt: close() : return_case = false
unregisterApp() - mClientIf=7
12-19 19:56:40.301 27348-27348/com.dearpeople.divecomputer I/DfuBaseService: DFU service created. Version: 1.8.0
12-19 19:56:40.461 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 19:56:40.461 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: C0:A2:2F:C6:F8:CE, auto: false
registerApp()
registerApp() - UUID=1cd76bbe-4e0b-4a70-a70c-3be62357422f
12-19 19:56:40.461 27348-27366/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=7
12-19 19:56:40.461 27348-27367/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=7 device=C0:A2:2F:C6:F8:CE
12-19 19:56:40.461 27348-27367/com.dearpeople.divecomputer I/DfuBaseService: Connected to GATT server
12-19 19:56:40.461 27348-27367/com.dearpeople.divecomputer D/BluetoothGatt: discoverServices() - device: C0:A2:2F:C6:F8:CE
12-19 19:56:40.461 27348-27367/com.dearpeople.divecomputer I/DfuBaseService: Attempting to start service discovery... succeed
12-19 19:56:40.461 27348-27366/com.dearpeople.divecomputer D/BluetoothGatt: onSearchComplete() = Device=C0:A2:2F:C6:F8:CE Status=0
12-19 19:56:40.471 27348-27366/com.dearpeople.divecomputer I/DfuBaseService: Services discovered
12-19 19:56:41.491 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Reading DFU version number...
12-19 19:56:41.861 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Version number read: 0.1 -> Application with Legacy buttonless update from SDK 7.0 or newer
12-19 19:56:41.861 27348-27630/com.dearpeople.divecomputer W/DfuImpl: Application with legacy buttonless update found
12-19 19:56:41.861 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Enabling notifications...
12-19 19:56:41.861 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: setCharacteristicNotification() - uuid: 00001531-1212-efde-1523-785feabcd123 enable: true
12-19 19:56:43.281 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
12-19 19:56:44.841 27348-27366/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=6 device=C0:A2:2F:C6:F8:CE
12-19 19:56:44.841 27348-27366/com.dearpeople.divecomputer D/BluetoothListener: BLE Disconnected!!
reconnect try
Start BLE
12-19 19:56:44.851 27348-27507/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=7 device=C0:A2:2F:C6:F8:CE
12-19 19:56:44.851 27348-27507/com.dearpeople.divecomputer I/DfuBaseService: Disconnected from GATT server
12-19 19:56:44.851 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: C0:A2:2F:C6:F8:CE
12-19 19:56:44.851 27348-27348/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
12-19 19:56:44.861 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 19:56:44.871 27348-27630/com.dearpeople.divecomputer D/BluetoothAdapter: getBleQmState() : state = 110
12-19 19:56:44.871 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: close() : called... getState() = 12, getBleQmState() = 110
12-19 19:56:44.871 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: close() : return_case = false
unregisterApp() - mClientIf=7
12-19 19:56:44.871 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Starting service that will connect to the DFU bootloader
12-19 19:56:44.871 27348-27507/com.dearpeople.divecomputer D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=7
12-19 19:56:46.921 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 19:56:46.921 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: C0:A2:2F:C6:F8:CE, auto: false
registerApp()
registerApp() - UUID=faa5e4b7-9914-4029-b338-b94033d9ddd4
12-19 19:56:46.931 27348-27366/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=8
12-19 19:56:49.371 27348-27631/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=C0:A2:2F:C6:F8:CE
12-19 19:56:49.371 27348-27631/com.dearpeople.divecomputer I/DfuBaseService: Connected to GATT server
12-19 19:56:49.371 27348-27348/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED
12-19 19:56:49.381 27348-27631/com.dearpeople.divecomputer D/BluetoothGatt: discoverServices() - device: C0:A2:2F:C6:F8:CE
12-19 19:56:49.381 27348-27631/com.dearpeople.divecomputer I/DfuBaseService: Attempting to start service discovery... succeed
12-19 19:56:51.561 27348-27631/com.dearpeople.divecomputer D/BluetoothGatt: onSearchComplete() = Device=C0:A2:2F:C6:F8:CE Status=0
12-19 19:56:51.561 27348-27631/com.dearpeople.divecomputer I/DfuBaseService: Services discovered
12-19 19:56:52.591 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Reading DFU version number...
12-19 19:56:52.671 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Version number read: 0.1 -> Application with Legacy buttonless update from SDK 7.0 or newer
12-19 19:56:52.681 27348-27630/com.dearpeople.divecomputer W/DfuImpl: Application with legacy buttonless update found
12-19 19:56:52.681 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Enabling notifications...
12-19 19:56:52.681 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: setCharacteristicNotification() - uuid: 00001531-1212-efde-1523-785feabcd123 enable: true
12-19 19:56:53.791 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
12-19 19:56:54.181 27348-27366/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=C0:A2:2F:C6:F8:CE
12-19 19:56:54.181 27348-27366/com.dearpeople.divecomputer I/DfuBaseService: Disconnected from GATT server
12-19 19:56:54.181 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: C0:A2:2F:C6:F8:CE
12-19 19:56:54.181 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 19:56:54.191 27348-27630/com.dearpeople.divecomputer D/BluetoothAdapter: getBleQmState() : state = 110
12-19 19:56:54.191 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: close() : called... getState() = 12, getBleQmState() = 110
12-19 19:56:54.191 27348-27348/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
12-19 19:56:54.191 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: close() : return_case = false
12-19 19:56:54.191 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: unregisterApp() - mClientIf=8
12-19 19:56:54.191 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Starting service that will connect to the DFU bootloader
12-19 19:56:56.241 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 19:56:56.241 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: C0:A2:2F:C6:F8:CE, auto: false
registerApp()
registerApp() - UUID=46b7d1c5-93bd-47f6-a3ac-ad099afb844c
12-19 19:56:56.251 27348-27367/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=8
12-19 19:56:59.381 27348-27348/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED
12-19 19:56:59.391 27348-27367/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=C0:A2:2F:C6:F8:CE
12-19 19:56:59.391 27348-27367/com.dearpeople.divecomputer I/DfuBaseService: Connected to GATT server
12-19 19:56:59.391 27348-27367/com.dearpeople.divecomputer D/BluetoothGatt: discoverServices() - device: C0:A2:2F:C6:F8:CE
12-19 19:56:59.391 27348-27367/com.dearpeople.divecomputer I/DfuBaseService: Attempting to start service discovery... succeed
12-19 19:57:01.631 27348-27507/com.dearpeople.divecomputer D/BluetoothGatt: onSearchComplete() = Device=C0:A2:2F:C6:F8:CE Status=0
12-19 19:57:01.631 27348-27507/com.dearpeople.divecomputer I/DfuBaseService: Services discovered
12-19 19:57:02.661 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Reading DFU version number...
12-19 19:57:02.751 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Version number read: 0.1 -> Application with Legacy buttonless update from SDK 7.0 or newer
12-19 19:57:02.751 27348-27630/com.dearpeople.divecomputer W/DfuImpl: Application with legacy buttonless update found
12-19 19:57:02.751 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Enabling notifications...
12-19 19:57:02.751 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: setCharacteristicNotification() - uuid: 00001531-1212-efde-1523-785feabcd123 enable: true
12-19 19:57:03.871 27348-27630/com.dearpeople.divecomputer I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
12-19 19:57:04.251 27348-27366/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=C0:A2:2F:C6:F8:CE
12-19 19:57:04.251 27348-27366/com.dearpeople.divecomputer I/DfuBaseService: Disconnected from GATT server
12-19 19:57:04.251 27348-27630/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: C0:A2:2F:C6:F8:CE
12-19 19:57:04.251 27348-27348/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
12-19 19:57:04.251 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
12-19 19:57:04.251 27348-27630/com.dearpeople.divecomputer I/DfuBaseService: Cleaning up...
12-19 19:57:04.261 27348-27630/com.dearpeople.divecomputer D/BluetoothAdapter: getBleQmState() : state = 110
2nd X401 This log has lots of Toast Error message, and never end. However, in a test, I found that my ble device was in DFU mode but the phone didn't connect with the device. in this case, if I use LG V10(the first problem one) to continue the DFU, then the device can finish the firmware update.
>12-19 20:15:25.266 11224-11224/com.dearpeople.divecomputer I/ViewRootImpl: ViewRoot's Touch Event : ACTION_DOWN
12-19 20:15:25.312 11224-11224/com.dearpeople.divecomputer I/ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
12-19 20:15:25.320 11224-11224/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:15:30.462 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service created. Version: 1.8.0
12-19 20:15:30.621 11224-12316/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:15:30.622 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
12-19 20:15:30.623 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=488533a0-9e7d-4c82-8628-5909a32033ca
12-19 20:15:30.627 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:15:31.874 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:15:31.874 11224-11880/com.dearpeople.divecomputer I/DfuBaseService: Connected to GATT server
12-19 20:15:31.885 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: discoverServices() - device: CB:85:28:67:F6:E8
12-19 20:15:31.888 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED
12-19 20:15:31.890 11224-11880/com.dearpeople.divecomputer I/DfuBaseService: Attempting to start service discovery... succeed
12-19 20:15:31.897 11224-11237/com.dearpeople.divecomputer D/BluetoothGatt: onSearchComplete() = Device=CB:85:28:67:F6:E8 Status=0
12-19 20:15:31.897 11224-11237/com.dearpeople.divecomputer I/DfuBaseService: Services discovered
12-19 20:15:32.917 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Reading DFU version number...
12-19 20:15:33.005 11224-11238/com.dearpeople.divecomputer W/BluetoothGatt: onCharacteristicRead() - Device=CB:85:28:67:F6:E8 handle=21 Status=0
12-19 20:15:33.006 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Version number read: 0.1 -> Application with Legacy buttonless update from SDK 7.0 or newer
12-19 20:15:33.007 11224-12316/com.dearpeople.divecomputer W/DfuImpl: Application with legacy buttonless update found
12-19 20:15:33.007 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Enabling notifications...
12-19 20:15:33.008 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: setCharacteristicNotification() - uuid: 00001531-1212-efde-1523-785feabcd123 enable: true
12-19 20:15:34.189 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
12-19 20:15:34.409 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=19 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:15:34.415 11224-11880/com.dearpeople.divecomputer W/DfuBaseService: Target device disconnected with status: 19
12-19 20:15:34.422 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:15:34.433 11224-12316/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
12-19 20:15:34.434 11224-12316/com.dearpeople.divecomputer I/DfuBaseService: Cleaning up...
12-19 20:15:34.434 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:15:34.437 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Starting service that will connect to the DFU bootloader
12-19 20:15:34.440 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
12-19 20:15:36.501 11224-12316/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:15:36.506 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
12-19 20:15:36.507 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=983ac594-e499-4a76-843d-e5102ec0f598
12-19 20:15:36.518 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:15:36.976 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:15:36.976 11224-11551/com.dearpeople.divecomputer I/DfuBaseService: Connected to GATT server
12-19 20:15:36.980 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: discoverServices() - device: CB:85:28:67:F6:E8
12-19 20:15:36.981 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED
12-19 20:15:36.985 11224-11551/com.dearpeople.divecomputer I/DfuBaseService: Attempting to start service discovery... succeed
12-19 20:15:38.102 11224-11237/com.dearpeople.divecomputer D/BluetoothGatt: onSearchComplete() = Device=CB:85:28:67:F6:E8 Status=0
12-19 20:15:38.104 11224-11237/com.dearpeople.divecomputer I/DfuBaseService: Services discovered
12-19 20:15:39.131 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Reading DFU version number...
12-19 20:15:39.190 11224-11237/com.dearpeople.divecomputer W/BluetoothGatt: onCharacteristicRead() - Device=CB:85:28:67:F6:E8 handle=19 Status=0
12-19 20:15:39.196 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Version number read: 0.8 -> Bootloader from SDK 9.0 or newer. Signature supported
12-19 20:15:39.209 11224-12316/com.dearpeople.divecomputer W/DfuImpl: Legacy DFU bootloader found
12-19 20:15:40.211 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Enabling notifications...
12-19 20:15:40.214 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: setCharacteristicNotification() - uuid: 00001531-1212-efde-1523-785feabcd123 enable: true
12-19 20:15:41.304 11224-12316/com.dearpeople.divecomputer I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4)
12-19 20:15:44.563 11224-11551/com.dearpeople.divecomputer E/DfuImpl: Characteristic write error: 133
12-19 20:15:44.565 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=8 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:15:44.566 11224-11551/com.dearpeople.divecomputer W/DfuBaseService: Target device disconnected with status: 8
12-19 20:15:44.577 11224-12316/com.dearpeople.divecomputer E/DfuBaseService: Unable to write Op Code 1 (error 133)
12-19 20:15:44.580 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:15:44.584 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
12-19 20:15:44.584 11224-12316/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 20:15:44.585 11224-12316/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:15:45.245 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service destroyed
12-19 20:15:45.282 11224-11526/com.dearpeople.divecomputer D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
12-19 20:15:55.301 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service created. Version: 1.8.0
12-19 20:15:55.337 11224-12333/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:15:55.338 11224-12333/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
12-19 20:15:55.339 11224-12333/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=5349d748-83fe-476c-aadd-527201ac21ec
12-19 20:15:55.341 11224-11237/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:15:55.532 11224-11237/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:15:55.533 11224-11237/com.dearpeople.divecomputer I/DfuBaseService: Connected to GATT server
12-19 20:15:55.544 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED
12-19 20:15:55.546 11224-11237/com.dearpeople.divecomputer D/BluetoothGatt: discoverServices() - device: CB:85:28:67:F6:E8
12-19 20:15:55.551 11224-11237/com.dearpeople.divecomputer I/DfuBaseService: Attempting to start service discovery... succeed
12-19 20:16:16.419 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=8 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:16:16.420 11224-11551/com.dearpeople.divecomputer W/DfuBaseService: Target device disconnected with status: 8
12-19 20:16:16.421 11224-12333/com.dearpeople.divecomputer E/DfuBaseService: Device got disconnected before service discovery finished
12-19 20:16:16.429 11224-12333/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:16:16.435 11224-12333/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 20:16:16.437 11224-12333/com.dearpeople.divecomputer D/BluetoothGatt: close()
12-19 20:16:16.438 11224-12333/com.dearpeople.divecomputer D/BluetoothGatt: unregisterApp() - mClientIf=5
12-19 20:16:16.453 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
12-19 20:16:17.133 11224-11526/com.dearpeople.divecomputer D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
12-19 20:16:17.141 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service destroyed
12-19 20:16:27.137 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service created. Version: 1.8.0
12-19 20:16:27.206 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:16:27.208 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
registerApp() - UUID=0c547d3a-98f5-405a-8a0b-3e865912fbc2
12-19 20:16:27.213 11224-11238/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:16:28.739 11224-11403/com.dearpeople.divecomputer D/libc: getaddrinfo called from pid =11224
12-19 20:16:28.743 11224-11403/com.dearpeople.divecomputer D/libc: getaddrinfo called from pid =11224
12-19 20:16:29.093 11224-11403/com.dearpeople.divecomputer D/libc: getaddrinfo called from pid =11224
12-19 20:16:29.531 11224-11403/com.dearpeople.divecomputer D/libc: getaddrinfo called from pid =11224
12-19 20:16:57.218 11224-11238/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:16:57.218 11224-11238/com.dearpeople.divecomputer E/DfuBaseService: Connection state change error: 133 newState: 0
12-19 20:16:57.219 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:16:57.227 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 20:16:57.228 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:16:57.233 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Restarting the service
12-19 20:16:59.274 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:16:59.279 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
12-19 20:16:59.280 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=5c411d3a-70f3-43c8-8d1a-b978f5d5569f
12-19 20:16:59.292 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:17:29.304 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:17:29.305 11224-11551/com.dearpeople.divecomputer E/DfuBaseService: Connection state change error: 133 newState: 0
12-19 20:17:29.307 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:17:29.313 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
12-19 20:17:29.314 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Cleaning up...
12-19 20:17:29.315 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:17:29.319 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Restarting the service
12-19 20:17:31.369 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:17:31.377 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
12-19 20:17:31.378 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=f7bb2808-62e6-4ae6-8009-36d270d94599
12-19 20:17:31.390 11224-11237/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:18:01.402 11224-11551/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:18:01.403 11224-11551/com.dearpeople.divecomputer E/DfuBaseService: Connection state change error: 133 newState: 0
12-19 20:18:01.405 11224-12348/com.dearpeople.divecomputer E/DfuBaseService: Device not reachable. Check if the device with address CB:85:28:67:F6:E8 is in range, is advertising and is connectable
12-19 20:18:01.412 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:18:01.414 11224-12348/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 20:18:01.415 11224-12348/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:18:02.094 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service destroyed
12-19 20:18:02.123 11224-11526/com.dearpeople.divecomputer D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
12-19 20:18:12.155 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service created. Version: 1.8.0
12-19 20:18:12.267 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:18:12.269 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
registerApp() - UUID=c9378d55-2563-48ee-97ba-26adfcb31442
12-19 20:18:12.273 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:18:35.737 11224-11320/com.dearpeople.divecomputer W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
12-19 20:18:42.281 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:18:42.282 11224-11880/com.dearpeople.divecomputer E/DfuBaseService: Connection state change error: 133 newState: 0
12-19 20:18:42.284 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:18:42.292 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 20:18:42.293 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:18:42.298 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Restarting the service
12-19 20:18:44.331 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:18:44.335 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
12-19 20:18:44.336 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: registerApp()
12-19 20:18:44.337 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=3f3b2585-9a37-4388-af5c-d9e24adf872b
12-19 20:18:44.347 11224-11238/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:19:14.353 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:19:14.353 11224-11880/com.dearpeople.divecomputer E/DfuBaseService: Connection state change error: 133 newState: 0
12-19 20:19:14.354 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:19:14.355 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
Cleaning up...
12-19 20:19:14.356 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:19:14.357 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Restarting the service
12-19 20:19:16.375 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Connecting to the device...
12-19 20:19:16.384 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: connect() - device: CB:85:28:67:F6:E8, auto: false
registerApp()
12-19 20:19:16.384 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: registerApp() - UUID=f6bf1000-b104-4bc6-a681-5960085a6297
12-19 20:19:16.392 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12-19 20:19:46.403 11224-11880/com.dearpeople.divecomputer D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=5 device=CB:85:28:67:F6:E8
12-19 20:19:46.404 11224-11880/com.dearpeople.divecomputer E/DfuBaseService: Connection state change error: 133 newState: 0
12-19 20:19:46.405 11224-12392/com.dearpeople.divecomputer E/DfuBaseService: Device not reachable. Check if the device with address CB:85:28:67:F6:E8 is in range, is advertising and is connectable
12-19 20:19:46.413 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: refresh() - device: CB:85:28:67:F6:E8
12-19 20:19:46.418 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Refreshing result: true
12-19 20:19:46.419 11224-12392/com.dearpeople.divecomputer I/DfuBaseService: Cleaning up...
12-19 20:19:46.420 11224-12392/com.dearpeople.divecomputer D/BluetoothGatt: close()
unregisterApp() - mClientIf=5
12-19 20:19:47.113 11224-11526/com.dearpeople.divecomputer D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000
12-19 20:19:47.116 11224-11224/com.dearpeople.divecomputer I/DfuBaseService: DFU service destroyed
Hi @philips77
Could you give me some feedback? :) I have been waiting for your feedback.
Hi, I'm on vacations now. Coming back on January the 7th.
Hello, Sorry for the delay.
In the first case, the device should reboot itself in bootloader mode after the first 0x01-04 command was sent. The service would connect to it and continue with OTA update. But instead it disconnects and stays in app mode.
Possible reasons:
- There is no DFU bootlaoder flashed on the device, only the SoftDevice and Application.
- The bootloader timeout is set to be very short, few seconds. In this time the device may advertise as bootloader, but then it reboots again to app mode.
- Some other reason (jump to bootloader failed, etc).
In the second case I would blame the phone's controller. Budget phone often don' have high quality parts/software and they cause problems. I recommend turning off Bluetooth or restarting the phone and trying again. On one of our Samsung S3 a factory reset helped, but something very severe must have happened there. Also, 133 may happen when there is a packet collision, when some packet was rejected, expected but wasn't received, or some timing issue appeared. It may happen to move to a less noisy (less Bluetooth/WiFi devices) environment to lower chances of packet collision. Do you have a BLE sniffer to check what exactly went wrong? You may also use the HCI snoop-log form the Developer Settings on Android and open it in Wireshark.
Hello, did you manage to solve your issue?
I was struggling with a similar issue, my previously working DFU Activity would repeatably fail in the boot loader on a low end Huawei phone. Rebooting the phone magically fixed the issue. -Ben