Skip to content

Commit 92698bb

Browse files
committed
More logs
1 parent 239e50f commit 92698bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,7 @@ protected void onHandleIntent(final Intent intent) {
13121312
if (mError > 0) { // error occurred
13131313
if ((mError & ERROR_CONNECTION_STATE_MASK) > 0) {
13141314
final int error = mError & ~ERROR_CONNECTION_STATE_MASK;
1315+
logi("Connection error after: " + (after - before) + " ms");
13151316
final boolean timeout = error == 133 && after > before + 25000; // timeout is 30 sec
13161317
if (timeout) {
13171318
loge("Device not reachable. Check if the device with address " + deviceAddress + " is in range, is advertising and is connectable");
@@ -1328,6 +1329,7 @@ protected void onHandleIntent(final Intent intent) {
13281329
// Connection usually fails due to a 133 error (device unreachable, or.. something else went wrong).
13291330
// Usually trying the same for the second time works. Let's try 2 times.
13301331
final int attempt = intent.getIntExtra(EXTRA_RECONNECTION_ATTEMPT, 0);
1332+
logi("Attempt: " + (attempt + 1));
13311333
if (attempt < 2) {
13321334
sendLogBroadcast(LOG_LEVEL_WARNING, "Retrying...");
13331335

0 commit comments

Comments
 (0)