This is Gonna Get Me on a Watch List
by Cory on February 27, 2019 12:09 AM
I bought a different thing off amazon because the first kit was supposed to come in mid april. Fuck that noise. This other kit throws in a bunch of random sensors, an LCD, and a number pad so I guess it's worth it.
Apparently, the endorsed arduino library for RFID, at least specifically for the RC522 board, is from this guy named Miguel Balboa.
After a quick solder job and hooking up some of the pins as specified by the repo above, and I have power to the RFID board.
I copied some of the example code to read the RFID cards into a sketch and upload it and it works as expected. The RFID fob and card that came in the kit work so that's good.
After that I spent the rest of the night just reading about RFID cards and looking through the source code. Man, there's a lot to this. Readers can only read cards with the same frequency, and cards come in 12kHz (low freq), 13.68 MHz, and 868 MHz types. Apparently, the rfid reader is also known as a PCD ("Proximity Coupling Device") and the card is called a PICC (Proximity Integrated Circuit Card). The RC522 reads at 13.68 MHz.
Everything I google to learn more leads to a whole bunch of hacker blog sites about how to hack into doors and clone cards and stuff... (Hello FBI). It was really cool to read though. I learned that there's a whole range of rfid cards that the big card companies (HID, Leden, MIFARE, etc) put out. Some, like ones used in office buildings and banks and shit, are relatively secure so they can only be read by a reader that has as secret key loaded onto it (which is why my reader doesn't detect my office badge at all, I'm guessing). The most common, cheapest cards, have very weak encryption called "Crypto1" developed by MIFARE that is easily broken. These are the ones I got in the kit.
So it looks like I'm gonna need a bigger antenna to be able to read a card through a door. I was hoping to have a range of a couple feet, but I'm not sure if this is a good idea and it'll probably kill a battery quick. Also I'll need to add an additional level of encryption if I don't want to get broken into.
This Thought is part of RFID Door Unlocker
You know how nice cars like Mercedes or Tesla automatically unlock when you get close to them with the key fob? Let's do that but for my apartment front door.