NFC (Near field communication) with new Android phone

My Howya died recently, may it RIP, I had it for 3 years and definitely value for money. I upgraded to an Oppo phone, one of the criteria was that the new phone had NFC (Near field communication) so that I could play with tags.

I’d bought, on Ali Express a NFC card read/writer that would work with a Raspberry Pi, but by the time it arrived I’d moved on to other projects and hadn’t done anything with it.

I’d got a Radio-frequency identification (RFID) card, and I think a RFID tag with the setup , so I’ll explore using them with the Phone. There are phone apps that will Write as well as read data to tags, so I want to start exploring those too.

Setting up

I’d downloaded a few android apps onto my phone, the same issue with apps, lots of adds or pay to get rid of them. Automate, NFC Tools & Trigger were ones I downloaded to try and use with NFC tags I have.

Automate is a bit complicated, and using other peoples flows and setting them up is a bit time consuming, and I don’t like working on a mobile phone interface. So I left this one alone.

NFC tools had a couple of videos on its usage and seemed a good bet so I did a setup with this. Not totally intuitive but I got there in the end. You have to add on NFC Tasks to do some other stuff with it. A few things (the useful ones) are in the pro version. So I couldn’t play with those.

Trigger had a few demo’s on YouTube so I tried that as well but similar results to NFC tools and the former is more extensive and versatile.

Process

The process that interested me was reconfiguring wifi/mobile data and Bluetooth on exiting and entering the house.

I was also interested in trying out toasts and email notifications just as a process (too many and they are just annoying) also there is a text to speech process as well.

As it is , in later versions of android google have blocked the switching of WiFi and Mobile data, so those two features are a bit redundant on a NFC tag. So it makes the reconfiguring a bit of a useless process.

I did learn how to clear , configure & load NFC info onto RFID cards so they can be read by phone. I just couldn’t find any particular use for it as a tool.

NFC Tags

The small sticker tags only hold a minuscule amount of data , about 144 bytes for the smaller ones, 888 bytes are common. The RFID cards have about 1kByte of data capacity.

The ones just delivered (08-03-2021, ordered on 10-02-2021 so only a month to be delivered) are 20pcs Larger Capacity NFC Tags RFID Label, Classic 1k F08 NFC Sticker For Galaxy S3 Nokia And Most Andriod NFC Phone 768 Bytes

So not a lot of info can be loaded onto the tags, so the info has to be pretty small, fortunately the commands are small, or a URL link can be small too.

Next attempt

The first triggering or switching of configurations I did was Wifi Off/ON, Mobile off/on. So I needed 2 separate cards, one for going out and one for coming in. Then I looked at using Toggle, so if it was switched off going out, it would switch on when coming in. So halving the code and only needing one code to do the actions.

It worked for Bluetooth but still not for Mobile Data & Wifi. But principle was sound. And you only needed one card to swipe. But still not relevant, and that led me onto time stamping.

AHK data capture, plants, inventory, brewing

I started to use handheld barcode scanner to record information for what I was doing with watering plants/ recording changing inventory & logging beer brewing process and developed process of pushing data to a file using AutoHotKey scripts. I then thought how I could use NFC for a similar process.

Record time leaving/returning to house

What time was I leaving and entering house? I take the dog for a walk 3-4 times a day and found I was not being too productive so I want to record how long I stay out of the house.

To do this I thought of a process, similar to needed to have a timestamp added to a text file, every time I left/came back to the house I’d scan a card and it would give me a timestamp.

I could not find any apps that did that OOTB that were not paid apps. As I’m in testing mode and feeling my way, I wanted to explore how useful NFC was first before paying for more sophisticated tools. To date, everything it does you can do with QR codes, so why invest in an alternative technology that offers you nothing more?

After fossiking around I cane across a quite versatile time keeping app called Time Recording by dynamicg.ch that allows for NFC with a plugin (I had to go to Google play and look up apps by dynamicg to find it) and it records the time

Time Recording by dynamicg.ch that allows for NFC with a plugin

I’ve been using it for 3 days now, having put the information on a card by the door. I generally remember to use it on returning but have forgot a couple of times. I’ll have to get into the habit of using it.

