通用射频按键(五)
0赞
Step 4The Software - Entering data into our card
The software was next. Using the Arduino IDE, I implemented a simple menu system that allowed me to enter the relevant facility and CardID data directly from the keypad. I also provided a way of displaying the data using the LEDs that I mounted on the board.
One problem I came across, was when I was calculating the card data (parity and checksum) on the fly - To be read successfully, the card has to output data in real time (most readers need a number of sequential valid reads), and adding subroutine and calculation delays caused the card to output invalid data as far as the reader was concerned. I worked around this problem by populating an array of bits that gets sent when the card is in transmit more. That way, the calculations are done only once.
When the card is powered up, it waits for the 'mode' button to be pressed. The current mode number is displayed using a set of 4 LEDs. Each press on the 'mode' button increments the current mode. Once the correct mode is displayed, then the 'enter' key starts that function executing.
MODE 1 - Enter low power (sleep) mode
The card enters a low power mode, waiting for the reset button to be pressed to re-awaken it
MODE 2 - Enter a Hex Facility ID
The card waits for 2 digits to be entered signifying the facility code for this system (In this case, it is 2C) - The software defaults to 2C - so this does not need to be entered.
MODE 3 - Decimal Card ID
The card waits for 8 digits to be entered signifying the CardID for the card to be spoofed (In this case, it is 07820706) - This is the long number printed on the back of the card, not the 119,21922 number.
MODE 4 - Dump the facility and Card ID
The Facility and Card ID are Dumped as Hex numbers using the 4 Leds at the top of the card.
MODE 5 - Emulate a card
The card enters emulation mode - all LEDs are turned off. Emulation mode can only be exited by pressing the reset button.
The software relies on Mark Stanley's and Alexander Brevig's Keypad Library http://www.arduino.cc/playground/Code/Keypad
RFIDSpoofer_Instructables.pde14 KB
Step 5Etching the PCB

As per standard, I used toner transfer onto magazine paper to etch a board. If you want to see the details, have a look here.
The etched PCB had its edges cleaned up a bit using a file, and holes were drilled for the IC legs.
Attached are the PDF files that I used for the Toner Transfer.
RFIDSpoofer-Silk.pdf31 KB
RFIDSpoofer-PCB.pdf34 KB
