The ‘Write tags’ screen presents you with options related to where to get the data to do your encoding. You can encode from a previous stored dataset, copy data from another tag or QR code or write using data from a CSV (excel spreadsheet) file. For this example, we are going to create a new dataset so tap on the ‘New dataset’ option.
Now we have to choose which type of data we are going to encode. The way that data is stored on an NFC tag is defined by certain standards. These require the data type to be defined clearly so that any other device reading the NFC tag can understand what type of data to expect.
In this example, we are going to store a web address ‘
‘ which is described in Tagwriter as a ‘Link’. So tap the ‘Link’ option and we can start adding data.
Screen 4 : Add your encoding data
This screen has a number of options but you don’t need to worry about them to do simple web link encoding. In the example here, we’ve added ‘https://nfc.today
‘ and selected a URI type of URL. It’s important that you include either http:// or https:// in front of your normal web address. Use https:// if it’s a secure website (you have a padlock on your page) or http:// if it isn’t. If you aren’t sure, visit the page you want to link to in your browser and then copy and paste the address from the address bar at the top of the browser. Most browsers will copy the full link including https:// or http://. That’s all you need to do and then you can tap ‘Save & Write’. We’ve added details on what all the options do below the image. You don’t need to read these to finish this tutorial.
Additional encoding data options
There are two basic ways of encoding a web link onto a tag. The first is a ‘Smart Poster’ type which typically stores the link and a title. The second is a URI type which just stores the link. There’s very little point in storing a title – it’s never* used under normal circumstances. *never means that NFC.Today have never come across a use case for it ever ! All it does it take up memeory space which, if you are using a smaller tag such as a MIFARE Ultralight®, may mean you run out of space. In short – don’t add a title.
Technically, a ‘link’ in this instance is not just a web link (generally defined as URL) which works over http(s)://. It can also mean any link protocol including mailto, ftp, etc. Additionally, it’s possible not to use a preset ‘URI identifier’ definition and enter an entire URI. In most instances, the NFC reader will understand the best it can. Which, in reality, in most cases other than a web address means that you will have no idea how it will react or if it will react at all. Note that mobile phones will (in all cases NFC.Today have experienced) understand a web address encoding without a URI identifer. There’s no real harm in encoding like this but you do need 7 or 8 additional memory bytes.
Add Tag UID (mirror)
Each NFC tag has a unique (if the tag is genuine) 7 byte ID hard coded into the memory. It can’t (on a genuine NXP chip) be changed. Some phones can’t actually scan this as they only can read – or perhaps more accurately present – the ‘user memory’ area. Therefore, in some cases, it makes sense to ‘mirror’ this UID into a URL. For example, if the UID was AABBCCDD112233 and your URL was https://nfc.today?tag=22
, you could mirror the UID onto the URL such as ‘https://nfc.today?tag=22&uid=AABBCCDD112233
‘. This may seem handy but, in reality, NFC.Today have never come across an application where this is actually that useful.
Add Interaction Counter (mirror)
Most newer NFC chips have an in-built counter which records how many times the tag has been scanned. This can be useful in a number of applications from security to marketing. The counter is stored in a part of the chip’s memory that some phones can’t readily get to without a specific App – and some phones don’t offer access at all. So, the count can be mirrored dynamically into the URL. For example, your URL might be ‘https://nfc.today?count=
‘ and the count will be added to the end. First scan it would be count=1, then on the second scan it would be count=2 and so on. For developers, remember that this is the number of times the tag has been scanned, not the number of times the user has visited the link. The two are definately not the same.
Add NTAG213TT Message (mirror)
NXP recently released a new NFC chip called the NTAG213 Tag Tamper
or NTAG213 TT. This is a clever little chip which has an extra couple of terminals on the chip. A loop of wire (seperate to the NFC antenna) can be attached and the chip can detect if the loop has been broken at any point. Very clever. This change in ‘status’ is recorded in the chips memory and can be accessed by a special App or, in the case of selecting this option, can be added to the URL. For example, an unbroken URL might show https://nfc.today?broken=00000000
and a broken/tampered tag will magically change this URL to https://nfc.today?broken=FFFFFFFF
. It’s a quick, simple way for anyone with an NFC phone to detect if a tag has been messed with. NFC.Today like it a lot.
Enable SUN Message
This is complicated. NXP launched a new tag recently called the NTAG413 DNA. It has a feature whereby each time the tag is tapped it can generate a new unique code – in a similar way to those online banking keycode generators. This code, ‘Secure Unique NFC’, can be added to a URL automatically each time the tag is scanned. This, essentially, enables a level of App free tag authentication. It’s extremely powerful and probably the best solution yet to open access (App free) NFC tag authentication. There aren’t that many NTAG413 DNA chips around at the moment but it’s a very strong step in the right direction.
Screen 5 : Confirm encoding options
This screen allows contains some additional options. You can leave all the settings as they are but if you are interested in what they do, we’ve added some notes below the image. To continue, tap on the ‘write’ button.
Write multiple NFC Tags
If you are encoding the same web link onto more than one tag, then this is how to do it. You simply check the ‘write multiple’ option and then you can tap your phone against a sequence of NFC tags and it will encode them all with the same data as the first.
NFC tags contain a ‘lock’ which prevents the data that you encode on the tag being changed. Until you lock a tag, anyone
can change the data. After you lock it, nobody can change the data. There’s three options here but ignore the first ‘soft’ one. The third option is to ‘Lock’ the tag. This will prevent any further changes. If you are messing about and playing with encoding then don’t check this. Once the tag is locked, there’s no going back. If you are using the tags in a public place, then you really do need to lock. The second option is to password protect. Newer NFC tags have a password protection feature which means that reading and/or writing the data requires a password.
Screen 6 : Place phone over NFC tag
Now simply hold your phone within a few centimeters of your NFC tag. Note that the ‘hotspot’ on the phone is usually near the top but on some older phones it can be somewhere around the middle. If you wave the phone around slowly you will find it and then you will know ! The phone will respond with a sound and/or vibration when it finds the tag.
Screen 7 : Confirm that you want to overwrite
On the previous options screen (Screen 5), we left the ‘confirm overwrite’ option enabled. That’s this screen. If you uncheck that box then you do not need to provide confirmation of the encoding here – it will just go ahead an encode (if it can). Once you get started, you will uncheck that box pretty quickly. For now, just select ‘tap to confirm store’ holding your phone over the NFC tag.
Screen 8 : Encoding complete
If all has gone well, you should see a ‘Write successful’ page with further information of what has been encoded. That’s it – you have encoded your first NFC tag. If you now close the App and wave your phone over the NFC tag, your Android phone will (should) automatically launch your link.