2024/Brighton/nfc
NFC was a session at IndieWebCamp Brighton 2024.
- Watch: ▶️41:32s
Notes archived from: https://etherpad.indieweb.org/nfc
IndieWebCamp Brighton 2024
Session: NFC
When: 2024-03-09 16:00
Participants
- Terence
- Joschi
- Dave
- Ana Rodrigues
- Jakob
- Jeremy Keith
- Mark Everitt
- Jon
- Fran
- Murray
- Add yourself here… (see this for more details)
Notes
(Terence is sharing his phone's screen. He's got a box of NFC tokens.)
Terence begins. He'll explain NFCs. He'll share tokens too. Then we'll brainstorm uses.
This is an NFC tag: Near Field Communication. Has anyone here got a credit card? It has an NFC chip. The card has no battery. When you go to a shop/bus/etc., the card siphons the electricity from the radio waves to power the chip. The credit card reader sends a challenge, the chip responds, all of this happens instantly.
The NFC token (or tag) is a small disc. Your phone has an NFC reader built in. Terence has a ring with an NFC tag in it that has his website's URL on it. When he holds the ring up to his phone, the phone opens up his website.
Why only a URL? We're used to powerful computers. But a token holds 144 *bytes* of memory. That's just about enough for a URL.
There's an app called NPC tools (iPhone) or NXP (Android) that allows you to write to a token. (hold the tag up to phone, tap to confirm)
(There's no visual indication of where the NFC reader on your phone is. That's phone for payment in shops, but tricky with these little tokens.)
Terence demonstrates adding/reading a different kind of data: a telephone number instead of a URL.
He shows a different Android app, NFC tag reader. That allows you to see what a token has been set to.
Some examples: Bluetooth messages, geolocations, launch application.
Question from Dave: Terence just showed us an example of over-writing a token, but aren't some read-only? Yes, says Terence, some can be written to and then locked. Good for security.
When you overwrite a tag, it only overwrites the bytes it needs to.
Mark asks: those early bytes are saying how long the data is? That's right, says Terence.
Terence is going to show us some things and then we'll get playing...
You can set up automation to be triggered by a URL from an NFC token.
Here are sticker NFCs (about 10p or 20p each), Hold it up to the light to see the insides. They work on radio waves, so don't use them on metal things.
Other things with NFCs in them: oyster cards; national ID cards (Fran has an Italian one, Ana has a Portuguese one), passports (I've got Irish and British ones, but you need a different app to read that data—it actually stores a full image in there; that's what they're checking at passport control—does the picture in the passport match the picture stored in the NFC chip)
Remember, these are little CPUs so they can perform some computation. You could count the number of times a token has been scanned and pass that number on in a query string of a URL. So, for example, you could keep track of every time your cat gets fed (token on the cat; reader on the food).
Question: compare with Bluetooth—what are the pros and cons? Terence says the fact that NFC has to be close is potentially more secure.
Let's brainstorm usage. Remember, the smart stuff can't really be on the token; it would need to be at the other end, probably a URL.
Ideas; tap here to subscribe to my RSS feeds. Tap here to go to my contact details (a page with an h-card). Tap here to go a URL which then randomly picks one of the sites in an IndieWeb web ring "Tap here for a random indie web site."
Any URL works. It needs to be a GET request, so you'd have to store, for example, log-in details in a query strings.
Terence says he still prefers QR codes for most things because you can access them from more of a distance, but sometimes you want that "tap" where things need to be close.
I ask Terence where he gets his supply and he says eBay or Ali Express.