260 likes | 447 Views
Overview of Radio Frequency Identification (RFID) ECE101 Fall 2013 presented by David Schwartz and Benjamin Mallard. *. *. *. *. * From Roy Want’s book “RFID Explained”. PDF available from CSUN library. A good basic reference. Reproduced for classrooml use by permission of the author.
E N D
Overview of Radio Frequency Identification(RFID)ECE101Fall 2013presented byDavid Schwartz and Benjamin Mallard * * * * * From Roy Want’s book “RFID Explained”. PDF available from CSUN library. A good basic reference. Reproduced for classrooml use by permission of the author
Outline • What are RFID tag and what are they used for? • What areas of Electrical Engineering are used in RFID technology • How do RFID tags work? • Basics of antennas and waves • Powering a device by stealing energy from a field • Digital communications – the basics • Programming a tag – MiFare Classic example • Computer memory , binary and the HEX system • Internal structure of a MiFare card • Experiments we will be doing using RFID and Arduino • Security Issues and Cocial Implications
What is an RFID Tag? • A small device that can read and write digital information over the air. • There are two basic classes of RFID Tags • Passive tags have no internal power source (battery, solar cell, etc.) • Active tags have their own power source • We will concentrate on passive tags. • Two basic components of a passive tag • RFID processing silicon chip with capacitor for energy storage, radio for communication and a simple computer processor for data manipulation. • Antenna for transmission and reception • Tags can be made to operate at 4 different frequencies (or bands) and each frequency supports different types of applications *
RFID Applications • Access control • RFID tags are widely used in identification badges , replacing earlier magnetic strip cards • Asset management • Wells Fargo and Bank of America made announcements that they would track every item in their data centers using passive RFID • Wal-Mart, RFID reduced Out-of-Stocks by 30 percent for products selling between 0.1 and 15 units a day • In 2005, the Wynn Casino Las Vegas, began placing individual RFID tags on high value chips • Payment by mobile phones • 7-Eleven has been working alongside MasterCard to promote a new touch-free payment system • Public transport • RFID tags can are used to pay for mass transit fares on bus, trains, or subways, or to collect tolls on highways • Animal ID tags • Tags are often injected or tagged when animals are young • Human ID tags • The American Food and Drug Association has given VeriChip a complete green light and every day more people are being injected with the tiny 12mm microchip now sporting the current, more benign sounding title “The VeriMed Patient Identification System • Virtual Business Cards • Tap it on a Near Field Communications enabled cell phone and your information goes directly to the phone’s contact list • You will have an opportunity to make one in the lab exercise
RFID Tag Types Reference: http://en.wikipedia.org/wiki/Radiofrequency_identification
Electrical Engineering areas needed for RFID • Antenna Design • Analog Circuits and Energy Storage • Wireless Communications • Digital Design • Real-time Programming • Systems Engineering
RFID Tags Communicate using Radio Frequencey (RF) Waves Period • Move through space at the speed of light (3 billion meters/second). • If you stand in one place the amplitude of the radio waves appear to oscillate at a fixed frequency, f, and period, T. • The relationship of f and T is simply given by f = 1/T • The units of T are seconds and the units of f are 1/seconds (Hz or Hertz) • At any instant an RF wave repeats in space with a wavelength l = c/f • A 1 MegaHz wave with have a period of 1 microSecond Amplitude time (microSeconds)
RFID Tags need to Transmit RF Waves • When a current flows in a wire coil a magnetic field is generated • When the current changes the field changes • This is how radio waves are generated • A radio wave has a time varying field • When a radio wave impinges on a coil the current in the coil changes • This is how we receive radio waves
The RFID Tags We Will Study Operate in the “Near Field” of a tag Reader *
Most Common Method Of RFID Tag Communication – Amplitude Shift Keying *
Reading Memory Content • 1 Bit can take on the values of either 0 or 1 • 1 Byte contains 8 Bits • By counting in binary you can show that each byte can contain values between 0 and 255 (1111 1111) • Each Byte can be represented by two nibbles with each nibble being 4 bits long. • Each Nibble can hold 16 distinct number from 0 to 15. • We represent the contents of each Nibble as a Hexidecimal (Hex) number as follows: 0 1 2 3 4 5 6 7 8 9 A B C D E F. Here A through F correspond to 10 through 15. • Some examples of Byte Contents • Decimal Hex Binary • 0 00 0000 0000 • 10 0A 0000 1010 • 20 14 0001 0100 • 255 FF 1111 1111 • The right digit here is in the 1’s column while the left digit is in the 16’s column
“Memory Map” of a MiFare Classic 1K Card ------------------------Sector 0------------------------- Block 0 8E 02 6F 66 85 08 04 00 62 63 64 65 66 67 68 69 ?.of?...bcdefghi Block 1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 3 00 00 00 00 00 00 FF 07 80 69 FF FFFFFFFFFF ......ÿ.?iÿÿÿÿÿÿ ------------------------Sector 1------------------------- Block 4 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 7 00 00 00 00 00 00 FF 07 80 69 FF FFFFFFFFFF ......ÿ.?iÿÿÿÿÿÿ ------------------------Sector 2------------------------- Block 8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ‘ ‘ ‘ ------------------------Sector 15------------------------- Block 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 61 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Block 63 00 00 00 00 00 00 FF 07 80 69 FF FFFFFFFFFF ......ÿ.?iÿÿÿÿÿÿ • 16 Sectors numbered from 0 to 15 • Each Sector contains 4 Blocks numbered from 0 to 3 • Each Block Contains 16 Bytes • Sector 0 Block 0 contains both manufacturer information and a “almost unique” card ID number and cannot be written to. • The third block of all Sectors contains access control information and must be written with care… a mistake can create a useless locked card! These third blocks are called Trailing Blocks. • Byte content can be interpreted as either numbers or letters using “ASCII” coding
Structure of a Trailing Block Byte Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Contents [ Key A ] [Access Bits] [ Key B ] Before you can do access a sector's memory, you first need to "authenticate" according to the security settings stored in the Sector Trailer. By default, any new card will generally be configured to allow full access to every block in the sector using Key A and a value of 0xFF 0xFF0xFF0xFF0xFF0xFF Here is an example of the contents of a trailing block configured to all complete read/write privileges for its sector FF FFFFFFFFFFFF 07 80 69 FF FFFFFFFFFF Note that most RFID software will show Key A as 00 00 00 00 00 00. This is supposed to be a security feature but it does not always seem to work! There are large number of possible settings for the access bits and with these you can make a MiFare card work in a great variety of fashions!
Experiment • In the lab portion of this lecture we will • Introduce programming of the Arduino computer by learning how to run a simple program on an Arduino • Guide you through building a simple RFID Tag based Secure Facility Access System using a Arduino board and and special RFID Reader/Writer plug in board. • Demonstrate the creation of a Cell Phone compatible Virtual Business Card on a RFID tag mounted in small a Key Fob
Security Issues of RFID • Security Problems in RFID • The card ID is transmitted “in the clear” when you first approach a card reader • Someone can just brush by you with a reader and get the ID of your card • The encryption on the cards was compromised in the mid 1990’s and hackers can read the entire contents of a card. • It is possible to purchase “Magic Cards” which have changeable card ID locations so complete cards can be replicated • Most of these problems can be mitigated by the use of PIN codes which are not located on the card itself but held on a database that the card reader can access
Social Implications of RFID • It is standard fare in Science Fiction to imagine a world in which “they know where you are and they know what you are doing • RFID chips can be implanted on people and already have been in cases of senile dementia • Credit card companies are already including RFID tags in some credit cards. The implications for potential financial access tracking are scary • US Passports now contain RFID Tags. The early versions released were poorly protected Bottom line: RFID has the potential to make major changes in our world… both good and bad.
Experiment 1 – Introduction to Arduino Programming • Following the guidance of your instructor connect the Arduino Uno board to a PC and Start the Arduino IDE (Integrated Development Environment) • Enter and he following program void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on the uno board pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second } • Save the program and following the guidance from your instructor download and test the program. The orange LED should blink at 1 Hz = 1 time per second • Modify the program so that there is has more complex blinking pattern (How about a message in Morse Code!) • Download and test your modified program. • Prepare and/or present your modified program as directed by your instructor
Experiment 2a - RFID Tag based Secure Facility • Open Arduino and enter the newAccessCard listed on the next chart. • Save the program as newAccessCard in a location you can retain access to. This will automatically place your program in folder of the same name. Note that if you have to change the program you must save it before closing the Arduino window! • Follow the guidance of your instructor to place the file RFID_utilities.ino in this same directory as your program. • Make sure that you have selected Uno on the Tools/Board pull-down. • Make sure that you have selected the correct Serial Port on the Tools/Serial Port pull-down. • Following the guidance of your instructor try to figure out what the program should do when it runs. • Open the Set Serial Monitor in the upper right and set the communications to 115200 baud / Newline • Download and run the program.
Experiment 2b - RFID Tag based Secure Facility • Open Arduino and enter the checkAccessCard listed on the next chart. • Save the program as checkAccessCard in a location you can retain access to. This will automatically place your program in folder of the same name. Note that if you have to change the program you must save it before closing the Arduino window! • Follow the guidance of your instructor to place the file RFID_utilities.ino in this same directory as your program. • Make sure that you have selected Uno on the Tools/Board pull-down. • Make sure that you have selected the correct Serial Port on the Tools/Serial Port pull-down. • Following the guidance of your instructor try to figure out what the program should do when it runs. • Open the Set Serial Monitor in the upper right and set the communications to 115200 baud / Newline • Download and run the program. • Study the operation and structure from 2a and 2b and try to identify the obvious security holes in this system! Try to think of possible ways these problems could be fixed.
Experiment3 – Demonstration of NFC RFIG Tag Programming • The instructor will demonstrate the creation of a Cell Phone compatible Virtual Business Card on a RFID tag mounted in small a Key Fob. • Each student will be provided with a blank Key Fob to take away. • These can either be programmed using either • The ACR122u NFC programmer in the CECS Common Lab OR • An NFC App on a newer Android Cell Phone