Skip to content

Added additional features including local password encryption #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Software Source/.vs
Software Source/x64
x64
Software Source/RFIDCredentialProvider/Debug
176 changes: 72 additions & 104 deletions Firmware/RFIDuino_windows_unlock/RFIDuino_windows_unlock.ino
Original file line number Diff line number Diff line change
@@ -1,104 +1,72 @@
/***************************************************************************
* RFIDuino Windows Unlock
*
* This demo uses the RFIDuino sheild, a Geekduino (or other Arduino Board)
* to send an RFID to a Windows Vista/7/8/10 PC. See the link below for
* windows software and instructions.
*
* Links
* RFIDUino Windows Login Instructions
* http://learn.robotgeek.com/getting-started/41-rfiduino/181-rfiduino-windows-login.html
* RFIDUino Getting Started Guide
* http://learn.robotgeek.com/getting-started/41-rfiduino/142-rfiduino-getting-started-guide.html
* RFIDUino Library Documentation
* http://learn.robotgeek.com/41-rfiduino/144-rfiduino-library-documentation.html
* RFIDUino Shield Product Page
* http://www.robotgeek.com/rfiduino
*
* Notes
* The RFIDuino library is compatible with both versions of the RFIDuino shield
* (1.1 and 1.2), but the user must initialize the library correctly. See
* 'HARDWARE VERSION' instructions near the beginning of the code.
*
* The RFIDuino Shield is designed to be used with 125khz EM4100 family tags.
* This includes any of the EM4102 tags sold by Trossen Robotics/ RobotGeek.
* The RFIDuino shield may not work with tags outside the EM4100 family
*
* User Output pins
* myRFIDuino.led1 - Red LED
* myRFIDuino.led2 - Green LED
* myRFIDuino.buzzer - Buzzer
*
***************************************************************************/

#include <RFIDuino.h> //include the RFIDuino Library

#define SERIAL_PORT Serial //Serial port definition for Geekduino, Arduino Uno, and most Arduino Boards
//#define SERIAL_PORT Serial1 //Serial port defintion for Arduino Leonardo and other ATmega32u4 based boards

/***************
* HARDWARE VERSION - MAKE SURE YOU HAVE SET THE CORRECT HARDWARE VERSION BELOW
* Version 1.1 has a 4-pin antenna port and no version marking
* Version 1.2 has a 2-pin antenna port and is marked 'Rev 1.2'
*****************/
//RFIDuino myRFIDuino(1.1); //initialize an RFIDuino object for hardware version 1.1
RFIDuino myRFIDuino(1.2); //initialize an RFIDuino object for hardware version 1.2

byte tagData[5]; //Holds the ID numbers from the tag

int melody[] = {
666, 1444, 666}; //holds notes to be played on tone
int noteDurations[] = {
4, 8, 8 }; //holds duration of notes: 4 = quarter note, 8 = eighth note, etc.

void setup()
{
//begin serial communicatons at 9600 baud and print a startup message
SERIAL_PORT.begin(9600);
SERIAL_PORT.print(">");

//Comment out to turn off Debug Mode Buzzer START
for (int thisNote = 0; thisNote < 3; thisNote++)
{
int noteDuration = 1000/noteDurations[thisNote];
tone(myRFIDuino.buzzer, melody[thisNote],noteDuration);
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
noTone(myRFIDuino.buzzer);
}
//Comment out to turn off Debug Mode Buzzer END

//The RFIDUINO hardware pins and user outputs(Buzzer / LEDS) are all initialized via pinMode() in the library initialization, so you don not need to to that manually
}

void loop()
{
//scan for a tag - if a tag is sucesfully scanned, return a 'true' and proceed
if(myRFIDuino.scanForTag(tagData) == true)
{
digitalWrite(myRFIDuino.led2,HIGH); //turn green LED on

SERIAL_PORT.print("ID:"); //print a header to the Serial port.
//loop through the byte array
for(int n=0;n<5;n++)
{
SERIAL_PORT.print(tagData[n],DEC); //print the byte in Decimal format
if(n<4)//only print the comma on the first 4 nunbers
{
SERIAL_PORT.print(" ");
}
}
SERIAL_PORT.print("\r\n>");//return character for next line and the prompt characer '>' for the next line

delay(500); //wait for .5 second
digitalWrite(myRFIDuino.led2,LOW); //turn the green LED off


}

}// end loop()





