access control system at prldnoff/prltn/technical note... · frequency identifications (rfid) etc....

18
PRL-TN-2010-98 Access Control System at PRL by Girish D. Padia & Dinesh Mehta (CoWAA Group, PRL)

Upload: others

Post on 12-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

PRL-TN-2010-98

Access Control System at PRL

byGirish D. Padia & Dinesh Mehta(CoWAA Group, PRL)

Page 2: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

PRL-TN-2010-98

Access Control System at PRL

byGirish D. Padia & Dinesh Mehta(CoWAA Group, PRL)

Page 3: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming
Page 4: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Introduction 1

The RFID system at PRL 1

Details of the backend activities after submitting the input parameters 5

Conclusions 6

Appendix – A1 7

Appendix – A2 (Mifare Card) 8

Appendix – A3 (Turn style Gate) 8

Appendix – A4 9

Appendix – A5 10

Appendix – A6 11

Appendix – B 12

Access Control System at PRL

Page 5: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming
Page 6: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Introduction

Controlling entry of employees into a campus is a prime security requirement for an organization like ours. Earlier, in most of the private and government offices a simple register, filled in manually, would record entries and exits of the employees. Such a register also served as record of attendance for the employees. As the technology advanced, the attendance system also got upgraded. Nowadays, there are a number of technologies available in various organizations to automatically identify the staff members and maintain records of their attendance in the office. Some of the widely used technologies are bio-metrics, finger print, eye retina, Radio Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming employee's identity and timing of his/her entry and exit from the Laboratory premises. The RFID card readers are mounted on the top of the turn style gates installed at the entrance. An RFID card is issued to each employee of the Laboratory. It uniquely identifies him/her through the employee's payroll number. The RFID cards of PRL are compatible with all other DOS Units /ISRO Centers. The RFID cards issued to temporary employees, however, are not compatible with other DOS Units/ISRO Centers and work only at PRL.

The RFID system at PRL

The RFID System in PRL is provided by Access Computech Pvt Ltd, Ahmedabad. They have provided contact-less RFID Smart Card readers (Refer APPENDIX – A for details of the RFID cards, Card Readers, turn style gates etc). They have also supplied the software which stores data of all the employees who flash their RFID Card in front of a RFID Reader. This data is very useful to trace all the employees' attendance as well as their IN and OUT timings.

PRL has 8 RFID Readers right now. These readers can be configured to read IN and OUT timings of the employees. Out of these 8 RFID Readers, 4 readers (2 for IN and 2 for OUT) are installed at PRL Main Campus near parking area. These readers are attached with a turn style gate in the Main Campus. 2 readers (1 for IN and 1 for OUT) are hand-held type and are usually with CISF personnel at the security gate and 2 (1 for IN and 1 for OUT) are installed at Thaltej Campus. As soon as an employee flashes his RFID Card in front of a reader, the reader senses the data written into the card and releases the solenoid locking mechanism in the gate so that the tripod turn style gate can be manually opened by a gentle push. All these card readers are connected to the RFID Server through the Local Area Network (LAN) of the Laboratory. These readers have in-built memory which can store up to 500 IN/OUT transactions of Employees. The card readers also have a battery inside which provides back-up of 1 hour in case of the mains power failure. Following diagram provides location of RFID Machines.

Access Control System at PRL

Access Control System at PRL

The Access Computech Pvt Ltd has provided a software which is based on Visual Basic as Front-end and MySQL as database. This software continuously logs IN and OUT timings of the staff members in the RFID Readers and fetches the data into the RFID server. This data is stored in MySQL Database (Refer APPENDIX – B for the software screen).

Whenever any employee, either a temporary or permanent, joins PRL, an RFID card is prepared and issued to him. His

1 1basic details are fetched from CoWAA database ( Computerised Working in administrative Areas (CoWAA) is an integrated software package developed at ISRO to enable computerized working in Personnel and General Administration, Accounts, Purchase, Stores and Finance.) These data, along with soft copy of employee's passport size photo and signature is sent to Access Computech Pvt Ltd for printing on the card. Later on, these cards are configured in PRL to make them compatible with the RFID system established in PRL. This configuration is again divided into two types of flags:

1. Permanent: Permanent flag is set in the card only for a permanent employee so that his/her card will work with the other DOS Units /ISRO Centres.

2. Temporary: This flag is set in the card for a temporary employee of PRL. These cards will work only in PRL.

