Hacklet 117 – NFC Projects

Near Field Communication (NFC) is something we take for granted these days. Nearly all smartphones have it. We even have NFC interfaces for all our favorite development boards. NFC’s history goes back all the way to 1997, when an early version was used in Star Wars special edition toys. Radio Frequency Identification (RFID), which NFC builds on, goes back even further. The patent citation trail leads all the way back to 1983 in a patent awarded to [Charles Walton]. NFC is much more than RFID though. The idea of two way communication between devices opens up tons of possibilities for projects and hacks. This week on the Hacklet we’re checking out some of the best NFC projects on Hackaday.io!

ctrl0We start with [Patrick] and Ctrl-O. Somewhere in the hackerspace bible there is a clause that states “Thou shalt build an electronic access control system”. In [Patrick’s] case, a door lock became a complex membership subscription management database. Members who have paid can use an NFC tag to gain access to the hackerspace. The system consists of a Raspberry Pi with an NFC interface. A relay allows the Pi to control the door lock. The Pi can be manually configured through a web interface. It connects to Paypal to verify that each user’s membership has actually been paid. Of course a project like this is never done. The last we heard from [Patrick], he was planning future upgrades such as startup company memberships with multiple people.

keyduinoNext up is [Pierre Charlier] and KeyDuino. KeyDuino is an Arduino compatible board with all the NFC hardware baked right in. The board is based upon the Arduino Leonardo, with an ATmega32u4 processor. [Pierre] must be on to something, because the KeyDuino had a successful Kickstarter back in 2015. It’s also open source hardware, so you can build your own whenever you want. The real gem is checking out [Pierre’s] other projects. He’s documented all his KeyDuino example projects right on Hackaday.io. These include an NFC Controlled infinity mirror coffee table, a locking wooden gift box, and NFC controlled car door locks, just to name a few.

nfcringNext we have [John McLear] with 2016 NFC Ring. [John] jumped into wearable technology with one of the toughest form factors imaginable – a ring. Between the tiny amount of space and the lack of batteries, you might think there isn’t much you can do with a ring. Undaunted, [John] managed to fit two NXP NFC chips and their antennas inside a standard ring. This is the upgraded 2016 version of the ring. [John] was nice enough to supply several hundred of the earlier models to hackers at the Hackaday Supercon back in 2015. [John’s] rings would be hard for the average hacker to reproduce. [Sean Hodgins] comes to the rescue here with his own project, DIY NFC Bentwood Ring.

pressureFinally, we have [CaptMcAllister] with RFID air pressure sensor. As the name implies, this sensor measures air pressure. It could be in open air, a tire, or even a football used by the New England Patriots. Sure, cars all have Tire Pressure Monitoring Systems (TPMS) sensors which do something similar. [CaptMcAllister’s] design has one important difference – it has no batteries. The heart of the system is a Texas Instruments RF430FRL15X, a device with the NFC radio and a low power MSP430 microcontroller in one chip. The system is energy harvesting, being powered by an external reader. As you can imagine, tuning the antenna was critical to this design. You can read all about it in [CaptMcAllister’s] 24 project logs.

If you want to see more NFC projects and hacks, check out our new near field communication projects list. See a project I might have missed? Don’t be shy, just drop me a message on Hackaday.io. That’s it for this week’s Hacklet, As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!

Which Wireless Tech is Right For You?

It seems these days all the electronics projects are wireless in some form. Whether you choose WiFi, Bluetooth Classic, Bluetooth Low Energy, ZigBee, Z-Wave, Thread, NFC, RFID, Cell, IR, or even semaphore or carrier pigeon depends a lot on the constraints of your project. There are a lot of variables to consider, so here is a guide to help you navigate the choices and come to a conclusion about which to use in your project.

We can really quickly reduce options down to the appropriate tech with just a few questions.

Continue reading “Which Wireless Tech is Right For You?”

Robotic Pets Test an Automatic Pet Door

Lots of people get a pet and then hack solutions that help them care for their new friend, like an automatic door to provide access to the great outdoors. Then again, some people build the pet door first and then build the pets to test it.

It’s actually not quite as weird as it sounds. [Amir Avni] and his wife attended a recent GeekCon and entered the GeekCon Pets event. GeekCon is a cooperative rather than competitive hackathon that encourages useless builds as a means to foster community and to just have some fun. [Amir] and his wife wanted to build a full-featured automatic pet door, and succeeded – with NFC and an ESP8266, the stepper-powered door worked exactly as planned. But without any actual animal companions to test the system, they had to hack up a few volunteers. They came up with a 3D-printed dog and cat perched atop wireless cars, and with NFC tags dangling from their collars, the door was able to differentiate between the wandering ersatz animals. The video below the break shows the adorable plastic pals in action.

It’s clear from all the pet doors and automatic waterers and feeders we’ve seen that hackers love their pets, but we’re pretty sure this is the first time the pet itself was replaced by a robot. That’s fine for the test environment, but we’d recommend the real thing for production.

