Skip to content

Initialization: Setting payload

Tomáš Zelina edited this page May 12, 2017 · 4 revisions

To set payload, you need an application for writing NFC tags. NFC Tools by wakedev is used in examples below.

By default, card generates "codes" based on simple counter. You can test your card by approaching it to your phone.

Setting URL as payload

Generated key is appended to the end of specified URL, so it's easy to pass it to server as GET parameter.

To set URL, for example

http://zelitomas.cf/?user=crocs&key=

write it using your favorite NFC tag writing application. This is how result should look like:

http://zelitomas.cf/?user=crocs&key=123456

Please note that although it is easy to pass code to server as GET, due to obvious limitations sending it as POST is not possible without third party application installed on phone.

For testing purposes, counter values are generated before key is set, so you can test the URL generation.

Setting text as payload

It is also possible to set text as payload. The process is similar to writing URL, the only difference is in NDEF record type selected before writing to card. You can see the whole process on following video:

Only URL and text record types are supported. Other types are ignored.

Clone this wiki locally