Reputation: 3
How can we parse an NDEF message like this one? (thanks) :
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 2D 73 65 72 76 69 63 65 73 2D 70 6F 75 72 2D 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
Upvotes: 0
Views: 1669
Reputation: 11
You can use online tools to parse it (i.e https://ndefparser.online)
Here is the parsed NDEF message you asked about:
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/"
Upvotes: 1
Reputation: 10182
Read the specification 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 )
As you don't specify a language you want to use it is hard to give a concrete example, there are examples in Android's source code of how to do this in Java, the site with the linked docs has an example in C.
Upvotes: 0