KSEC TagBase

Version 1.1.2

RFID & NFC KnowledgeBase

Using NXP TagWriter To write NFC Tags

1. General description

The NFC TagWriter by NXP stores information such as contacts, bookmarks, geo- location, bluetooth handover, SMS, email, text messages and various other information to any NFC-enabled tag. NFC TagWriter can store items like posters, business cards, watches and several other NFC-enabled electronics. This user manual explains the advanced features of the NFC TagWriter by NXP.

2. Mirror features on NXP NTAG 21x tags

There are two link mirror features available in NFC TagWriter by NXP: 1. Tag UID mirror 2. Tag Interaction Counter mirror

2.1 Tag UID Mirror

This feature attaches the unique identifier (UID) of the tag to your link dataset as a parameter. An example for the link dataset format written on your tag is shown below: http://www.myhomepage.com?m=unique_tag_UID Using this feature on multiple tags, each tag will have an individual URL. You can use a backend system to analyze exactly which tag was tapped by the user and use this information e.g. to display individualized webpages.

2.2 Tag Interaction Counter mirror

This feature will enable the counter for tap interactions and add the counter value as a parameter in the link dataset. The counter will increase each time a user interacts with the tag. An example for the link dataset format written on your tag is shown below: http://www.myhomepage.com?c=counter_value

2.3 Using both mirror features

Enabling both features will add both UID and counter value as a parameter in link dataset. An example for the link dataset format written on your tag is shown below: http://www.myhomepage.com?m=unique_tag_UIDxcounter_value This gives you the number of taps for a particular tag. With both features enabled, backend systems e.g. can check whether a user actually tapped the tag or whether he used the URL from his browser history.

2.4 Steps for using mirror features

Step 1: On your smart phone, open a web browser. Step 2: Go to the web page you want to store on the NFC tag. For testing the features, you can use our test web service on: https://tagwritermirror.appspot.com. Note: Type in https://tagwritermirror.appspot.com. Step 3: In your web browser, long press the URL text field with the current web page address.

Step 4: You will see your web page address selected and list of options for further action. Select copy.

Step 5: Open NFC TagWriter by NXP and select Write tags. In the following screen choose New dataset and then LINK.

Step 6: Long press Enter Website text field. You will see PASTE icon appear next to the spot where you did a long press. Press PASTE. Note: This procedure may not work on some old phones. In such cases, you need to type the web address manually into Enter Website text field.

Step 7: You can see the following checkboxes below the web site text field:  Add Tag UID (mirror)  Add Interaction Counter (mirror).

Select the checkbox as per feature(s) you would like to use.

Press SAVE & WRITE and write the tag.

Step 8: If you are using our test web service, https://tagwritermirror.appspot.com, you can tap your tag with mirror features enabled and see tag’s UID and/or counter.

3. Tag Interaction Counter

This feature will enable the counter, which will increase each time a user interacts with the tag. This value can be retrieved by using the “READ TAGS” functionality on the main screen of NFC TagWriter by NXP. Also, NFC TagInfo by NXP can show this value. Please note that Tag Interaction Counter can be applied on any type of dataset while Tag Interaction Counter mirror (see section 2.2) is only applicable for the link dataset as it attaches the counter value to the link.

3.1 Steps for using Tag Interaction Counter

Step 1: In the main menu press Write tags. In the submenu choose one of the options for writing tags. Enter the dataset and press SAVE & WRITE. Step 2: In the following menu select Enable Interaction Counter.

Step 3: Press WRITE to complete the writing procedure.

4. Protect tags

The Protect tag menu has four protection features:

  1. Soft protection,
  2. Password protection,
  3. Remove protection,
  4. Lock tag.

4.1 Soft protection

It marks the Capability Container on your tag as being read only. Hence, no new message can be written. However, the memory can be erased and eventually overwritten with a new message. With this feature content will be soft protected according to NDEF Forum Type Tag Platform specification and NXP Application Notes for MIFARE Classic and ICode. MIFARE Ultralight and NTAG family are the only set of products where you are unable to remove Soft protection. Applying soft protection on MIFARE Ultralight and NTAG products will be permanent. Still, as mentioned in the first paragraph, you are able to use erase functionality to erase the current dataset on your NFC tag and use write functionality to write a new dataset.

4.2 Password protection on already programmed tags:

You can protect your dataset with a password. The password can be a combination of four ASCII characters. The dataset on your tag will be set on read-only mode and cannot be overwritten, deleted or formatted without entering the password.

4.2.1 Steps for setting a new password

