Introduction: RFID Tag Windows ( Vista , 7 , 8 , and 10 ) Login

Picture of RFID Tag Windows ( Vista , 7 , 8 , and 10 ) Login

The RFIDuino Login Project for Windows will allow you to use the RFIDuino system to log into Windows. You will need to load a special firmware onto your Geekduino/Arduino, and load the appropriate files onto your computer. Once setup, you can login to your computer from the main Windows Login screen by simply swiping your RFID tag across the RFIDuino antenna. This project will work with Windows Vista, 7, 8 and 10.

This project is an example project and should not be considered ready for production use where security is required. The user login/password are stored in an unencrypted plaintext file on the computer.

Step 1: Hardware List:

Picture of Hardware List:

For this project, you're going to need an Arduino/Geekduino, The RFIDuino, a compatible USB cable, and an RFID Tag of some sort. All of these things are available on the Trossen Robotics Store in a convenient kit, but you can use your own Arduino and RFID tags if you wish to. We highly recommend using the Geekduino due to the use of the manual reset toggle switch that doesn't exist on many other Arduino variants. The rest of this instructable also assumes you will be using the RFIDuino shield and the related libraries.

Step 2: Familiarize Yourself With the RFIDuino

Picture of Familiarize Yourself With the RFIDuino

RFID stands for Radio Frequency IDentification. The RFID system consists of two components, an RFID reader and an RFID tag. The reader interacts wirelessly with a tag to retrieve a unique identification number. The system can be used for many things from opening doors to tracking inventory.

The RFIDuino Shield for Arduino adds RFID capabilities to your Geekduino/Arduino. The shield fits on top of your arduino, making solid connections to the RFIDuino's circuitry. The built in buzzer and LEDs allow you to get stared right away by making visual and audio cues depending on the data that is on a given tag. The shield also allows you to add components to expand your system. You can use this to make your own door locks, inventory systems and more!

Step 3: Install the RFIDuino Shield

Picture of Install the RFIDuino Shield

To Install the RFIduino Shield, line the pins up with the bottom of the shield and the top of the Geekduino/Arduino. The male pins on the Shield should slide into the female pins on the Geekduino/Arduino. Once the Shield is installed, you can use the included 2-pin cable to connect the Shield to the Antenna.

You can program the Geekduino/Arduino with the shield plugged in. However, you cannot program the shield if you have an XBee module plugged in. You will have to remove the module or the shield to program the Arduino.

Step 4: Get Your RFID Tag ID

Picture of Get Your RFID Tag ID

In order to use our RFID tag, we're going to need to know its ID to program into the board. Connect your RFIDuino into the computer as shown above.

You're going to need the RobotGeek Tools and Libraries ZIP file for a sketch that will allow you to read your card data to the serial monitor. The RobotGeek Tools and Libraries Download offers a variety of sketches and libraries for working with RobotGeek Robot Kits. The libraries folder contains libraries that will add functionality to your Arduino, while the RobotGeek Sketches folder contains behavioral code for robots, as well as tools for testing. Install it by adding these two folders to your Arduino user folder.

Open the RFIDuino_helloworld sketch. This can be found under:

File>Examples>RFIDuino>RFIDuino_helloworld

You will need to make sure the code is adjusted for your RFIduino hardware.
v1.2 shields (2 pin antenna, 'REV 1.2' printed on the board) will need the following code

RFIDuino myRFIDuino(1.2); //initialize an RFIDuino object for hardware version 1.2

v1.1 shields (4-pin antenna, no version number printed on the board) will need the following code

RFIDuino myRFIDuino(1.1); //initialize an RFIDuino object for hardware version 1.1

Both lines of code are available in the RFIDuino_helloworld sketch, simply uncomment the one you don't need. If you are still unsure about what hardware you are using, see this page

Connect a micro USB cable from your computer to your Geekduino

Load RFIDuino_helloworld onto your board using the upload button in the Arduino IDE.

Once loaded, you can leave your board connected to your computer - you will need this connection to power the board and to communicate with the computer

Open the Serial Monitor.

The serial monitor should be set to its default settings ('No Line ending', 9600 baud)

Swipe a tag across the RFIDuino antenna. The green light will light up and your buzzer will make a noise.