The software provided by the Access Computech Pvt Ltd to log the transaction of IN and OUT stores data into the following format in the MySQL database.

Database Name : prlattend

? Table Name : punchdata

? Table Fields :

Empcode (e.g. if employeecode is 7832 it will store it as ABPR007832)

Punchdate (Date of IN/OUT default formatyyyy-mm-dd)

Punchtime (Time of IN/OUT default format is HH:II where 'HH' stands for Hours and 'II' stands for minutes)

Inout (A flag which states “I” for In and “O” for Out)

Machineid (Machine id from which IN/OUT occurred)

Fig. 1: Locations of RFID Readers connected with the server.

RFID Serverlocated intoCoWAA Cell,

ComputerCenter, PRL.

4 RFIDMachines

installed at PRLmain Campus

2 RFID Machineslocated at

Thaltej

2 RFID handhelp type

Machine withCISF personnel.

Girish D. Padia & Dinesh Mehta(CoWAA Group, PRL)

([email protected] & [email protected])

Page 7: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

The vendor of the card readers has not supplied any utilities for making reports on the attendance of the employees. They were needed to be generated in-house and are the main subject matter of this note.

Various reports based on this data are often required by administration to know the presence or absence of employees in the laboratory for a period chosen, say from a particular date of interest to another. The reports normally required could be the details of IN (entry) and OUT (exit) timings of the staff members from the laboratory (in particular for those who are eligible for claiming overtime allowance).

For making these reports, the staff members can be selected on the basis of

• Payroll id individually or

• all the staff members of a particular designation or

• all staff members of a particular Division.

Sometimes, there arises a need to check whether a particular staff member is spending 8.5 hours (stipulated duration) in the laboratory. (He may, however, leave the premises, in between, for outdoor activities for a small duration). If a staff member happens to spend less than 8.5 hours in the laboratory on a particular day, the report generated, should automatically highlight such an entry to bring it to the notice of administration person concerned. For these reports also, staff members can be selected on the basis of

• Payroll id individually or

• all the staff members of a particular designation or

• all staff members of a particular Division.

After consolidating the inputs on requirements from administration, we set following goals for us to design an application utility for making various reports from a single screen on a client PC machine:

• It should be a web-based application for convenience to a wide cross-section of users.

• These reports should be accessible to an authorized user from any client machine on the PRL LAN.

• The application screen should be protected from un-authorized access and viewing of information.

• It should be based on a single user-friendly screen so that a person can operate it without an elaborate training.

• The report(s) should be properly formatted and should be in a form that can be readily printed on a printer attached to the machine (or on the LAN)

• It should be possible to send the reports to respected Area/Division Chairmen by clicking a “Send Mail” button on the screen

After doing a lot of groundwork and Internet search for various utility packages available, an elegant and user friendly screen was designed. As the data from card readers is available in MySQL database, we decided to use PHP (the Hypertext Preprocessor) scripting language to format the data obtained from the card readers. PHP is an open source programming language that is embedded in HTML and runs on a web server. PHP easily interacts with MySQL to store and retrieve information on the web. The PHP code runs on the server when a page is requested. PHP uses much of the same syntax of C or C++ but is much easier to use and provides access to variables and their values as submitted using HTML forms.

We decided to use Crystal Reports as a report designer tool. Crystal Reports is a popular report designing tool. It is a business intelligence application used to design and generate reports from a wide range of data sources. To combine PHP and Crystal Reports we used it as a COM object supported by any Microsoft Windows operating system. After R & D to combine PHP with Crystal Reports, we finally designed a reusable function named crViewerFunction.php. This PHP function can be used in any PHP application to use Crystal Reports with PHP.

The first part to start the design was “Authentication”. This allows only a few selected members chosen by the administration to operate the utility. We designed a screen which first authenticates the user using his/her username and password. We created separate table named “users” to store the user's detail into the database. This table contains column like:

a. Username

b. Password

c. Employee Code

d. Employee Name

The password is stored using the Hash Algorithm, md5, so that the database administrator also need not know the password of the user. A screen is designed to validate the user before logging into the RFID program. Here user must give username and password in order to login into the system. (See Fig. 2)

Access Control System at PRL

Page 8: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

As soon as the user types his username and password and clicks the Login button, this will verify first the information stored in the database. If the user is found authentic, he will be zoomed to the following screen to retrieve the details of RFID

Fig.2: Log-in screen