Step 1: In the main menu press Protect tags. Press Password protection in the submenu. Step 2: To set a new password, select the option New Password and enter a word made up of four characters. Step 3: Press DONE and tap the tag.

4.2.2 Steps for removing Password protection

Step 1: Select the checkbox for Current Password. Step 2: Enter the password. Step 3: Choose the option Remove Password in drop-down menu. Step 4: Press DONE and tap the tag.

4.2.3 Steps for changing the password

Step 1: Select the checkbox for Current Password. Step 2: Enter the current password in the top text field and the new password to be set, in the bottom text field. Step 3: Press DONE and tap the tag.

4.3 Remove protection

This removes soft protection from your tag. Note: This feature is not supported on MIFARE Ultralight and NTAG family tags.

4.4 Lock tag

This will lock the content on your tag permanently in read-only state. Once locked, the dataset cannot be overwritten or formatted. Hence, you have to make sure that your dataset is correct before using the lock tag feature. Note: This feature is not supported on MIFARE DESFire family tags.

4.5 Creating a new password protected dataset

You can set the password protection along with creating a new dataset.

4.5.1 Steps for creating a new password protected dataset

Step 1: In the main menu press Write tags. In the submenu choose one of the options for writing tags. Enter the dataset and press SAVE & WRITE. Step 2: In the following menu first select Protection check box and then select one of the protection options: Soft protection, Password protection or Lock tag. In this example we will select Password protection.

Step 3: Select the option New Password and enter a word made up of four characters. Step 4: Press WRITE and tap the tag.

4.5.2 Steps for editing a password protected dataset and changing the password

Step 1: In main menu press Read tags and tap the tag. Step 2: Press EDIT DATASET.

Step 3: Edit the current dataset. In the example we are editing the URL in Enter Website text field.

Step 4: If the tag is password protected you will need to select Protection checkbox to open protection options and select Password protection.

Step 5: There, to keep the password, select Current password, enter tag’s current password in the text field and leave Keep password selected in the drop-down menu.

Step 6: Press DONE to close the password interface and then WRITE to complete the writing procedure.

4.5.3 Steps for overwriting a password protected Dataset

Step 1: In the main menu press Write tags. In the submenu choose one of the options for writing tags. Enter the dataset and press SAVE & WRITE.

Step 2: In the following menu select Protection and check box and then select Password protection.

Step 3: Select Current password check box and enter tag’s current password in the text field. In the drop-down menu change selection to Remove password.

Step 4: Press DONE to close the password interface and then WRITE to complete the writing procedure.

4.6 Lock prevention

Lock prevention feature will put your tag in a state where it permanently remains readable and writable. This cannot be reverted. Note: This feature is only supported on MIFARE Ultralight and NTAG family tags.

4.7 How to create a fully protected tag

A Tag is considered fully protected if it is password protected and at the same time no one should be able to lock the tag. Step 1: In the Main Menu choose the option “Protect Tags”. Step 2: In the List of options, choose the option “Password Protection”, Enter a new password and tap your Tag. Now the Tag is password protected.

Step 3: In the Main Menu, Choose the Option “Protect Tags”. In the list of options displayed choose “Lock Prevention”. In the Dialog displayed tick the checkbox option “Password”, Enter the password of the Tag which you have password protected in step

  1. Tap the Tag and confirm the operation. Now your tag is both password protected and at the same time no one can lock your Tag.

Note: Please note that Lock prevention is an irreversible process and Lock prevention can be applied on a Tag only once.

5. Mass encoding and using CSV files

If your use case demands the need of writing multiple different dataset records on multiple tags there is feature to select and write a selection of datasets or to write a set of datasets stored in CSV file.

5.1 Steps for selecting and writing multiple datasets

Step 1: In Write menu select My Datasets Step 2: Press EXTRAS button to open the menu for multi-selection features.

Step 3: Select Write Multiple.

Step 4: Select the datasets that you want to use for writing and press WRITE MULTIPLE.

Step 5: On the screen before writing the first dataset is shown. In Select option window you can select protection, interaction counter and add launch application features. Selecting additional settings here will override the settings on individual datasets.

Step 6: Proceed with tapping. Datasets will be written in order as listed in My Dataset list. NOTE: To skip individual item press SKIP ITEM button.

When finished with writing multiple datasets the report will show which Datasets were written successfully, which were skipped and which had failed to write.

5.2 Steps for write multiple datasets from CSV file

