EMBEDDED TWEAKS

Embedded Electronics Tutorials, Coding and lot more

Implementing hardware level security to your softwares

Generally we set log in screens in our applications through which we can enter the details and get access. But some times we fear that if the password and id are lost or stolen then unauthorized user will access the system. Hence here i am suggesting a new idea to improve security. I am adding the hardware level security. I am using an RFID module for that purpose.

About RFID technology :

Radio-frequency identification (RFID) is a technology to record the presence of an object using radio signals. It is used for inventory control or timing sporting events. RFID is not a replacement for the barcoding, but a complement for distant reading of codes. The technology is used for automatically identifying a person, a package or an item. To do this, it relies on RFID tags. These are small transponders (combined radio receiver and transmitter) that will transmit identity information over a short distance, when asked. The other piece to make use of RFID tags is an RFID tag reader.

An RFID tag is an object that can be applied to or incorporated into a product, animal, or person for the purpose of identification and tracking using radio waves. Some tags can be read from several meters away and beyond the line of sight of the reader. Most tags carry a plain text inscription and a barcode as complements for direct reading and for cases of any failure of radio frequency electronics.

Most RFID tags contain at least two parts. One is an integrated circuit for storing and processing information, modulating and de-modulating a radio-frequency (RF) signal, and other specialized functions. The second is an antenna for receiving and transmitting the signal.

There are generally two types of RFID tags: active RFID tags, which contain a battery, and passive RFID tags, which have no battery.

Hardware :

There are so many RFID reader modules available in the market. You can get them from most of local Embedded Electronics manufacturers or even now from Amazon, Ebay also.

 

NFC-TAG-Mifare-Card-15

If you are having desktop PC with DB9 port you can buy RS232 version and if you have laptops with USB ports only then you should buy the USB version RFID reader. You can also buy USB to serial converter if USB RFID reader is not available in your area.

Every RFID card working on 125 KHz you can use. Every card transmits  a unique 12 digit code when the card is placed near harware. This code is not possible to have in other cards. So when you put the card, you get unique code on your PC’s serial port. You just  need to decode that code and then check condtions in your VB, JAVA or any other softwares.

Here i am showing the simulation of the same, But for simulation and testing purpose i am using virtual Com port method, For demo i decided a 10 digit demo code of an RFID card, which i will send from Real Term software. Which will come physically when i connect actual hardware. But here for simulation i am going virtual way. i written the VB code to receive code serially from COM1 and so i am checking if the same code is received or not. If i enter different code then the software will not give me access to it. I have paired COM1 and COM2 using VSPE. If you dont know virtual COM port method then see this first

Here i am presenting a demo application i created in VB6.

RFID

The code for the main form of RFID decoding is also shown below.

Private Sub Form_Load()
‘ Fire Rx Event Every single Bytes
MSComm1.RThreshold = 12

‘ When Inputting Data, Input 1 Byte at a time
MSComm1.InputLen = 12

‘ 9600 Baud, No Parity, 8 Data Bits, 1 Stop Bit
MSComm1.Settings = “9600,N,8,1”
‘ Disable DTR
MSComm1.DTREnable = False

‘ Open COM1
MSComm1.CommPort = 1
MSComm1.PortOpen = True
Image1.Visible = True

End Sub
Private Sub Form_Unload(Cancel As Integer)
MSComm1.PortOpen = False
End Sub

Private Sub MSComm1_OnComm()
Dim data As String
If MSComm1.CommEvent = comEvReceive Then
data = MSComm1.Input
Text1.Text = data
If Text1.Text = “0004278519” Then
MsgBox “Entry granted”
Me.Hide
Form1.Show

Else
MSComm1.PortOpen = False
MsgBox “Unauthorized User”
Me.Hide
End
End If
End If

End Sub

Private Sub Timer1_Timer()
If Image1.Visible = True Then
Image1.Visible = False
Image2.Visible = True
ElseIf Image2.Visible = True Then
Image2.Visible = False
Image3.Visible = True
ElseIf Image3.Visible = True Then
Image3.Visible = False
Image4.Visible = True
ElseIf Image4.Visible = True Then
Image4.Visible = False
Image1.Visible = True
End If

End Sub

 

Then i am connecting on COM2 on real term software to test it.

The whole video can be shown here.

Sharing is caring

1 Comment

  1. Normally I don’t learn post on blogs, but I would like to say
    that this write-up very pressured me to check out and do so!
    Your writing style has been surprised me. Thanks, quite
    nice post.

Leave a Reply

Your email address will not be published.

*

© 2018 EMBEDDED TWEAKS

Theme by Anders NorenUp ↑

Follow Me

Get the latest posts right delivered in you mailbox

%d bloggers like this: