Closed lukasznowarkiewicz closed 4 months ago
ChatGPT conversation with debugging: https://chat.openai.com/share/81939500-1ece-49f6-9104-79e5c0044fac
Tried library pynfc:
Card I've got it's NTAG 215, according to norm ISO 14443-3A. I does not use Mifare classic standard. Wrote sample URL using NFC Tools for Desktop application:
With application on commit https://github.com/lukasznowarkiewicz/NFCBusinessCard/commit/057c0596be93412d309b320849c2b88c63bed442 successfully read UID
Available readers: ['ACS ACR122U PICC Interface']
Using reader: ACS ACR122U PICC Interface
Enter the hex command to send (or type 'exit' to quit): FF B0 00 00 08
Card response: 04 0D 5C DD C1 79 00 00 Status words: 90 00
Info sent:
Enter the hex command to send (or type 'exit' to quit): FF B0 00 03 10
Card response: E1 10 3E 00 03 2A D1 01 26 55 01 67 69 74 68 75 Status words: 90 00
Interpretation:
E1 10 3E 00
- These bytes are typically found at the beginning of the NDEF area:
E1
- Magic number indicating that the tag is formatted to store NDEF messages.10
- Version number indicating the NFC Forum Type 2 Tag specification the tag complies with.3E
- Indicates the size of the data area that can store user data (in this case, it shows that the tag can store up to 62 blocks of data, where each block is typically 8 bytes, giving a total of 496 bytes).00
- A byte typically reserved for special features or configurations.03 2A
- NDEF message header:
03
- This is the NDEF Message Begin Marker. It signifies the start of an NDEF message.2A
- The length of the NDEF message that follows (42 bytes in this case).D1 01 26
- NDEF record header:
D1
- NDEF Record Header, which breaks down as follows:D
- Indicates this is a well-known record type.1
- Indicates this is the last record in the message.01
- Type Length (1 byte).26
- Payload Length (38 bytes).55
- Type of the NDEF record:
55
- Indicates that the record type is a URI (U for URI).01
- URI Identifier Code:
01
- Indicates that the URI is prefixed with "http://www."67 69 74 68 75 62
- URI payload:
Enter the hex command to send (or type 'exit' to quit): FF B0 00 07 10
Card response: 62 2E 63 6F 6D 2F 6C 75 6B 61 73 7A 6E 6F 77 61 Status words: 90 00
62 2E 63 6F 6D 2F 6C 75 6B 61 73 7A 6E 6F 77 61
62
- b
2E
- .
63
- c
6F
- o
6D
- m
2F
- /
6C
- l
75
- u
6B
- k
61
- a
73
- s
7A
- z
6E
- n
6F
- o
77
- w
61
- a
http://www.github.com/lukasznowa
.
Enter the hex command to send (or type 'exit' to quit): FF B0 00 0B 10
Card response: 72 6B 69 65 77 69 63 7A 2F 61 62 6F 75 74 4D 65 Status words: 90 00
72 6B 69 65 77 69 63 7A 2F 61 62 6F 75 74 4D 65
72
- r
6B
- k
69
- i
65
- e
77
- w
69
- i
63
- c
7A
- z
2F
- /
61
- a
62
- b
6F
- o
75
- u
74
- t
4D
- M
65
- e
When decoded, these bytes spell out rkiewicz/aboutMe
.
http://www.github.com/lukasznowa
b.com/lukasznowa
rkiewicz/aboutMe
http://www.github.com/lukasznowarkiewicz/aboutMe
Enter the hex command to send (or type 'exit' to quit): FF B0 00 0C 10
Card response: 77 69 63 7A 2F 61 62 6F 75 74 4D 65 FE 00 00 00 Status words: 90 00
FE
- This byte is often used as a terminator in NDEF messages, indicating the end of the NDEF data.
The remaining 00 00 00 bytes are typically padding or reserved bytes to fill the rest of the block.
Available readers: ['ACS ACR122U PICC Interface']
Using reader: ACS ACR122U PICC Interface
Enter the hex command to send, type 'read_ndef' to read NDEF data, or type 'exit' to quit: read_ndef
Reading NDEF data...
NDEF Data Read from the Card: *&Ugithub.com/lukasznowarkiewicz/aboutMe
NDEF record used till this point: NDEF_data.json
Last commit form POC app: https://github.com/lukasznowarkiewicz/NFCBusinessCard/commit/e7f0127be4d335b54e2073499f9afa572542e1d4
Subject of this task is to achieve basic prove of concept - connection with USB AP122 reader, reading UID from card, reading NDEF URL record written with reference application.