在我們的項目中,我們試圖在NFC讀卡器ACS ACR122U中模擬ISO14443-3 PICC,並使用NFC手機(Samsung S3或S4)讀取該卡。在S4的情況下,我們可以成功地與模擬卡通信,但在S3的情況下,沒有NFC事件。NFC卡仿真問題S3(Android 4.3)和ACR122U
我們注意到Android(logcat)中的所有命令/響應和日誌,這表明S3無法激活LLCP通信。我發佈了我們所有的數據,請幫助我們解決問題。
命令/響應ACR122u(在讀取器PN532控制器):
COMMAND:FF0000002DD48C0400000000002001FE0FBBBAA6C9890000000000000000FFFF01FE0FBBBAA6C98900000647666D01011000
RESPONSE:D58D08E080
COMMAND:FF00000002D486
RESPONSE:D5870000A4040007D276000085010100
COMMAND:FF00000004D48E6A82
RESPONSE:D58F00
COMMAND:FF00000002D486
RESPONSE:D5870000A4040007D2760000850100
COMMAND:FF00000004D48E6A82
RESPONSE:D58F00
COMMAND:FF00000002D486
RESPONSE:D5870000A4040C05A00000000100 (Data we want to send to emulated card from NFC phone)
響應D58D08E080
指示讀卡器仿真爲:
- ISO/IEC 14443-4 PICC - > YES
- DEP - >編號
- 框架類型 - > Mifare
現在,當我們把S4在讀者,我們有以下日誌:
02-10 10:23:13.711: I/BrcmNci(3355): --
02-10 10:23:13.711: I/BrcmNci(3355): TX: Type 4 Tag Command (13 bytes)
02-10 10:23:13.711: I/BrcmNci(3355): CLA:0x00
02-10 10:23:13.711: I/BrcmNci(3355): INS:0xA4(Select)
02-10 10:23:13.711: I/BrcmNci(3355): P1:0x04(Name)
02-10 10:23:13.711: I/BrcmNci(3355): P2:0x00(First or Only)
02-10 10:23:13.711: I/BrcmNci(3355): Lc:0x07(7)
02-10 10:23:13.711: I/BrcmNci(3355): Data(7 bytes)
02-10 10:23:13.711: E/AudioResampler(2497): Unsupported sample format, 1 bits, 2 channels
02-10 10:23:13.716: I/BrcmNci(3355): 00 : d2 76 00 00 85 01 01
02-10 10:23:13.716: I/BrcmNci(3355): Le:0x00(0)
02-10 10:23:13.716: I/BrcmNci(3355): --
02-10 10:23:13.716: I/AudioHardwareTinyALSA(2497): AudioStreamOutALSA::write setDevice
02-10 10:23:13.741: I/BrcmNci(3355): --
02-10 10:23:13.741: I/BrcmNci(3355): RX: Type 4 Tag Response (2 bytes)
02-10 10:23:13.746: I/BrcmNci(3355): SW:0x6A82(Not Found)
02-10 10:23:13.746: I/BrcmNci(3355): --
02-10 10:23:13.746: I/BrcmNci(3355): --
02-10 10:23:13.746: I/BrcmNci(3355): TX: Type 4 Tag Command (12 bytes)
02-10 10:23:13.746: I/BrcmNci(3355): CLA:0x00
02-10 10:23:13.746: I/BrcmNci(3355): INS:0xA4(Select)
02-10 10:23:13.746: I/BrcmNci(3355): P1:0x04(Name)
02-10 10:23:13.746: I/BrcmNci(3355): P2:0x00(First or Only)
02-10 10:23:13.746: I/BrcmNci(3355): Lc:0x07(7)
02-10 10:23:13.746: I/BrcmNci(3355): Data(7 bytes)
02-10 10:23:13.746: I/BrcmNci(3355): 00 : d2 76 00 00 85 01 00
02-10 10:23:13.746: I/BrcmNci(3355): --
02-10 10:23:13.786: I/BrcmNci(3355): --
02-10 10:23:13.786: I/BrcmNci(3355): RX: Type 4 Tag Response (2 bytes)
02-10 10:23:13.786: I/BrcmNci(3355): SW:0x6A82(Not Found)
02-10 10:23:13.786: I/BrcmNci(3355): --
02-10 10:23:14.996: I/BrcmNci(3355): --
02-10 10:23:14.996: I/BrcmNci(3355): RX: Type 4 Tag Response (2 bytes)
02-10 10:23:14.996: I/BrcmNci(3355): SW:0x9000(Command Completed)
02-10 10:23:14.996: I/BrcmNci(3355): --
但在情況下,我們嘗試使用S3,我們得到的只是這個日誌:
01-07 03:16:47.555: D/NFCJNI(2694): Discovered P2P Target
01-07 03:16:47.555: D/NfcService(2694): LLCP Activation message
01-07 03:16:48.880: D/NFCJNI(2694): Discovered P2P Target
01-07 03:16:48.885: D/NfcService(2694): LLCP Activation message
01-07 03:16:51.860: D/NFCJNI(2694): Discovered P2P Target
01-07 03:16:51.860: D/NfcService(2694): LLCP Activation message
01-07 03:16:53.185: D/NFCJNI(2694): Discovered P2P Target
01-07 03:16:53.185: D/NfcService(2694): LLCP Activation message
01-07 03:16:58.870: D/NFCJNI(2694): Discovered P2P Target
01-07 03:16:58.870: D/NfcService(2694): LLCP Activation message
而且任何Android應用註冊任何NFC事件都不會被喚醒。看起來它們是S3和讀卡器之間的一些兼容性問題,或者是S3的一些NFC實現問題。
請您告訴我們爲什麼兩個手機的操作系統版本相同(即Android 4.3)時爲什麼會有這種通信差異。爲什麼S3不會超越「LLCP激活信息」?我們使用這兩款手機的
系統信息可以在這裏找到
- http://developer.samsung.com/forum/board/thread/file.do?attachmentId=15272
- http://developer.samsung.com/forum/board/thread/file.do?attachmentId=15273