flipperzero-firmware icon indicating copy to clipboard operation
flipperzero-firmware copied to clipboard

RFID Reading/Writing fails on specific tag (but not when I add logging?)

Open Pingvin0 opened this issue 3 years ago • 6 comments

Describe the bug.

I ordered some (what I assume to be) T5577 tags. When they arrived and I tested them, the flipper zero could not read or write to them. I started adding debug logging statements to the 0.62.1 firmware, and after a while I noticed reading suddenly worked. I narrowed it down to one change I've made: In RfidReader::read after the if(something_read) statement, I added an else condition which writes a debug log message. This is my code modification:

    // validation
    if(something_read) {
        switch_timer_reset();

        if(last_read_type == *_type && memcmp(last_read_data, data, data_size) == 0) {
            last_read_count = last_read_count + 1;

            if(last_read_count > 2) {
                result = true;
            }
        } else {
            last_read_type = *_type;
            memcpy(last_read_data, data, data_size);
            last_read_count = 0;
        }
    // from here
    } else {
        FURI_LOG_D("LFRFID", "Nothing read");
    }
    // to here

When logging is set to debug, this allows the blank tags to be read (not written though). I suspect it is a timing issue.

Reproduction

Switch on the flipper, select 125 KHz RFID->Read and hover the tag.

I have also made a video on what happens (with my modifications): https://streamable.com/l1bzms

Target

Tested on 0.62.1 and c7772060657afc8ee5a160ea3ed62246d989c136

Logs

No response

Anything else?

No response

Pingvin0 avatar Jul 26 '22 22:07 Pingvin0

@DrZlo13

hedger avatar Jul 27 '22 07:07 hedger

Please check latest release

skotopes avatar Sep 06 '22 17:09 skotopes

And reopen if issue persist

skotopes avatar Sep 06 '22 17:09 skotopes

Hello. Tested on 0.66.1 and d1c79a83dea7a7be7f36eb14c186926dda498a6d. Issue still persists, reading/writing does not work on these specific tags.

Pingvin0 avatar Sep 07 '22 11:09 Pingvin0

@skotopes cannot reopen since you closed it

Pingvin0 avatar Sep 07 '22 11:09 Pingvin0

@DrZlo13 @nminaylov

skotopes avatar Sep 07 '22 11:09 skotopes

works on all available tags, no other reports, closing an issue

doomwastaken avatar Jun 23 '23 09:06 doomwastaken