system. This screen (Fig.3) has multiple options to choose the output from the database. A format for output reports was also carefully chosen. A few snapshots of the screen are given below. (Fig.4 & Fig.5)

Fig.3: Basic screen divided into 3 parts.

Part -2

Part -3

Part -1

Access Control System at PRL

Page 9: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

As one can see above, the screen of a client PC machine is divided into three main parts.

Part 1) To provide Employee Code or select a Division or a Designation. At least, one of these three inputs must be selected.

Part 2) Date range for the data required. Selection of “From Date” and “To Date” is mandatory. One of the two radio buttons, “All In-out Details” or “First in time and Last out time” must be selected. Click on “Send

Mail” if you want to send Emails to all Area Chairmen. The resulting report will appear in Part 3 after clicking the Submit button.

Part 3) This is a result area where output will be shown. After clicking the submit button a resulting report is displayed as a PDF page in the empty area below:

A nice date picker calendar is also provided to select “From” and “To” dates easily as shown below.

Fig.4: you can see nice date-picker in from date selection

Datepicker isavailablefor “FromDate” and“To Date”.

Fig.5: A sample output after giving input and clicking the submit button.

Theformattedoutputbased onuser inputisdisplayedhere.

Access Control System at PRL

Page 10: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Thus, using a single screen, it gives outputs based on different criteria. Send Mail will work only if you have selected “All in-out details”. If Division is not selected from the list, the mail will be sent to all the Area Chairmen otherwise the mail will be sent to the selected Division Area Chairman. It is very easy to provide necessary inputs and click on SUBMIT button to retrieve necessary information.

Details of the backend activities after submitting the input parameters

a. We need first to collect the data in our required format. The data into the database is in column format. Data shown below is a sample from actual the database. (The flag “inout” indicates, “I” for entering into PRL and “O” for going out from PRL for an employee in the corresponding row of the table).

c. We created a database sub routine called procedure “inout_detail_all” in MySQL. After execution of this procedure, the data will be formatted as per the above output.

d. The procedure “inout_detail_all” has 5 parameters.

• Employee code

• Division Code

• Designation Code

• From Date

• To Date

b. This data should be changed into the row-wise format as shown below. We have separate data for employee code and employee name which comes from CoWAA. (Please see the color combination to understand the difference between the raw data and formatted data).

Access Control System at PRL

empcode empname punchdate name of day in time out time duration

ABPR007832 GIRISH PADIA 2010-01-20 Wednesday 09:21:00 12:43:00 03:22:00

ABPR007832 GIRISH PADIA 2010-01-21 Thursday 09:03:00 16:00:00 06:57:00

ABPR007832 GIRISH PADIA 2010-01-21 Thursday 16:17:00 18:01:00 01:44:00

ABPR007832 GIRISH PADIA 2010-01-22 Friday 08:57:00 18:05:00 09:08:00

ABPR007832 GIRISH PADIA 2010-01-25 Monday 08:42:00 17:28:00 08:46:00

ABPR007832 GIRISH PADIA 2010-01-27 Wednesday 08:58:00 17:57:00 08:59:00

ABPR007832 GIRISH PADIA 2010-01-28 Thursday 09:02:00 17:54:00 08:52:00

ABPR007832 GIRISH PADIA 2010-01-29 Friday 09:03:00 18:01:00 08:58:00

Table 2: Formated data of RFID

empcode punchdate punchtime inout machineid

ABPR007832 2010-01-20 09:21 I 9

ABPR007832 2010-01-20 12:43 O 4

ABPR007832 2010-01-21 09:03 I 9

ABPR007832 2010-01-21 16:00 O 2

ABPR007832 2010-01-21 16:17 I 3

ABPR007832 2010-01-21 18:01 O 4

ABPR007832 2010-01-22 08:57 I 3

ABPR007832 2010-01-22 18:05 O 2

ABPR007832 2010-01-25 08:42 I 9

ABPR007832 2010-01-25 17:28 O 4

ABPR007832 2010-01-27 08:58 I 3

ABPR007832 2010-01-27 17:57 O 2

ABPR007832 2010-01-28 09:02 I 9

ABPR007832 2010-01-28 17:54 O 2

ABPR007832 2010-01-29 09:03 I 9

ABPR007832 2010-01-29 18:01 O 2

Table 1: Original data of RFID

Page 11: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Access Control System at PRL

User supplies Inoutsdata. This is done using

