2017-10-02 8 views
0

NDEFの長さが256バイトを超える場合、CoreNFCからの応答を得ることができないため、1バイトのフィールドに対して3バイトのフィールドを使用する必要があります。私は、タグを両方ともAndroidで読むことができることに注意してください。TLVフィールドが3バイトの長さフォーマットを使用している場合にCoreNFCが読み取られない

この動作を確認したり、CoreNFCがファイルを認識して読み取るようにファイルを指定する方法を理解するのに役立ちますか?

だから、この作品、

// TLV header 
// Start of Type (T) field 
0x03,   // This message contains an NDEF record 
// End of Type (T) field 

// Start of Length (L) field 
// Length = payload length + length of value field 
0xFE,   // Length field, adds 3 to account for length of value field when SR:1 
// End of Length (L) field 

// Start of Value (V) field 
// Record head byte, MB:1,ME:1,CF:0,SR:1,IL:0,TNF:101 
0xD5,   // Short record false SR:1, 1-byte payload length, unknown type   
0x00,   // Type set to zero, as specified for unknown type 
0xFB,   // Payload length 
// End of Value (V) field 
// End of TLV header 

しかし、これは、

// TLV header 
// Start of Type (T) field 
0x03,   // This message contains an NDEF record 
// End of Type (T) field 

// Start of Length (L) field 
// Length = payload length + length of value field 
0xFF,   // Always 0xFF for SR:0, indicates length is between 256 and 65535 
0x01,   // MSB of length field 
0xF2,   // LSB of length field, adds 6 to account for length of value field when SR:0 
// End of Length (L) field 

// Start of Value (V) field 
// Record head byte, MB:1,ME:1,CF:0,SR:0,IL:0,TNF:101 
0xC5,   // Short record false SR:0, 4-byte payload length, unknown type   
0x00,   // Type set to zero, as specified for unknown type 
0x00,   // MSB of payload length, should be the exact size of the payload (data) 
0x00, 
0x01, 
0xEC,   // LSB of payload length 
// End of Value (V) field 
// End of TLV header 

答えて

1

それは問題は互換コンテナの設定によって引き起こされたが判明していません。 AppleがCoreNFCを搭載したNDEFの両方のタイプを読み取ることができます。「IC ReadMultipleBlocks Command」のビットをfalseに設定すると、問題なく動作します。私たちはそれを真実にしました。 CoreNFCで動作するCCの例を次に示します。それはサポートReadMultipleBlocksコマンドを実行しますが、それは128個のバイトのブロックにそう、多くのICのドキュメントから読み込み

// Start of Compatibility Container 
0xE1,   // CC0, "Magic Number", NDEF message is present in memory 
0x43,   // CC1, Version number 1.0, Read access enabled, Write access normally disabled 
0x40,   // CC2, Memory size of data field and CC field in bytes divided by 8, 0x40 = 64, 64x8=512 Bytes 
0x00,   // CC3, IC supports ReadMultipleBlocks Command 
// End of Compatibility Container 

。これは私たちが見た奇妙な行動を引き起こした原因かもしれません。

まだAndroidが問題なく処理している理由は分かりません.Appleはそれを読むことができません。しかし、この設定を変更すると、CoreNFCの問題が修正されます。

関連する問題