The Serial Monitor will display 5 numbers separated by commas. These numbers make up the ID of your tag.

Copy down these numbers for future use. It can be handy to write the ID on a sticky note and attach it to the tag.

Tags in the EM4102 protocol have 64 bits that they return to the RFID reader. 24 of these bits are used for communication / protocol information (9 header bits, 10 parity bits and a stop bit.) This leaves 40 bits, or 5 byte for the tag's ID. The RFIDuino library returns the tag's ID as an array that contains these 5 bytes. All of the RobotGeek tutorials will use this convention for dealing with the Tag's ID number, displaying the tag id as 5 numbers in decimal format. However here are many ways that you can represent this number.

Step 5: Program Your Arduino for Windows Login

Picture of Program Your Arduino for Windows Login

Download the most recent release of the Windows RFIDuino Login Software. This download includes the necessary Arduino Firmware and Windows Software for this project. Unzip the file and you should see 3 folders and 2 files.

1. Connect your RFIDuino as shown in the diagram above

2. Open RFIDuino_windows_unlock onto your board. This sketch is in the .zip file you just downloaded under:

Firmware -> RFIDuino_windows_unlock -> RFIDuino_windows_unlock.ino

3. You will need to make sure the code is adjusted for your RFIduino hardware.

v1.2 shields (2 pin antenna, 'REV 1.2' printed on the board) will need the following code:

RFIDuino myRFIDuino(1.2); //initialize an RFIDuino object for hardware version 1.2

v1.1 shields (4-pin antenna, no version number printed on the board) will need the following code RFIDuino myRFIDuino(1.1); //initialize an RFIDuino object for hardware version 1.1

Both lines of code are available in the RFIDuino_helloworld sketch, simply uncomment the one you don't need. If you are still unsure about what hardware you are using, see this page.

4. Load RFIDuino_windows_unlock onto your board using the upload button in the Arduino IDE.

5. Once loaded, leave your board connected to your computer - you will need this connection to power the board and to communicate with the computer

Step 6: Setting the Reset Swtich

Picture of Setting the Reset Swtich

This is a good reason we suggested that you use the Geekduino. Once you've programmed your Geekduino, you will need to change one of the switches. Set the reset switch towards 'M_RST'. This will change the board to manual reset, so that windows does not reset the board while in use. Keep in mind that if you need to reprogram your Geekduino that you will need to change the switch back to 'AUTO'.

We do this to prevent continuous board resets. Not every board will have this issue, but we've included a few lines of debug code that make the board beep on startup so that you can catch it if it does. If your RFIDuino continuously or intermittently plays those beeps and you have an Arduino Uno, there's a solder point on the board that needs to be cut in order to achieve the same result, and re-soldered when you wish to reprogram your board.

Step 7: Installing the Windows Software

1. Using the Right Files

From the .zip file downloaded earlier, you'll need to make sure you are using the correct files for your Operating System. For 64 Bit Versions of the operating system you'll use the files in the 64 Bit folder. For 32 Bit Versions of the operating system you'll use the files in the 32 Bit folder.

You'll need to edit 2 of the .txt files.

2. RFIDCredentials.txt

First open RFIDCredentials.txt. By default the file should look like this

12 133 430 45 189|user1|password1
9 23 143 56 19|user2|password2

You'll need one line for each Key you want to use to unlock your computer. Each line contains the tag's ID, the windows username and the windows password, each separated by the | character. So for example, if the tag's ID is 70 0 44 22 242 and you want to unlock a windows account with the username robot1 and the password unlockRobo1 your file should look like

70 0 44 22 242|robot1|unlockRobo1

You can use multiple tags to unlock a single account, but one tag can only unlock one account.

This project also support domain based accounts. If you want to add a line with a tag ID of 67 176 120 0 45 and you want to unlock a windows account under the domain ROBONET with the username robot2 and the password unlockRobo2 your file should look like

70 0 44 22 242|robot1|unlockRobo1
67 176 120 0 45|ROBONET\robot2|unlockRobo2

As mentioned above, each tag can only unlock one account - so this means that there can be at most one line for each unique tag you are using in your system.

3. RFIDCredSettings.txt

Open RFIDCredSettings.txt. By default the file should look like this