/***************************************************************************
* RFIDuino Windows Unlock
*
* This demo uses the RFIDuino sheild, a Geekduino (or other Arduino Board)
* to send an RFID to a Windows Vista/7/8/10 PC. See the link below for
* windows software and instructions.
*
* Typical pin layout used:
* -----------------------------------------------------------------------------------------
* MFRC522 Arduino Arduino Arduino Arduino Arduino
* Reader/PCD Uno Mega Nano v3 Leonardo/Micro Pro Micro
* Signal Pin Pin Pin Pin Pin Pin
* -----------------------------------------------------------------------------------------
* RST/Reset RST 9 5 D9 RESET/ICSP-5 RST
* SPI SS SDA(SS) 10 53 D10 10 10
* SPI MOSI MOSI 11 / ICSP-4 51 D11 ICSP-4 16
* SPI MISO MISO 12 / ICSP-1 50 D12 ICSP-1 14
* SPI SCK SCK 13 / ICSP-3 52 D13 ICSP-3 15
*/

#include <SPI.h>
#include <MFRC522.h>

#define RST_PIN 9 // Configurable, see typical pin layout above
#define SS_PIN 10 // Configurable, see typical pin layout above
#define READ_LED 2 // LED used to display card read

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

void setup()
{
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522
mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD - MFRC522 Card Reader details
//begin serial communicatons at 9600 baud and print a startup message
Serial.begin(9600);
Serial.print(">");
pinMode(READ_LED, OUTPUT);
}

void loop()
{
delay(10);
// Look for new cards
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
// Select one of the cards
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}

Serial.print("ID:"); //print a header to the Serial port.
for (byte i = 0; i < mfrc522.uid.size; i++)
{
Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
Serial.print(mfrc522.uid.uidByte[i], HEX);

}
Serial.print("\r\n>");//return character for next line
digitalWrite(READ_LED, HIGH);
delay(1000);
digitalWrite(READ_LED, LOW);

}




Binary file removed Software Source/Old Documentation/Windows Login.jpg
Binary file not shown.
Binary file removed Software Source/Old Documentation/Windows Login.pdf
Binary file not shown.
12 changes: 7 additions & 5 deletions Software Source/RFIDCredentialProvider.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RFIDCredentialProvider", "RFIDCredentialProvider\RFIDCredentialProvider.vcproj", "{7348AEE0-1F4A-4436-B782-6ABB694911AE}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RFIDCredentialProvider", "RFIDCredentialProvider\RFIDCredentialProvider.vcxproj", "{7348AEE0-1F4A-4436-B782-6ABB694911AE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -13,8 +15,8 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Debug|Win32.ActiveCfg = Debug|Win32
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Debug|Win32.Build.0 = Debug|Win32
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Debug|x64.ActiveCfg = Debug|Win32
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Debug|x64.Build.0 = Debug|Win32
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Debug|x64.ActiveCfg = Debug|x64
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Debug|x64.Build.0 = Debug|x64
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Release|Win32.ActiveCfg = Release|Win32
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Release|Win32.Build.0 = Release|Win32
{7348AEE0-1F4A-4436-B782-6ABB694911AE}.Release|x64.ActiveCfg = Release|x64
Expand Down
3 changes: 3 additions & 0 deletions Software Source/RFIDCredentialProvider/RFIDCredSettings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
COM=4
LEAD=ID:
TERM=\r\n
5 changes: 4 additions & 1 deletion Software Source/RFIDCredentialProvider/RFIDCredential.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#include "guid.h"
#include "RFIDListener.h"

#define DEBUG 0


// CRFIDCredential ////////////////////////////////////////////////////////

CRFIDCredential::CRFIDCredential():
Expand Down Expand Up @@ -379,7 +382,7 @@ HRESULT CRFIDCredential::GetSerialization(
else
bResult = GetComputerNameW(wsz, &cch); // get computer name for local login

if (0) // change (0) to (1) for debug purposes
if (DEBUG) // change (0) to (1) for debug purposes
{
CString msg;
msg.Format(_T("User = %s\r\nDomain = %s\r\nPassword = %s"), sUserName, wsz, _rgFieldStrings[SFI_PASSWORD]);
Expand Down

This file was deleted.

Loading