Step 1: Use the template: English language regions (comma as the delimiter): https://inspire.nxp.com/tagwriter/TagWriter_MassEncoding_template_eng.csv Global (semicolon as the delimiter): https://inspire.nxp.com/tagwriter/TagWriter_MassEncoding_template.csv

** For NDEF records of type “Text”, third column (Column C -> URI Type) should be used for Language codes. Supported language codes are “en”, “de”, “it”, “nl”, “fr”, “ru”, “kr”, “cn”, “uk”, “ca” and “es”. If the language code does not match with the supported language codes, then it is classified as “und” (undefined), whereas for English template if language code is not specified, it will be encoded as “en” by default.

Step 2: Fill your data following the example below.

NOTE: Commas (,) and semicolons (;) are used as the delimiter characters. If you need to use those characters in your entries please use escape command \, e.g. Yes\, you may have NFC TagWriter by NXP. Use the format, used in the template. Avoid using spaces after delimiters. In column A, C, E, F and G use only allowed values.

Step 3: Store CSV file locally on your phone’s memory via USB cable or by emailing to your NFC enabled device.

Step 4: in NFC TagWriter by NXP press Write tags and in the following menu select Write from CSV. Step 5: Browse your phone’s memory for CSV template and long-press your selection to

open it.

Step 6: NFC TagWriter by NXP will automatically read pre-set lines in your CSV document. First screen will show the first entry. In Select option window you are able to add some setting which will apply on all your entries.

Step 7: Proceed with tapping. Datasets will be written in order as listed in My Dataset list.

NOTE: To skip individual item press SKIP ITEM button.

When finished with writing multiple datasets the report will show which Datasets were written successfully, which were skipped and which had failed to write.

6. Backup and import the dataset

NFC TagWriter by NXP allows you to create a backup of your datasets. This allows you to store and send your datasets via email or import the datasets from another NFC TagWriter by NXP user.

6.1 Creating backup

In NFC TagWriter by NXP, backups are stored with the extension .twdb.

6.1.1 Steps for creating a backup of datasets

Step 1: In the main menu, choose the option My datasets. Step 2: Press share icon. NFC TagWriter by NXP will offer two options to create the backup of your datasets: Email or File.

 Option 1: Email The email option opens your default emailing application and attaches the backup file to the new email. It creates a new backup file with the .twdb extension or allows you to choose an existing backup file. To send an existing backup file, you need to browse your phone memory for the corresponding backup file with .twdb extension. After choosing the backup file, press SEND.  Option 2: File File option creates a new backup file with the .twdb extension and stores it locally. Here, you have to select the checkboxes, next to the datasets you want to store. After selecting the datasets, press SAVE.

6.2 Importing backup

NFC TagWriter by NXP allows you to import the datasets from another user.

6.2.1 Steps for importing backup file

Step 1: In main menu, choose My datasets. Step 2: Press import icon.

Step 3: Long press the backup file with the .twdb extension, which you want to import.

By restoring an old datasets you will merge those with the existing datasets.

Add launch application to the dataset feature The add launch application to the dataset feature allows you to add application launch on top of a basic dataset. Please note that this feature is different from writing Launch Application Dataset. The add launch application to the dataset feature enables you to determine the specific application that will open the dataset on your tag, when tapped with the phone. It is mandatory to have either the desired application installed on your phone or to know the exact package name of the application on Google Play Store.

6.3 Steps for using Add launch application

Step 1: In the main menu, choose Write tags. Step 2: Choose New dataset option. Step 3: Choose the type of dataset you want to store, and enter the required data. Please note that this feature is applicable to any dataset. Step 4: Press SAVE & WRITE. Step 5: In our example we are storing geo coordinates and we will be running Google Maps application with those coordinates. Select Add launch application checkbox and find the desired application on the list. Your screen should look like the image shown below. On the top you can see the dataset content and below, you should have Add launch application checkbox selected and the icon of the chosen application to launch.

Step 6: Press WRITE to complete the writing procedure.

7. Add launch application to the dataset feature

The add launch application to the dataset feature allows you to add application launch on top of a basic dataset. Please note that this feature is different from writing Launch Application Dataset. The add launch application to the dataset feature enables you to determine the specific application that will open the dataset on your tag, when tapped with the phone. It is mandatory to have either the desired application installed on your phone or to know the exact package name of the application on Google Play Store.

7.1 Steps for using Add launch application

