From 6aa9b98afce27cf810b414bc2c309d93a64b40c6 Mon Sep 17 00:00:00 2001 From: mwalker33 <51802811+mwalker33@users.noreply.github.com> Date: Sat, 6 Mar 2021 17:36:42 +1100 Subject: [PATCH] Update cmdlft55xx.c T55xx detect - set default to try all downlink modes - ensured when trying all downlink modes it starts at fixed bit. --- client/src/cmdlft55xx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/cmdlft55xx.c b/client/src/cmdlft55xx.c index 1c3993454..969eb46e1 100644 --- a/client/src/cmdlft55xx.c +++ b/client/src/cmdlft55xx.c @@ -997,10 +997,12 @@ static int CmdT55xxDetect(const char *Cmd) { downlink_mode = refLeading0; else if (r3) downlink_mode = ref1of4; - - if (ra) + else // This will set the default to user all d/l modes which will cover the ra flag as well. try_all_dl_modes = true; + // if (ra) + // try_all_dl_modes = true; + bool try_with_pwd = false; bool found = false; bool usewake = false; @@ -1026,9 +1028,9 @@ static int CmdT55xxDetect(const char *Cmd) { do { // do ... while to check without password then loop back if password supplied do { - if (try_all_dl_modes) { - for (uint8_t m = downlink_mode; m < 4; m++) { + // Loop from 1st d/l mode refFixedBit to the last d/l mode ref1of4 + for (uint8_t m = refFixedBit; m <= ref1of4; m++) { if (usewake) { // call wake if (try_with_pwd)