From a70f0adec86e6263ca493069145a637e731df798 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sun, 8 Nov 2026 03:55:51 +0100 Subject: [PATCH] lf noralsy demod: stop losing reads to one demod error, accept BB0314FF ASKDemod_ext() was called with maxErr 0. The error is most often the cut first bit of the read, outside every frame. cmdlfgallagher.c passes 100 in the same call since dfb7eaf06, and a frame still has to pass both checksums. A 0xBB0314FF first block, which getnoralsyBits() notes as seen, no longer gets the unknown bits warning. The example in the comment is such a card, its hex column said BB0214FF. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 ++ client/src/cmdlfnoralsy.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f8f9eea1..281326c62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Fixed `lf noralsy demod` - one demod error outside the frame, like a cut first bit, no longer loses the read (@matrix) +- Fixed `lf noralsy demod` - a card with the 0xBB0314FF first block no longer gets the unknown bits warning (@matrix) - Added `lf destron sim` - simulates the FDX-A frame that `lf destron clone` writes (@matrix) - Fixed `lf destron clone` - a uid that is not 5 bytes of 00-7F is refused instead of written as another id or with bad parity (@matrix) - Fixed `lf fdxb` decoding - ISO 11784:2024 and ISO 24631-6 fields and names, and many more fixes. See commit message (@matrix) diff --git a/client/src/cmdlfnoralsy.c b/client/src/cmdlfnoralsy.c index b10ee7f97..e3278ddfb 100644 --- a/client/src/cmdlfnoralsy.c +++ b/client/src/cmdlfnoralsy.c @@ -46,7 +46,7 @@ int demodNoralsy(bool verbose) { (void) verbose; // unused so far //ASK / Manchester bool st = true; - if (ASKDemod_ext(32, 0, 0, 0, false, false, false, 1, &st) != PM3_SUCCESS) { + if (ASKDemod_ext(32, 0, 100, 0, false, false, false, 1, &st) != PM3_SUCCESS) { if (g_debugMode) PrintAndLogEx(DEBUG, "DEBUG: Error - Noralsy: ASK/Manchester Demod failed"); return PM3_ESOFT; } @@ -104,8 +104,8 @@ int demodNoralsy(bool verbose) { } PrintAndLogEx(SUCCESS, "Noralsy - Card: " _GREEN_("%u")", Year: " _GREEN_("%u") ", Raw: %08X%08X%08X", cardid, year, raw1, raw2, raw3); - if (raw1 != 0xBB0214FF) { - PrintAndLogEx(WARNING, "Unknown bits set in first block! Expected 0xBB0214FF, Found: 0x%08X", raw1); + if ((raw1 != 0xBB0214FF) && (raw1 != 0xBB0314FF)) { + PrintAndLogEx(WARNING, "Unknown bits set in first block! Expected 0xBB0214FF or 0xBB0314FF, Found: 0x%08X", raw1); PrintAndLogEx(WARNING, "Please post this output in forum to further research on this format"); } return PM3_SUCCESS; @@ -346,7 +346,7 @@ int detectNoralsy(uint8_t *dest, size_t *size) { } /* * -* 2520116 | BB0214FF2529900116360000 | 10111011 00000011 00010100 11111111 00100101 00101001 10010000 00000001 00010110 00110110 00000000 00000000 +* 2520116 | BB0314FF2529900116360000 | 10111011 00000011 00010100 11111111 00100101 00101001 10010000 00000001 00010110 00110110 00000000 00000000 * aaa*aaaaiiiYY*iiiicc---- **** iiiiiiii iiiiYYYY YYYY**** iiiiiiii iiiiiiii cccccccc * * a = fixed value BB0*14FF