Dear Helpers,
We are facing an issue. It is all related to DFU (secure buttonless) and Android 7.0 (deployed on a Samsung A5).
We have a code that is running perfectly that allows advertising / scanning and connection with an nrf52832. I have a series of smartphone with NRF Connect and playing with : connecting to the module, starting DFU (using the service/characteristic command sent) and connecting on the newly "created" DFU target. It works on Android 6.0.1 (LG K8) / Android 5.0.1 (Samsung S4). But on Nougat....
So on Nougat, using NRFConnect (4.13.2), I can :
-
Connect to my module (s132 v3.1, SDK 12.3)
-
Discover services
-
Start the DFU and the module reboots correctly
-
try to connect to DFUTarget... but, the module reboots immediately without any "appearing" reasons. The I have shows the event BLE_GAP_EVT_CONNECTED and then nothing and reboots.
I tried to set (bootloader and DFU compiles and executes) :
ble_opt_t ble_opt;
memset(&ble_opt, 0, sizeof(ble_opt));
ble_opt.gap_opt.compat_mode_2.mode_2_enable = 1;
err_code = sd_ble_opt_set(BLE_GAP_OPT_COMPAT_MODE_2,&ble_opt);
APP_ERROR_CHECK(err_code);
and also :
void data_len_ext_set(void) {
ret_code_t err_code;
ble_opt_t opt;
memset(&opt, 0x00, sizeof(opt));
opt.gap_opt.ext_len.rxtx_max_pdu_payload_size = 0;
err_code = sd_ble_opt_set(BLE_GAP_OPT_EXT_LEN, &opt);
APP_ERROR_CHECK(err_code);}
without success.
The only relevent debug log comes from the phone and says :
BluetoothRemoteDevices: aclStateChangeCallback: State:DisConnected to Device:XX:XX:XX:XX:XX:XX
BluetoothGatt: onClientConnectionState() - status=8 clientIf=7 device=XX:XX:XX:XX:XX:XX
BluetoothEventManager: onReceive :: android.bluetooth.device.action.ACL_DISCONNECTED
BluetoothEventManager: ACTION_ACL_DISCONNECTED
BluetoothUtils: getBtEnabledContainers(): btContainers = []
PanService: onReceive : android.bluetooth.device.action.ACL_DISCONNECTED
bt_btif : btif_dm_upstreams_cback ev: BTA_DM_BUSY_LEVEL_EVT
bt_btif : BTA_DM_BUSY_LEVEL_EVT :: p_data->busy_level.level_flags : 0x0
EnhancedTetheringManager: isLastConnectedDevice : XX:XX:XX:XX:XX:XX
SapService: Unexpected error!
SamsungAlarmManager: setExact Intent (T:2/F:1/AC:false) 20170913T145244 - CU:10021/CP:4688
SamsungAlarmManager: setLocked to kernel - T:2 / 20170913T145244, SetElapsed=277088718, nowELAPSED=277087734
KnoxKeyguardUpdateMonitor: BroadcastReceiver onReceive
KnoxKeyguardUpdateMonitor: BroadcastReceiver onReceive action: android.bluetooth.device.action.ACL_DISCONNECTED
KnoxKeyguardUpdateMonitor: BroadcastReceiver ACTION_ACL_DISCONNECTED
DfuBaseService: Connection state change error: 8 newState: 0
DfuBaseService: Device got disconnected before service discovery finished
DfuBaseService: Action received: android.bluetooth.device.action.ACL_DISCONNECTED
BluetoothGatt: refresh() - device: XX:XX:XX:XX:XX:XX
BtGatt.GattService: refreshDevice() - address=XX:XX:XX:XX:XX:XX
DfuBaseService: Refreshing result: true
DfuBaseService: Cleaning up...
TrustAgent.Tracker: [BluetoothConnectionTracker] Bluetooth connect broadast for DfuTarg XX:XX:XX:XX:XX:XX
BluetoothGatt: close()
BluetoothGatt: unregisterApp() - mClientIf=7
BtGatt.GattService: unregisterClient() - clientIf=7
TrustAgent.Tracker: [BluetoothConnectionTracker] Bluetooth disconnect broadast for DfuTarg XX:XX:XX:XX:XX:XX
I am struggling on that with Nougat...
Any help would be appreciated.
Thanks,
David
Edit 1 : We have tested on a mobile device that is running Android 7.1.1... And it's working. The mobile is a Motorola.