With a NRF51802 based product, we see DFU errors on Android devices in the field.
Our config is:
- nrf51802 with s130_nrf51_2.0.1_softdevice and nRF5_SDK_11.0.0_89a8197.
- external 16 MHz xtal and use the internal RC oscillator for the LFCLK source.
#define NRF_CLOCK_LFCLKSRC_RC {.source = NRF_CLOCK_LF_SRC_RC, .rc_ctiv = 16, .rc_temp_ctiv = 2, .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
- Connection intervals:
In the Application: Min = 7.5ms, Max = 1000ms
In the DFU: Min = 15ms, Max = 30ms
- mobile app with nordic DFU library 1.3.0 integrated.
In the field we see: 4096 DFU DEVICE DISCONNECTED and 9198 REMOTE DFU OPERATION FAILED errors.
Most affected devices so far are Samsung Galaxy S7 (SM-G930V, SM-G930A), Samsung Galaxy S7 Edge (SM-G935A). But there are some Motorola and LG phones affected by this issue as well.
Day 1:
We've been able to reproduce issue in a lab using (set #1)[Samsung Galaxy S6 Edge (Android OS 6.0.1, SAMSUNG-SM-G925A) + device (NRF51802 based) + nRF Toolbox ver.2.6.0 app] .
This set consistently fails to do DFU reporting error 4096 DFU DEVICE DISCONNECTED. Seems like it's related to android BLE GATT error 0x85 (133).
It worth to mention that we don't have any issues in a lab doing DFU update with (set #2)[the same device (NRF51802 based) + another android phone (Samsung Galaxy S7 (Android OS 6.0.1, SAMSUNG-SM-G930A)) + nRF Toolbox ver.2.6.0 app].
Day 2:
Today set #1 works just fine.
But set #2 consistently fails to do DFU with DFU_DEVICE_DISCONNECTED error.
Given that we see this errors using reference nordic nRF Toolbox app, I wonder if you saw such behavior on android as well.
Is there anything we can do on our side (mobile software or device firmware, or may be device hardware) to mitigate amount of DFU errors we see in the field (make DFU more robust in general on Android)?
I'm happy to provide any additional info.
After connection params for DFU have been adjusted to 7.5ms, 1000ms Samsung Galaxy S7 still fails to do DFU with DFU_DEVICE_DISCONNECTED error:
04-17 15:17:59.792 12709-12709/no.nordicsemi.android.nrftoolbox I/DfuBaseService: DFU service created. Version: 1.6.1 04-17 15:17:59.832 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Connecting to the device... 04-17 15:17:59.832 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: connect() - device: E3:9E:2B:B0:C7:AD, auto: false registerApp() registerApp() - UUID=c3fa8631-0f3a-4e3c-bcd3-78ba4ef5d1a0 04-17 15:17:59.882 12709-16151/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientRegistered() - status=0 clientIf=8 04-17 15:18:00.232 12709-12721/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=8 device=E3:9E:2B:B0:C7:AD 04-17 15:18:00.242 12709-12709/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED 04-17 15:18:00.252 12709-12721/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Connected to GATT server 04-17 15:18:00.252 12709-12721/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: discoverServices() - device: E3:9E:2B:B0:C7:AD 04-17 15:18:00.262 12709-12721/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Attempting to start service discovery... succeed 04-17 15:18:00.652 12709-12721/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientConnParamsChanged() - Device=E3:9E:2B:B0:C7:AD interval=6 status=0 04-17 15:18:00.992 12709-12721/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onSearchComplete() = Device=E3:9E:2B:B0:C7:AD Status=0 04-17 15:18:00.992 12709-12721/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Services discovered 04-17 15:18:01.052 12709-13865/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientConnParamsChanged() - Device=E3:9E:2B:B0:C7:AD interval=39 status=0 04-17 15:18:02.012 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuImpl: Reading DFU version number... 04-17 15:18:02.122 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuImpl: Version number read: 0.1 -> Application with Legacy buttonless update from SDK 7.0 or newer 04-17 15:18:02.122 12709-19362/no.nordicsemi.android.nrftoolbox W/DfuImpl: Application with legacy buttonless update found 04-17 15:18:02.122 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuImpl: Enabling notifications... 04-17 15:18:02.122 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: setCharacteristicNotification() - uuid: 00001531-1212-efde-1523-785feabcd123 enable: true 04-17 15:18:03.262 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuImpl: Sending Start DFU command (Op Code = 1, Upload Mode = 4) 04-17 15:18:03.642 12709-14419/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientConnectionState() - status=19 clientIf=8 device=E3:9E:2B:B0:C7:AD 04-17 15:18:03.652 12709-14419/no.nordicsemi.android.nrftoolbox W/DfuBaseService: Target device disconnected with status: 19 04-17 15:18:03.652 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: refresh() - device: E3:9E:2B:B0:C7:AD 04-17 15:18:03.662 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Refreshing result: true Cleaning up... 04-17 15:18:03.662 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: close() unregisterApp() - mClientIf=8 04-17 15:18:03.662 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuImpl: Starting service that will connect to the DFU bootloader 04-17 15:18:03.682 12709-12709/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED 04-17 15:18:05.762 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Connecting to the device... 04-17 15:18:05.772 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: connect() - device: E3:9E:2B:B0:C7:AD, auto: false registerApp() registerApp() - UUID=c9c2cacc-44d4-4851-ad65-842e9761ed9c 04-17 15:18:05.822 12709-12721/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientRegistered() - status=0 clientIf=8 04-17 15:18:06.172 12709-13865/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=8 device=E3:9E:2B:B0:C7:AD 04-17 15:18:06.172 12709-13865/no.nordicsemi.android.nrftoolbox E/DfuBaseService: Connection state change error: 133 newState: 0 04-17 15:18:06.172 12709-19362/no.nordicsemi.android.nrftoolbox E/DfuBaseService: Device not reachable. Check if the device with address E3:9E:2B:B0:C7:AD is in range, is advertising and is connectable 04-17 15:18:06.182 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: refresh() - device: E3:9E:2B:B0:C7:AD 04-17 15:18:06.182 12709-19362/no.nordicsemi.android.nrftoolbox I/DfuBaseService: Refreshing result: true Cleaning up... 04-17 15:18:06.182 12709-19362/no.nordicsemi.android.nrftoolbox D/BluetoothGatt: close() unregisterApp() - mClientIf=8 04-17 15:18:06.822 12709-12709/no.nordicsemi.android.nrftoolbox D/TextView: setTypeface with style : 0 04-17 15:18:06.862 12709-12709/no.nordicsemi.android.nrftoolbox I/DfuBaseService: DFU service destroyed