# Implementing NFC scanner

**URL:** <https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 7, 2024, 7:09am UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886 "2024-10-07T07:09:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_de\_Man](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rick_de_man/32/75670_2.png) [@Rick\_de\_Man](https://forum.inductiveautomation.com/u/Rick_de_Man)\
**Post date:** [October 7, 2024, 7:09am UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/1 "2024-10-07T07:09:07Z")

</div>

Currently NFC scanning is not possible using the Perspective app, there has been a ticket since 2020 and no timetable for this feature.  
I have succesfully created a work around for android devices

Requirement:

- Writable NFC/RFID tag
- Android [NFC Tools](https://play.google.com/store/apps/details?id=com.wakdev.wdnfc)
- Android [NFC Tasks](https://play.google.com/store/apps/details?id=com.wakdev.nfctasks)
- Android [NFC Tools - Pro Edition](https://play.google.com/store/apps/details?id=com.wakdev.nfctools.pro)
- Igniotion module [WebDev](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/web-dev)

NFC Tools: App is used for actively scanning NFC/RFID tags  
NFC Tasks: App is used for executing tasks stored on the NFC/RFID tag  
NFC Tools - Pro Edition: App needs to be purchased for creating HTTP REST tasks, only required on a single device and not all readers

The Tag required for my case is limited to 106 writeable bytes so i have to use some variables:

Define a HTTP Post task:

- **{VAR\_INP}** hold the API endpoint
- **{TAGID}** holds the ID of the tag as "98:38:4e:94:50:01:04:e0"
- **{VAR\_U}** Hold the username of the device, the IMEI/SIM returns "UNKNONW" and since only 106 bytes are available i have to use a variable.
- Optionally the result can be stored in a variable for debugging

Variables are stored in the app NFC Tasks and could be altered by the user,

 ![1000052474](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e4a4d4dc3a19c7aa78daa1f848e23ce3a1cfca98.png)

```python
def doPost(request, session):
	# NFC Tools HTTP POST
	# ContentType "application/x-www-form-urlencoded"
	# First key in the 'request["params"]" is the actual json value	
	# Looks like a bug but it works
	json = system.util.jsonDecode(str(request["params"].keys()[0]))
	
	if 'tag' in json:
		system.tag.writeBlocking(["[default]NfcTag"], [json['tag']])
	if 'user' in json:
		system.tag.writeBlocking(["[default]NfcUser"], [json['user']])
	
	return {
		'json': 'ok'
	}

```

After a succesfull scan the values are written in two Tags and can be used within Perspective.

![2024-10-07_08-59-48](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7bee90a1451a01d4a89e843c8c260d00740a5d8.png)

Note: some tags IDS are limited by their byte size and duplicates are already on the market.

---

<div class="post-metadata">

**Author:** ![cbanzet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cbanzet/32/6207_2.png) [@cbanzet](https://forum.inductiveautomation.com/u/cbanzet)\
**Post date:** [March 18, 2025, 9:20pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/2 "2025-03-18T21:20:01Z")

</div>

> [@Rick\_de\_Man](#):
>
> Currently NFC scanning is not possible using the Perspective app, there has been a ticket since 2020 and no timetable for this feature.

What am I missing here? It's been possible for a quite a while, with a video on IU showing how to do it.

> **[NFC Ndef Scanned Video at Inductive University](https://inductiveuniversity.com/videos/nfc-ndef-scanned/8.1)**
>
> Learn how to handle scans of NFC Data Exchange Format communications using the Ignition Perspective App.

---

<div class="post-metadata">

**Author:** ![Rick\_de\_Man](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rick_de_man/32/75670_2.png) [@Rick\_de\_Man](https://forum.inductiveautomation.com/u/Rick_de_Man)\
**Post date:** [March 18, 2025, 10:45pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/3 "2025-03-18T22:45:34Z")

</div>

> [@cbanzet](#):
>
> What am I missing here? It's been possible for a quite a while, with a video on IU showing how to do it.

Take a look at this old post, the current problem i guess is that not many protocols are implemented in the app and ISO 14443 which is commonly used is not implemented.

I have tested with a few NFC tags and the perspective app could not detect them while other apps could.

> [@Has anyone got NFC read to work on an Android/Apple Phone or Tablet?](https://forum.inductiveautomation.com/t/has-anyone-got-nfc-read-to-work-on-an-android-apple-phone-or-tablet/39279):
>
> We’ve been trying to test out some new prox card badges that have NFC using an Android or Apple tablet with the Perspective app, but can’t seem to get anything to work in the way of reading the NFC tag. We’re able to read the NFC tag with a reader app on the devices, but when we try to read it into Perspective using the example shown in the help documentation, we can’t get it to register. We tried single and continuous mode but neither seems to work. We tried multiple types of phones and tabl…

> [@Has anyone got NFC read to work on an Android/Apple Phone or Tablet?](https://forum.inductiveautomation.com/t/has-anyone-got-nfc-read-to-work-on-an-android-apple-phone-or-tablet/39279/15):
>
> We do have plans on adding support for more NFC types and I just created a ticket for including ISO-14443-4 along with ISO-15693. I’ll see if we can get it’s priority bumped up. We’re pretty busy with 8.1 release currently, so hopefully as soon as that’s done it’ll free me up to start. I’ll check in when I have a more specific timeframe.

It could be I couldn't read the tag because there was no data on it (only needed the ID), will test tomorrow and will let you know.

---

<div class="post-metadata">

**Author:** ![cbanzet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cbanzet/32/6207_2.png) [@cbanzet](https://forum.inductiveautomation.com/u/cbanzet)\
**Post date:** [March 18, 2025, 11:22pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/4 "2025-03-18T23:22:35Z")

</div>

I have a lot of experience in Ignition Vision, but I have not done a "real" project in Perspective yet so take my advice with a grain of salt. Also I got my first batch of NFC tags off of Amazon today, so this is the first time I've tried to work with one.

To start, I got "the "NFC Tools" app out of the Google Play store and I used that to start writing, and then reading data from the NFC tags I bought. If you can get that far on your phone or tablet, you will at least be able to eliminate the question of whether your issue is caused by no data on the tag.

My thinking is, that no matter what else, if I can **any** data off the tag, I can use scripting to accomplish whatever else I need.

---

<div class="post-metadata">

**Author:** ![Rick\_de\_Man](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rick_de_man/32/75670_2.png) [@Rick\_de\_Man](https://forum.inductiveautomation.com/u/Rick_de_Man)\
**Post date:** [March 19, 2025, 8:40pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/5 "2025-03-19T20:40:42Z")

</div>

> [@cbanzet](#):
>
> My thinking is, that no matter what else, if I can **any** data off the tag, I can use scripting to accomplish whatever else I need.

After wrting some data to the NFC tag "ABCDEF" i was actually able to read the tag using the session events.  
edit: Empty tag now works now and dont know why. Gateway is 8.1.47.

```python
tag value
[{
	u'string': u'\x02enABCDEF', 
	u'type': u'VA==', 
	u'typeNameFormat': 1L, 
	u'payload': u'AmVuQUJDREVG', 
	u'bytes': array('b', [2, 101, 110, 65, 66, 67, 68, 69, 70]),
	u'id': u''
}]

Log
Type:VA==, Type Name Format:1, Payload:AmVuQUJDREVG, String:enABCDEF, Bytes:array('b', [2, 101, 110, 65, 66, 67, 68, 69, 70])

```

used session event: [Perspective Session Event Scripts | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/scripting-in-perspective/perspective-session-events-scripts)

The actual value needs to skip the first 3 bytes, dont know why.  
The id (which i need) is missing since i dont want to manually write unique value to each individual tag (450)

Hopefully this helps you out.

---

<div class="post-metadata">

**Author:** ![cbanzet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cbanzet/32/6207_2.png) [@cbanzet](https://forum.inductiveautomation.com/u/cbanzet)\
**Post date:** [March 19, 2025, 10:01pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/6 "2025-03-19T22:01:21Z")

</div>

Yes! I ran into that same 3-bytes issue when I just wrote a text value to a tag. **But** I noticed that when I made the tag perform a more complex action (on Android remember) of "Copy To Clipboard" and the value I want, I get exactly the value I wrote.

I get where you're coming from not wanting to write to 450 different tags. I'm going to solve that problem by getting someone else to do it 😆.

---

<div class="post-metadata">

**Author:** ![ssatonkar](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@ssatonkar](https://forum.inductiveautomation.com/u/ssatonkar)\
**Post date:** [July 17, 2025, 4:17pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/7 "2025-07-17T16:17:59Z")

</div>

Can anyone help with details which NFC tags are compatible with Ignition Perspective application. Specific NFC tag product (Hardware) which I should purchase.  
Any information is much appreciated

---

<div class="post-metadata">

**Author:** ![Rick\_de\_Man](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rick_de_man/32/75670_2.png) [@Rick\_de\_Man](https://forum.inductiveautomation.com/u/Rick_de_Man)\
**Post date:** [July 17, 2025, 4:36pm UTC](https://forum.inductiveautomation.com/t/implementing-nfc-scanner/96886/8 "2025-07-17T16:36:56Z")

</div>

Is not really about the hardware but the NFC specs.  
If I am correct ISO-14443-4 along with ISO-15693 are supported.  
If you want to be sure you can always buys a few samples to test with.