So far, to ensure it works I have to have the app open for it to record the data. I’ve yet to export it to a file but it exports to excel. I emailed a .xml file to myself and this is what it shows. So

Excel file of data from Time Recording App

So I have been able to push timestamp data to a .xml file (or HTML/PDF) so that is handy, but I needed a specialist app that will only pull one type of data at a time.

The NFC tools lets you do a series of actions , all on the same tag, this app only allows you to do one thing. This is useful but limited.

Asset Management and NFC

I’m wondering if there is a place in Asset Management for NFC tags that offer something over and above Barcoding?

The sticker tags are sold at $1/tag (888Bytes) in NZ but you can buy 100 for $20NZ from China (and wait a year for delivery) which puts them at 20c a tag, still far more expensive than QR code labels from a label maker. And RFID tags/cards are more expensive again.

So you need some sort of leverage from them to make them useful. One aspect is their mobility, you can take the card with you, so swipe card works on different doors if they have card readers, but maybe the phone NFC can do these actions? This is where NFC pay occurs where your credit details are in your phone.

Intermediate comment (ie not end comment)

Nothing obvious leaps out here as NFC being an amazing tool to use. Maybe digging into the code may help you programme it to do something useful.

I have a later phone but some phones don’t have NFC , so its not a universal tool. Whereas pretty much all phones have a camera for scanning bar/qr codes.

NFC does do actions, like sending emails, and I think, if QR code has Mailto: dogsbreath@gongle.plop maybe that can do that too (note to self- see if this is the case)

Also begs the question can a QR code do a timestamp to a file? Yes, see this article that, on scan , send data to a google sheet. So may have to try and set-up. The person needs to fill in some details- This is almost a form setup. Maybe look to do this with a MS Form rather than a Google form but need a timestamp added to person info

WiFi on NFC Tags RFID Label, Android NFC Phone 768 Bytes

Some labels finally arrived, I think they specifically slow down delivery for standard service, just to encourage you paying for post.

Anyway I thought I’d try setting up my WiFi setup onto a sticky label so that I can just use NFC to log onto the preferred WiFi.

It works great. I used NFC tools to write it. See image below. The nice thing with this is you just need your phone open to home screen and it works. The leave/return process requires the actual app to be open to work for that.

I’m, a bit nervous about the labels, whether you can write on them with a ball point pen or whether you need a felt tip pen. I don’t want to bend/break the wire circuitry and break them.

I’ll have to stick the sticker somewhere convenient, but also might be handy for guests.

I’ve tested to see if the labels can be erased and re-written and they can. So that is good to know you can recycle them for an alternative use.

I’ve also ordered 20 25mm NFC Stickers Protocol 13.56MHz ISO14443A Universal Label RFID Tags and All NFC Phones NFC Tag Badges, but they only have 144 bytes capacity. So I’ll transfer WiFi connection info to those when they arrive as the info is about 81 bytes only.

The 20 higher capacity ones are cheaper than 2 lots of 10 of lower capacity ones, and they arrived sooner. I’ll be a bit more discerning next time I order any, although it depends on their use case, if extra capacity not needed, although cheaper!

End comment

I’m testing the leave/return home app with RFID card and I’ll work on the WiFi sticker too.

Now that I’ve a few more stickers I’ll move the leave/return home app across to a sticker on the door, maybe one either side so I remember to use it when coming and going.

I need to see if there are a few more cases like setting alarms for morning or some other tasks.

It’s a bit of a toy so far. I can’t see this as much different than QR code scanners, apart from the fact that you do not need to focus a camera before you use it, so maybe something that you may do at night where a camera scanner may not be as effective?

One idea that may be worth thinking about is listening to audio-book at night. When I wake, I usually have to turn on phone to start the audio-book, but if I could move the phone over a NFC tag maybe that would trigger playing the story? I think I may have to turn the phone on, but maybe not looking at it directly will help me to fall back to sleep again . The night time timer is set to 15 min, so that is already preset.

I’m still wondering where you could get useful leverage from it in an Asset Management situation. I’ll tink’ some more on it.