Continue reading “Robotic Pets Test an Automatic Pet Door”

GuardBunny Active RFID Protection Going Open Hardware

There are two sides to every coin. Instead of swiping or using a chip reader with your credit card, some companies offer wireless cards that you hold up to a reader for just an instant. How convenient for you and for anyone who might what to read that data for their own use. The same goes for RFID enabled passports, and the now ubiquitous keycards used for door access at businesses and hotels. I’m sure you can opt-out of one of these credit cards, but Gerald in human resources isn’t going to issue you a metal key — you’re stuck hauling around that RFID card.

It is unlikely that someone surreptitiously reading your card will unlock your secrets. The contactless credit cards and the keylock cards are actually calculating a response based on a stored key pair. But you absolutely could be tracked by the unique IDs in your cards. Are you being logged when passing by an open reader? And other devices, like public transit cards, may have more information stored on them that could be harvested. It’s not entirely paranoid to want to silence these signals when you’re not using them.

One solution is to all of this is to protect your wallet from would-be RFID pirates. At this point all I’m sure everyone is thinking of a tin-foil card case. Sure, that might work unless the malicious reader is very powerful. But there’s a much more interesting way to protect against this: active RFID scrambling with a project called GuardBunny. It’s a card that you place next to whatever you want to protect. It’s not really RFID — I’ll get that in a moment — but is activated the same way and spews erroneous bits back at any card reader. Kristin Paget has been working on GuardBunny for several years now. As of late she’s had less time for active development, but is doing a great thing by letting version 1 out into the world for others to hack on. In her talk at Shmoocon 2016 she walked through the design, demonstrated its functionality, and shared some suggestions for further improvement.

Continue reading “GuardBunny Active RFID Protection Going Open Hardware”

This Car Lets You Fistbump to Unlock

In the dark ages, you had to use a key to lock and unlock your car doors. Just about every car now has a remote control on the key that lets you unlock or lock with the push of a button. But many modern cars don’t even need that. They sense the key on your person and usually use a button to do the lock or unlock function. That button does nothing if the key isn’t nearby.

[Pierre Charlier] wanted that easy locking and unlocking, so he refitted his car with a Keyduino to allow entry with an NFC ring. What results is a very cool fistbump which convinces your car to unlock the door.

Keyduinio is [Pierre’s] NFC-enabled project, but you can also use a more conventional Arduino with an NFC and relay shield. The demo also works with a smartphone if you’re not one for wearing an NFC ring. Going this round, he even shows how to make it work with Bluetooth Low Energy (BLE).

Continue reading “This Car Lets You Fistbump to Unlock”

Snooping on SIM Cards

[Nils Pipenbrinck] has been working on a very interesting problem. The SIM card in your cellphone talks to the contactless near-field communication (NFC) chip through a cool protocol that we’d never hear of until reading his blog: single wire protocol (SWP).

The SIM card in your cellphone has only a limited number of physical connections — and by the time NFC technology came on the scene all but one of them was in use. But the NFC controller and the SIM need full-duplex communications. So the SWP works bi-directionally on just one wire; one device modulates the voltage on the line, while the other modulates the current, essentially by switching a load in and out.

This signalling protocol makes snooping on this data line tricky. So to start off his explorations with SWP, [Nils] built his own transceiver. That lead [Nils] to some very sensitive analog sniffer circuit design that he’s just come up with.

If you get interested in SWP, you’ll find the slides from this fantastic presentation (PDF) helpful, and they propose a solution very similar to the one that [Nils] ended up implementing. That’s not taking anything away from [Nils]’s amazing work: with tricky high-speed analog circuitry like this, the implementation can be more than half of the battle! And we’ll surely be following [Nils]’s blog to see where he takes this.

Banner image: An old version and a new version of the transceiver prototype.

Thanks to [Tim Riemann] for the tip!

Emulating and Cloning Smart Cards

A few years ago, we saw a project from a few researchers in Germany who built a device to clone contactless smart cards. These contactless smart cards can be found in everything from subway cards to passports, and a tool to investigate and emulate these cards has exceptionally interesting implications. [David] and [Tino], the researchers behind the first iteration of this hardware have been working on an improved version for a few years, and they’re finally ready to release it. They’re behind a Kickstarter campaign for the ChameleonMini, a device for NFC security analysis that can also clone and emulate contactless cards.

While the original Chameleon smart card emulator could handle many of the contactless smart cards you could throw at it, there at a lot of different contactless protocols. The new card can emulate just about every contactless card that operates on 13.56 MHz.

The board itself is mostly a PCB antenna, with the electronics based on an ATXMega128A4U microcontroller. This micro has AES and DES encryption engines, meaning if your contactless card has encryption and you have the cryptographic key, you can emulate that card with this device. They’re also making a more expensive version that also has a built-in reader that makes the ChameleonMini a one-stop card cloning tool.