我们如何解析 NDEF 消息?
How do we parse an NDEF message?
我们如何解析像这样的 NDEF 消息? (谢谢):
D1 01 57 55 04 69 67 6D 2E 75 2D 70 65 6D 2E 66
72 2F 66 6F 72 6D 61 74 69 6F 6E 73 2F 6D 61 73
74 65 72 2D 32 2D 73 79 73 74 65 6D 65 73 2D 65
74 二维 73 65 72 76 69 63 65 73 二维 70 6F 75 72 二维
6C 2D 69 6E 74 65 72 6E 65 74 2D 64 65 73 2D 6F
62 6A 65 74 73 2D 73 73 69 6F 2F
阅读规范https://github.com/haldean/ndef/blob/master/docs/NFCForum-TS-NDEF_1.0.pdf to understand it to get the record payloads from it. Then read the specs for the relevant Record Types (some of which are also at https://github.com/haldean/ndef/tree/master/docs)
由于您没有指定要使用的语言,因此很难给出具体示例,Android 的源代码中有示例说明如何在 Java 中执行此操作,带有链接文档的站点有一个 C 语言的示例。
可以使用在线工具解析(即https://ndefparser.online)
这是您询问的经过解析的 NDEF 消息:
HEADER: 0xd1 ( MB:1, ME:1, CF:0, SR:1, IL:0, TNF:1 )
TYPE LENGTH: 0x1
PAYLOAD LENGTH: 0x57
ID LENGTH: No ID LENGTH field
TYPE: 0x55 ("U")
ID: No ID field
PAYLOAD: 0x0469676d2e752d70656d2e66722f666f726d6174696f6e732f6d61737465722d322d73797374656d65732d65742d73657276696365732d706f75722d6c2d696e7465726e65742d6465732d6f626a6574732d7373696f2f
Payload as Ascii: " igm.u-pem.fr/formations/master-2-systemes-et-services-pour-l-internet-des-objets-ssio/"
我们如何解析像这样的 NDEF 消息? (谢谢):
D1 01 57 55 04 69 67 6D 2E 75 2D 70 65 6D 2E 66 72 2F 66 6F 72 6D 61 74 69 6F 6E 73 2F 6D 61 73 74 65 72 2D 32 2D 73 79 73 74 65 6D 65 73 2D 65 74 二维 73 65 72 76 69 63 65 73 二维 70 6F 75 72 二维 6C 2D 69 6E 74 65 72 6E 65 74 2D 64 65 73 2D 6F 62 6A 65 74 73 2D 73 73 69 6F 2F
阅读规范https://github.com/haldean/ndef/blob/master/docs/NFCForum-TS-NDEF_1.0.pdf to understand it to get the record payloads from it. Then read the specs for the relevant Record Types (some of which are also at https://github.com/haldean/ndef/tree/master/docs)
由于您没有指定要使用的语言,因此很难给出具体示例,Android 的源代码中有示例说明如何在 Java 中执行此操作,带有链接文档的站点有一个 C 语言的示例。
可以使用在线工具解析(即https://ndefparser.online)
这是您询问的经过解析的 NDEF 消息:
HEADER: 0xd1 ( MB:1, ME:1, CF:0, SR:1, IL:0, TNF:1 )
TYPE LENGTH: 0x1
PAYLOAD LENGTH: 0x57
ID LENGTH: No ID LENGTH field
TYPE: 0x55 ("U")
ID: No ID field
PAYLOAD: 0x0469676d2e752d70656d2e66722f666f726d6174696f6e732f6d61737465722d322d73797374656d65732d65742d73657276696365732d706f75722d6c2d696e7465726e65742d6465732d6f626a6574732d7373696f2f
Payload as Ascii: " igm.u-pem.fr/formations/master-2-systemes-et-services-pour-l-internet-des-objets-ssio/"