将多个MifareClassic卡片编码到多个NdefRecords到单个NDefMessage中



我一直在绞尽脑汁,试图将多个Mifare Classic电梯卡复制到一个Ndef格式的Mifare UltraLight标签上。

问题是什么应该是类型(或RTD_类型)和NdefRecord的有效载荷?

此外,电梯读卡器记录这些记录的方式是否与记录普通卡的方式相同?

这是我从电梯卡上读到的,它不是Ndef格式的:

Update:完整16扇区数据转储

intent.action: android.nfc.action.TECH_DIS
tag.id: ea942d64
tag.techList[] = android.nfc.tech.NfcA
tag.techList[] = android.nfc.tech.MifareCl
tag.techList[] = android.nfc.tech.NdefForm
MifareClassic tag.id = ea942d64
1024
0
16
64
618
false
trying to read sector: 0
1
0, 0, 0 ea942d64370804000280e65088eb571d
0, 1, 1 00000000000000000000000000000000
0, 2, 2 00000000000000000000000000000000
0, 3, 3 000000000000ff078069ffffffffffff
trying to read sector: 1
1
1, 0, 4 00000000000000000000000000000000
1, 1, 5 00000000000000000000000000000000
1, 2, 6 00000000000000000000000000000000
1, 3, 7 000000000000ff078069ffffffffffff
trying to read sector: 2
1
2, 0, 8 00000000000000000000000000000000
2, 1, 9 00000000000000000000000000000000
2, 2, 10 00000000000000000000000000000000
2, 3, 11 000000000000ff078069ffffffffffff
trying to read sector: 3
1
3, 0, 12 00000000000000000000000000000000
3, 1, 13 00000000000000000000000000000000
3, 2, 14 00000000000000000000000000000000
3, 3, 15 000000000000ff078069ffffffffffff
trying to read sector: 4
1
4, 0, 16 00000000000000000000000000000000
4, 1, 17 00000000000000000000000000000000
4, 2, 18 00000000000000000000000000000000
4, 3, 19 000000000000ff078069ffffffffffff
trying to read sector: 5
1
5, 0, 20 00000000000000000000000000000000
5, 1, 21 00000000000000000000000000000000
5, 2, 22 00000000000000000000000000000000
5, 3, 23 000000000000ff078069ffffffffffff
trying to read sector: 6
1
6, 0, 24 00000000000000000000000000000000
6, 1, 25 00000000000000000000000000000000
6, 2, 26 00000000000000000000000000000000
6, 3, 27 000000000000ff078069ffffffffffff
trying to read sector: 7
1
7, 0, 28 00000000000000000000000000000000
7, 1, 29 00000000000000000000000000000000
7, 2, 30 00000000000000000000000000000000
7, 3, 31 000000000000ff078069ffffffffffff
trying to read sector: 8
1
8, 0, 32 00000000000000000000000000000000
8, 1, 33 00000000000000000000000000000000
8, 2, 34 00000000000000000000000000000000
8, 3, 35 000000000000ff078069ffffffffffff
trying to read sector: 9
1
9, 0, 36 00000000000000000000000000000000
9, 1, 37 00000000000000000000000000000000
9, 2, 38 00000000000000000000000000000000
9, 3, 39 000000000000ff078069ffffffffffff
trying to read sector: 10
1
10, 0, 40 00000000000000000000000000000000
10, 1, 41 00000000000000000000000000000000
10, 2, 42 00000000000000000000000000000000
10, 3, 43 000000000000ff078069ffffffffffff
trying to read sector: 11
1
11, 0, 44 00000000000000000000000000000000
11, 1, 45 00000000000000000000000000000000
11, 2, 46 00000000000000000000000000000000
11, 3, 47 000000000000ff078069ffffffffffff
trying to read sector: 12
1
12, 0, 48 00000000000000000000000000000000
12, 1, 49 00000000000000000000000000000000
12, 2, 50 00000000000000000000000000000000
12, 3, 51 000000000000ff078069ffffffffffff
trying to read sector: 13
1
13, 0, 52 00000000000000000000000000000000
13, 1, 53 00000000000000000000000000000000
13, 2, 54 00000000000000000000000000000000
13, 3, 55 000000000000ff078069ffffffffffff
trying to read sector: 14
1
14, 0, 56 00000000000000000000000000000000
14, 1, 57 00000000000000000000000000000000
14, 2, 58 00000000000000000000000000000000
14, 3, 59 000000000000ff078069ffffffffffff
trying to read sector: 15
1
15, 0, 60 00000000000000000000000000000000
15, 1, 61 00000000000000000000000000000000
15, 2, 62 00000000000000000000000000000000
15, 3, 63 000000000000ff078069ffffffffffff

前4个字节是id,我不知道如何解释其余部分或如何将其包装成NdefRecord。这可能吗?TIA

标签不包含Ndef数据,卡是NdefFormatable,这意味着它能够存储Ndef数据,但它目前还没有被格式化为能够存储Ndef数据。

标签techList必须包含android.nfc.tech.Ndef,以便它当前存储Ndef数据。

因此,您试图做的事情是不符合逻辑的,并且您没有显示的是Mifare Classic卡上所有其他受密码保护的数据,这些数据是电梯系统实际使用的Mifare Classic卡。

既然你不能改变电梯硬件,这就更不可能了。

这就像两个人,一个用法语谈论烤蛋糕,另一个用中文谈论天气,当他们都发出声音时,他们无法理解对方,你也无法改变其中一个来配合另一个。

最新更新