DHTML / Javascript /PHP

Crystal Report whichsends request to mysqldata base to give the

data based on user input

Crystal Report formatsthe data received from

mysql and creates aPDF file.

The PDF File isdisplayed in Web

browser usingPHP/Ajax technology.

Fig.6: Flow diagram for the utility

ConclusionsThe Access Control System at PRL Main Campus and

Thaltej Campus is, thus, working very satisfactorily. We plan to extend the system at two of our other field stations at Udaipur Solar Observatory, Udaipur and Infrared Observatory, Mt. Abu in a near future.

AcknowlwdgementsThe authors wish to thank Prof. J. N Goswami, Director,

PRL, and Shri. Y. M. Trivedi, Registrar, PRL, for their continuous encouragement and valuable guidance during the development and operation of the Access Control System in the Laboratory. Shri. D. V. Subhedar, CoWAA Group, helped in giving valuable suggestions for making this note presentable. Shri. Satay Sai Madhu of CoWAA Group was involved in installation of RFID units and their testing in the initial phases of the project. The staff members of the PRL Computer Centre provided Local area Network support at Main Campus and Thaltej campus of the Laboratory. Construction and Maintenance Division (CMD) provided logistic support to maintain the RFID Readers at the gates both the laboratory Campuses in Ahmedabad.

As soon as the parameters are submitted, a report is generated in the required form. This procedure is used for complete IN-OUT details of employees. This sub-routine resides into the database so it is much faster than any other interface and can be used multiple times with multiple applications.

e. Similarly, for “First in time and Last out time,” another procedure named in “inout_detail” is developed which uses same parameters as sub-routine “inout_detail_all” and generates a little different output than the same.

f. Up to this point, we have completed the formatting of the data into the database. Our PHP application now will call the Crystal Reports using COM Objects. The C r y s t a l Re p o r t s w i l l c a l l t h e p r o c e d u r e s “inout_detail_all” or “inout_detail” based on the inputs provided by the user. Crystal Reports will now format the data and will create a PDF file. Once the PDF file is created it is very easy to show it in the browser. We have created “crViewerFunction.php” to convert the data generated in the Crystal Reports into the Portable Document Format (PDF). A sample structural diagram of the flow of this application is like below:

g. This is sufficient for displaying data on the screen. Now what if we want to send this PDF file as an email? PHP has inbuilt support to send the mails. Our requirement to send the emails is little specific. We need to send the details of the employee to the area /division chairman under whom he/she is working. PRL has a structure where each employee is assigned a single Division. Each Division has a division head called Area Chairman. The details of employees' division and their Area Chairmen are easily available from the CoWAA. Also, we have seen that we can retrieve the IN-OUT details of all the employees after selecting a Division. Also, a PDF file using Crystal Reports can be created for the division. Our concern is now to send the Email to the area chairmen with a PDF file report attached to it. We created a reusable component to send Emails. The software will check whether “Send Mail” button is clicked. On meeting this condition, A loop will start to fetch division name, area chairmen and email address. The loop will create a PDF file using Crystal Reports for each division. PHP's mail function will serve the rest of the part to send this PDF file to the area chairmen. This loop will be terminated on completion of this job.

Page 12: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Access Control System at PRL

Appendix – A1

Contact-less smart card reader, SENTINEL-Prox MF, uses RFID technology with onboard TCP/IP communication channel. The contact less PVC smart cards (Mifare-based conforming to ISO 14443-A) compatible with these card readers have built in read/write memory of 1 Kbytes. A block schematic and the Technical brochure for the Sentinel-Prox MF card reader is reproduced below.

The Mifare card has a dimension of 85.7 x 54 mm with card thickness less than 0.9 mm. It has an embedded wire loop antenna adjacent to its periphery and a MF1ICS550 IC chip in it. A few salient features of the technology are given below.

MIFARE RF Interface

• Contact less transmission of data and supply energy (no battery needed)

• Operating distance: up to 100 mm

• Operating frequency: 13.56 MHz

• Data transfer: 106 kbps

• Data integrity: 16 bit CRC, parity, bit coding, bit counting

Typical transaction time < 100 ms

EEPROM

• 1 Kbyte, organized in 16 sectors with 4 blocks of 16 bytes each

• Data retention of 10 years

• Write endurance 100,000 cycles.

Security

• Mutual three pass authentication

• Unique serial number for each device

Page 13: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Appendix – A2 (Mifare Card)