Step 1: In the main menu, choose Write tags. Step 2: Choose New dataset option. Step 3: Choose the type of dataset you want to store, and enter the required data. Please note that this feature is applicable to any dataset. Step 4: Press SAVE & WRITE. Step 5: In our example we are storing geo coordinates and we will be running Google Maps application with those coordinates. Select Add launch application checkbox and find the desired application on the list. Your screen should look like the image shown below. On the top you can see the dataset content and below, you should have Add launch application checkbox selected and the icon of the chosen application to launch.

Step 6: Press WRITE to complete the writing procedure.

8. External Invocation of TagWriter

TagWriter can be invoked externally by sharing data from other apps like TagInfo and Browser. When data is shared from Browser or TagInfo to TagWriter, TagWriter presents options to Write, Store, Edit and Store, Edit and Write and Tap to Launch.

Step1: Launch TagInfo. Tap a tag with some content. TagInfo will read the tag and display the information. If TagWriter is installed on the device, the TagWriter icon will be displayed on the Header of TagInfo app as highlighted by red rectangle in the below image .When this Icon is clicked, the data record associated with the Tag will be shared to TagWriter.

Sharing data to Tagwriter Sharing Url from browser to using TagInfo to TagWriter

Step 2: When data is shared from external apps (like TagInfo and Browser), the below options are shown

The Description of the options are as follows:

Write: If the user clicks on write, the content/data record shared (by TagInfo/Browser) will be written to a tag.

Store: Store option stores the data record to the datasets of the TagWriter application.

Edit and Store: User can edit the data record shared and then store in into the datasets.

Edit and Write: User can edit the data record shared and then write to a tag.

Tap to Launch:

  • Displays Text if a text record was shared from other app(s)
  • Launches browser if an Uri record was shared from other app(s)
  • Launches Contacts app if VCard data record was shared from other app(s)
  • Launches SMS app if an SMS data record was shared from other app(s)
  • Launches Email app if an Email data record was shared from other app(s)
  • Connects to WiFi if a WiFi data record was shared from other app(s)
  • Pairs with Bluetooth Device if a bluetooth data record was shared from other app(s)

9. Erase tags using TagWriter

There are two ways of formatting tags using TagWriter: 1.Erase to factory default 2.Erase & format as NDEF

9.1 Erase to factory default

This feature erases entire user memory and fills it with 0 values, provided that tag is not write protected or locked.

9.2 Erase & format as NDEF

This feature erases entire user memory and formats the card with respective NDEF format. Example: T1T, T2T,T3T,T4T.For this feature to work ,tag should not be write protected or locked.

9.3 Steps for using Erase tags

Step 1: In the main menu, choose Erase tags. Refer below image.

Step 2: From the Erase tags option, choose Erase to factory default or Erase & format as NDEF for the erasing the tags as required. Options are displayed as shown in image below:

Step 3: Tap your card to perform the erase functionality. Refer to image below:

10. FAQ

Why is TagWriter by NXP requesting permission for full network access?

TagWriter by NXP is built using TAPLINX. TAPLINX is a tool allowing Android developers to program and access hardware features for MIFARE, ICODE and NTAG on high level in Java language. This tool demands each instance to be registered. The instance is registered automatically so there is no user action required. The information stored on your tag or in the application’s internal database, e.g. contact data, e-mail addresses or web links, is not being sent over the network by the application. NXP however reserves the right to collect and store statistical data about the types of tags used in conjunction with TagWriter by NXP for the purpose of market research according to NXP’s privacy policy available on http://www.nxp.com/privacy-policy.html.

Why is TagWriter by NXP requesting permissions like access to contact list, geo

location, etc.? These permissions are needed for the application to work correctly. The core idea of some functionalities is to store data already present on your mobile device to your NFC tag to share this data with other users, e.g. enable them to store your contact data in their address book. For instance, the application needs permission to access the contact list or to access GPS location in order to enable storing the contact card or your current GPS coordinates on your NFC tag. The information stored on your tag or in the application’s internal database, e.g. contact data, e-mail addresses or web links, is not being sent over the network.

Why my Bluetooth pairing is failing?

If you are connecting your Bluetooth device with your phone for the first time or it has never been paired before, make sure that your Bluetooth device (headphones, external speaker etc…) is set to visible. You will need to pair it only once.

Does TagWriter support NTAG213 lock control format?

Yes, it does handle that. Technically, NFC Forum by default assumes 8 bytes per lockbit and lockbytes after the end of the T2T_Area specified in the CC when no lock control TLV is existing. So, on the NTAG213 the lock control TLV is not needed as long as T2T_Area size is specified as 0x12 in the CC on this tag and you gain 5 bytes more for NDEF storage.