MIFARE NFC cards, developed by Philips in 1994, continue to be widely used today for transportation, tolls, loyalty programs, and micropayments. But how exactly do they work, and can we repurpose them as a medium for a new genre of ephemeral micropoetry?
MIFARE cards use a 13.56 MHz frequency. The card circuit is passive. Its internal coil first receives power from the reader, then it is able to identify and communicate according to privileges and permissions.
A MIFARE Classic card has 1k of memory organized in sectors and blocks. Every sector has 4 blocks, three of them designed to store data and the fourth with privileges and keys. The first sector has only 2 data blocks since the first block is used for the card UID and the last is used for the Sector Trailer. Every block is able to store 16 characters.
By default, an empty card will use a default key of FFFFFFFFFFFF. If all the blocks are protected by a non-standard key, you can use a Proxmark device with the autopwn command to crack the keys.
MIFARE poetry have 3 simple rules, that somehow derives from the support and the main proposal.
- Rule #1 Every line has up to 16 characters
- Rule #2 Every poem has 3 lines
- Rule #3 Every poem can only be read 3 times
Neon dreams glow
wires hum softly
code whispers life
Waves crash
time bends
echoes fade
Releasing coil
belligerent mass
lake, vest
Blocks 4, 5, 6 are used for the poem and block 8 for the reader counter. Block 7 is not used since it is the Sector Trailer.
Since the cards will be used as the poetry support, we need some way to write and read the cards while enforcing poetry rules.
Parts required:
- Arduino UNO R4 WiFi
- MFRC522
- Adafruit Oled 128x32 screen
- 3d printed parts
- Blank MIFARE cards or tags
Connections between Ardiuno UNO R4 and MFR522 are:
SDA to 10, SCK to 13, MOSI to 11, MISO to 12, GND to GND, RST to 9, 3.3v 3.3v
Connections between Oled Screen and Arduino are:
VCC to VCC, GND to GND, SDA to SDA and SCL to SCL pin.
MIFARE Poetry Device connects to WiFi and then a page is used to switch between read/write modes and enter each poetry line. The link between the web script and Arduino UNO is a simple json file.
{“mode”:”r”,”line1":”Hi there”, “line2”:”how are you”, “line3”:”ok”}
Write mode: if you select write mode, the device will record the poetry and reset the counter.
Read mode: if you set read mode, the device will read the 3 lines, print the complete poem on screen and decrease the counter. If the counter reaches 0, the poem will be deleted from the card.
3d enclosureThe enclosure was designed with Fusion 360 in 2 parts and printed in PLA.
Automatic poetryI have also written a simple Python script to automatically generate MIFARE poems by combining dictionary words under certain templates without exceeding blocks length. This script could be enhanced using llm.
To run just execute
$ python mifarePoetry.py
Why, why, why?An absurd device for an unnecessary micropoetry still has the potential to create a small disturbance, teach new tricks in a fun way, and even subvert the standard use of NFC technology.
Demo
TikTok
https://www.tiktok.com/@ronibandini/video/7407427604963167494
Comments