This is an RC522 RFID reader attached to an adafruit trinket m0. The trinket is mounted on a small breadboard for ease of use and the white wire is not actually in use it was just plugged in up there to keep it out of the way.
Total parts cost about $15. I was originally going to use a digispark but it wasnāt much cheaper and had a much less capable chip on it.
I will document it more thoroughly once I have the keyboard part working.
The main intended use is to have a changeable password stored on an RFID chip. The KBR1 only outputs the UID, but that isnāt normally changeable. This allows you to have an arbitrary length of password, with a mix of characters and instead of typing it you scan your RFID card and it pretends to be a USB keyboard and ātypesā the password for you.
This allows people with more restrictive password policies to use an RFID chip for their password.
So, I now have a working keyboard wedge, but I want to do some more testing, and increase the number of card types it can use.
At the moment only MiFare 1Kb cards are supported.
If a card is presented to the reader it looks for the string DNGR and then writes from there until the first null byte out as a USB keyboard, it then sends a return keystroke.
Electronically you need an adafruit trinket m0 and an RC522 RFID card reader with an SPI interface. Seven connections need to be made, and while female to female Dupont wires will work you do need to solder the headers onto the Trinket M0.
The connections from the RC522 to the Trinket are:
RC522 - Trinket M0
SDA - 0
SCK - 3
MOSI - 4
MISO - 2
IRQ - No Connection
GND - Gnd
RST - 1
3.3V - 3V
You will also need a micro USB to whatever format your host USB port is cable.
I will write up a more complete document with pictures and upload it with the Arduino sketch once I have added a few more card types.
I will also see if I can put together a starter guide on how to upload an Arduino sketch to the trinket.
It has struck me that I am handcrafting the tag with the password on it. Do I need to add a mechanism to write a password to the tag?
Triggering that is going to be harder as I donāt believe we have any spare I/O ports on the Trinket M0. (If someone was to create a custom board we could free up some of the I/O ports used internally and add a āwrite modeā button.)
There is no tag management. The KBR1 Reads any tag and outputs the UID so you can use the UID as all or part of your password.
This reads the tag data looking for DNGR(pa$$w0rd)\NULL where \NULL is a zero value byte and (pa$$w0rd) is any password string and it outputs the password string.
So multiple people can use the same wedge to login but different passwords.
This version doesnāt care about where on the chip the password is. It is looking for the header DNGR and then taking the next bit as a password. This could be interesting if someone put DNGR on their chip elsewhere, so perhaps I should make it something less likely. ZPKW perhapsā¦
If the header isnāt found on the chip anywhere I suppose it could look for a blank space and generate a random password to put in there. That doesnāt allow you to change the password at all though.
That sounds cool
Any way to tweak it to read the UID and generate a password from it?
Iām thinking about this for my work computer, I have to change the pw every 5 weeks (with a bunch of restrictions/limitations) ā¦
If we can do UID to password conversion, I can enter an NFC UID and not worry about how the chip is programmed ā¦
Password generation based on a UID would probably generate the same UID (I mean password) every time.
The Trinket can also act as a USB drive, I wonder if I can have it check for a file and if that is created then it programs the chip with that password. You could then run something like pwgen and generate a password and it would program the next chip with that new password. That would allow you to change your password and then program the password into the chip.
I was more along the line of āI read UID x so I type password yā
When you want to change the login password, go in the code, change it and re-upload to the wedge ā¦