Appendix – A3 (Turn style Gate)

MIFARE card

Energy

Data

MF1ICS50 chipembedded into a module4 turns wire coil

Salient Features:-* No slip clutch provides smooth, silent, two-way rotation* Optional Breakaway clutch assembly allows one-way turnstiles to be used as emergency exits.* can be used at entry and exit points.* Clock-wise or counter-clockwise rotation.* Constructed from steel tubing.* ASC turnstiles have welded polished end caps.* Standard highly polished chrome finish.* Stainless and power coat finishes available.* Low Maintenance.

Access Control System at PRL

Page 14: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Access Control System at PRL 9

Appendix – A4

Ho

w d

oe

s a

co

nta

ctle

ss s

yste

m w

ork

?

Read / W

rite D

evice

"Readers"

Po

wer

Data

Page 15: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Access Control System at PRL10

Appendix – A5

The latest in the field of Contactless Read only andContacless Smart Card, Mifare based Modern TimeManagement Solutions with unparalleled featuresfor any type of indoor or outdoor installations.

SENTINEL-Prox MF

The Time ManagementSolution of the Future

Innovative Solutions For Personalised Identification SystemsACCESS COMPUTECH PVT. LTD.

ISO 9001:2000

ccessJAS -ANZ

S2640303 IN

Page 16: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Access Control System at PRL 11

Appendix – A6

ccessThe Manufacturer reserves the right to alter/amend the specifications listed without any prior notice.

ACCESS COMPUTECH PVT. LTD.504/6, G.I.D.C. Estate, Makarpura, Vadodara, Gujarat, India, PIN-390 010.Tel. : +91-265-263 3307, 264 2978, 265 8952 Fax : +91-265-263 3268E-mail : [email protected] URL : http://www.accesscomputech.in

TheTime ManagementSolution of the Future

ISO 9001:2000

An ISO 9001:2000ORGANISATION

Salient Features : Technical Specifications :

• Sentinel-prox MF is a compact, light weight and rugged unit suitable for any working environment.

• A Highly sensitive contactless reader to ensure cent percent reading.

• Built in TCP/IP protocol to connect directly to the Network for on-line data transfer, also built in RS 232 or RS485 (01 Nos.) ports.

• Option to have true On-Line control, thus controlling the entry and exit in on line mode from the PC / Central Server.

• Backlit 16x2 characters LCD display for 5 to 10 digit ca rd no., date, time & status of memory consumed.

• Provision for function cards, prefix and suffix numbers

• Built in power line monitoring.

• Builts in operational battery backup

• FEATURES of Mifare programmable Smart Card Reader.

• ISO 14443A programmable Smart Card Technology.

• Serial Number, Full Range of Full Read / Write

• Security Challenge / Response Capable

• Available programmable access to all sectors.

• Input / Output ports for linking alarms, sensors etc.

JAS -ANZ

S2640303 IN

SENTINEL-Prox MF

• CPU: RISC based high speed Micro Controller

• Memory Capacity : 128 KB for the transaction data, approximately 4000 punches.

• It can also store 1500 employee details in local data base.

• 16 x 2 characters backlit LCD display for card no., date, time and status of memory consumed.

• Communication : RS 232 / RS 485 / Modem / 10BaseT (TCP/IP) all built in

• Operational Battery Backup: 4-6 hours.

• Built in 5 years lithium battery backup for RAM & Real Time Clock & Calendar.

• Badge Reading : Mifare Contactless Smart Cards (ISO 14443A) or RFID Proximity.

• Built in power monitiring with watch dog timer.

• Read Range : 0-2.5 in (0-6 cm)

• Size : 140mm Thickness x 145mm Height x 206mm Width.

• Material : Black / Gray Engineering Plastic0 0• Operating Temp : 10 C to 55 C

• Humidity : 0-95% non condensing

• Input Voltage : 190-260V AC with Proper earthing.

• Built in Potential free change over contact for controlling / signalling external devices.

• Reading Technology : Mifare® contactless proximity 13.56 MHz or 125 KHz for read only RFID.

Page 17: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming

Appendix – B

Fig.7: RFID Software provided by vendor to continuously retrieve IN-OUT data from the RFID readers

12 Access Control System at PRL

Page 18: Access Control System at PRLdnoff/PRLTN/Technical Note... · Frequency Identifications (RFID) etc. The Access Control System at Physical Research Laboratory uses RFID cards for confirming