COM=4
LEAD=ID:
TERM=\r\n

The LEAD and TERM lines represent the characters before and after each serial message from the RFIDuino. You do not need to edit these lines.

You will need edit the first line so that it matches the serial port for your Geekduino/Arduino. The serial port number for your Geekduino/Arduino is the same serial port that you use to program it, and the same serial port number we found in the Geekduino Getting Started Guide. For example, if your Geekduino/Arduino is connected to COM32, your file should look like:

COM=32
LEAD=ID:
TERM=\r\n
4. Moving Files

You you will need to copy the 3 files into your C:\Windows\System32 folder. The files are the two text files you updated and the .dll file

RFIDCredentials.txt
RFIDCredSettings.txt
RFIDCredentialProvider.dll

Just drag and drop these 3 files into the C:\Windows\System32 folder on your computer. You may need admin privileges to copy the files over. If this folder does not exist on your computer or if you have a custom Windows Installation, you may need to recompile the .dll file to work with your system.

5. Activating the Files

Now go back to your unzipped software folder and open Register.reg. You'll get a warning - you can click 'OK'. Now the .dll files will be activated.

If you need to remove the program, use the Unregister.reg file and then remove the 3 files from your C:\Windows\System32 folder.

Step 8: Using This Project

Picture of Using This Project

Now that all of the firmware and software is installed, you can use your project. Make sure your reader is plugged into your computer and reading cards (the LED will light up when a card is sensed). Now restart or lock your computer so that you are at the user screen. Note: You need to be at the user screen, the computer will not unlock if you are at an individual login screen. You should see a new user 'RFID'. Simply swipe your card and your computer will unlock!

Now that you have the login working, play around with the position of the RFID Antenna. If this is at your desk, in most cases, the RFID Tag can be read through it, so you can hide it under the desk, behind a drawer.

Step 9: Ideas for Expanding and Improving This Project

  • As noted before, your username and password are stored in an unencrypted text file. To secure this, you would need to integrate new code into the windows software.
  • You may be able to add some minimal amount of security using file permissions in windows by removing accounts from the security list SYSTEM.
  • The source code for the Windows Software is available here
  • By default, the firmware only changes LED color depending on the read status of the card - the buzzer has been disabled for everything but the debug startup code block. You can re-enable this by looking at the other RFIDuino examples and bringing in the buzzer code.

Comments

Seil (author)2016-10-24

Excelent!

Glenn24 (author)2016-06-29

It does not work on windows 10 for me, the dll creates an c++ runtime error in LogonUI.exe so my system wont even boot

We've tested it with Windows 10, and it should work just fine. If you would like some assistance, you can email kyle@trossenrobotics.com , and we will do whatever we can to help you out!

fred27 (author)2015-11-09

Why not store the password on the device and implement a USB HID keyboard to toe e password and unlock the PC? That's the approach I took. It's not perfect, but way more secure than a text file on the PC.
https://0xfred.wordpress.com/2015/01/14/nfc-login-version-1-0/

That's a cool idea! Theoretically you could even still use the windows credential manager so that you can keep everything over serial / not have to worry about the password prompt being open. Just instead of sending the RFID tag, you'd send the password byte-by-byte.

Of course HID keyboard is a lot more portable system-wise and doesn't need ANY software running on the computer, which is awesome. But our Geekduino and the Arduino Uno don't do HID (well the Uno doesn't without some coaxing at least). An Arduino Leonardo, a Teensy, or like you've shown in your awesome project, the LaunchPad are good contenders for that.

Our project was designed a little more for software devs - if someone wanted, they could build a whole application around this project that managed passwords in an encrypted manner. Then they could add/remove/manage users all from the PC side without having to reprogram the hardware.

You've started a debate in our office about how hard it would be to extract the password from an unencrypted hardware system (assuming you have access to the source code with a sample password). It might be a fun test :D

fred27 (author)fred272015-11-09

That should be "type the password"

About This Instructable

16,592views

143favorites

License:

Bio: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our ... More »
More by robotgeek_official:Voice Control Chip-E With Google HomeRock'em Sock'em Literal Robots3D Printed Automatic Small Fish Feeder (Single Servo and Arduino)
Add instructable to: