flipperdevices / flipperzero-firmware

Flipper Zero firmware source code
https://flipperzero.one
GNU General Public License v3.0
12.03k stars 2.63k forks source link

Support NFC A 8-bytes UID #1598

Closed red-avtovo closed 1 year ago

red-avtovo commented 2 years ago

Describe the enhancement you're suggesting.

I just scanned a card and I noticed that it is not 7, but 8 bytes uid instead. I can save it, but I can't emulate it 2277D91C-0EDF-47A5-B792-408E4D5C01D3

Anything else?

No response

red-avtovo commented 2 years ago

Correct. As I said earlier, I can read it and save, but can't emulate it. Once I open the saved card it says that the data is corrupted

skotopes commented 2 years ago

Hi, there are some hardware limitations that we have on NFC chip side. We are currently researching what we can do, but most likely 8 byte UIDs are not coming any time soon.

pllopis commented 2 years ago

Hi, there are some hardware limitations that we have on NFC chip side. We are currently researching what we can do, but most likely 8 byte UIDs are not coming any time soon.

Hello, can you elaborate further on these limitations? I was just reading through the NFC layer to see how to add experimental NFC-V cloning/emulation support.

skotopes commented 2 years ago

@pllopis there are some operations like anti-collision that are off-loaded to ST25R3916. It can only handle 4 or 7 byte UIDs for NFC-A. In theory it can be done in software, but that where things become very complex, especially with timings.

Hardware emulation support for NFC-V is not in this chip. So you'll have to do it fully in software. May be a challenge. Also please check ST25R3916 datasheet and other projects, we haven't been investing much time into V. Could be that someone solved this problem.

pllopis commented 2 years ago

Thanks for the answer @skotopes! Indeed I've seen in the data sheet that NFC-V emulation is not supported by the hardware. Anti collision might indeed get tricky to handle in software, and that would need to be a low level implementation close to the data link layer, I guess.

Anti collision/inventory/discovery aside, does the currently FURI implementation provide enough abstractions that it would be a matter of working at the APDU level for emulating NFC-V, or would there be more missing bits at lower levels such as transport or data link layers? I'm just starting to look at the source, and I wonder if there's further documentation about this (several GH issues reference a FURI wiki, which seems to no longer exist).

gornekich commented 1 year ago

Hello @red-avtovo ! I think that this 8-bytes UID tags are actually NFC-B and Flipper incorrectly recognized them as NFC-A. Could you please try to read this card with latest release (0.66.1 at the time of writing) and write here the result?

red-avtovo commented 1 year ago

Sadly I've checked out from that Hotel, but I will try soon with another one

skotopes commented 1 year ago

I'll close this issue, we need card for analysis.

alvarotorijano commented 1 year ago

i've tried with an ISO15693 recognized as NFC-V and shows the 8-byte UID. Able to read the UID but not the info and cant emulate. I've been able to fully read the tag with the proxmark3. Do anybody knows how is this going on the firmware roadmap?

KondratokGK commented 1 year ago

I have some iso15693 from ti. It`s for "factorial" intercom. I can read this with nfc tools and custom commands.

yash95bh commented 10 months ago

When I try to read a card, it only reads the UID and not the info/data of the card. Hence when I emulate, it only shows the option to emulate UID and not the data inside. How do I fix this?

How do i fix the cannot parse file issue as well?

skotopes commented 10 months ago

@yash95bh can you provide more details? Card type, read logs? Also new NFC stack is coming, please try it too https://github.com/flipperdevices/flipperzero-firmware/pull/3050

yash95bh commented 10 months ago

When I first got the flipper, I read a hotel card where I work and it read as follows:

I updated the saved card from the flipper and this is how it reads now: UNKNOWN ISO TAG ISO 1443-3 (NFC-A) UID: 00 00 00 00 ATQA: 00 00 SAK: 08

Note: The UID has changed to 00 now When I read the same card under magic card reader, it successfully detected it. Somehow the UID changed . I have attached a screenshot of it

Screenshot 2023-10-13 184001

Later, I made another master key (we use Onity card maker), tried to save it > It saved and was emulating as well but it didn't open any locks.


Another issue with NFC

I download HEX editor and changed the codes. I copied the file from the desktop to the SD card and it shows an error saying CANNOT PARSE THE FILE

CANNOT PARSE THE FILE

Am I pasting the file wrong? Do I need to buy another device such as NFC cloner / Duplicator?

ALL I WANT IS TO READ A CARD, CHANGE DATA IF REQUIRED , WRITE IT ON DIFFERENT CARDS (MAGIC CARDS) AND SUCCESSFULLY EMULATE IT.

Your help is much appreciated.