-
Notifications
You must be signed in to change notification settings - Fork 6
Initialization: Setting payload
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.
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.
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.