Fix TLV terminator. 0xFE is part of TLV, not NDEF.
This commit is contained in:
parent
4e3cccd071
commit
a235dbd0a9
3 changed files with 43 additions and 19 deletions
|
|
@ -46,12 +46,12 @@ const MifareClassicKey default_keyb = {
|
|||
0xd3, 0xf7, 0xd3, 0xf7, 0xd3, 0xf7
|
||||
};
|
||||
|
||||
const uint8_t ndef_msg[34] = {
|
||||
const uint8_t ndef_msg[33] = {
|
||||
0xd1, 0x02, 0x1c, 0x53, 0x70, 0x91, 0x01, 0x09,
|
||||
0x54, 0x02, 0x65, 0x6e, 0x4c, 0x69, 0x62, 0x6e,
|
||||
0x66, 0x63, 0x51, 0x01, 0x0b, 0x55, 0x03, 0x6c,
|
||||
0x69, 0x62, 0x6e, 0x66, 0x63, 0x2e, 0x6f, 0x72,
|
||||
0x67, 0xfe
|
||||
0x67
|
||||
};
|
||||
|
||||
int
|
||||
|
|
@ -239,6 +239,13 @@ main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
mifare_classic_trailer_block (&block, default_keyb, 0x0, 0x0, 0x0, 0x6, 0x40, default_keyb);
|
||||
if (mifare_classic_write (tags[i], 0x07, block) < 0) {
|
||||
perror ("mifare_classic_write");
|
||||
error = 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
free (tlv_data);
|
||||
|
||||
free (mad);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue