Smart Card Reader Integration with Attendance Systems

How do you integrate a smart card reader with an attendance system? Each tap must become one clean attendance record: the reader gives the card's UID, software looks up the employee or student it belongs to, and writes a time-stamped event to a log that later feeds reports and payroll. The reader can deliver the UID in two ways: as typed text in keyboard mode (ACS ACR1552U, ACR1581U), or to a program through PC/SC (every ACS PC/SC reader). For more than a single desk, PC/SC is usually the better base, because the software then knows which reader was used and can debounce double taps, buffer events while offline and confirm each tap with a beep.

This is the technical side for developers and IT teams: reader and card choice, the tap-to-log data flow, duplicate taps, offline buffering, clock synchronisation, several readers at gates, export to payroll or HRMS, and privacy basics. If you are looking for a complete attendance system rather than building one, see BSD's school attendance and crowd control solution and campus management system. BSD Infotech is an independent ACS supplier and integrator, not the manufacturer.

A desktop NFC reader is only the first link. A working card-based attendance setup has five parts, and most problems in the field come from the joins between them rather than from the reader.

[Card] -> [ACS reader] -> [Capture client on PC] -> [Local event store] -> [Attendance server / database] -> [Payroll or HRMS export]
           USB            keyboard mode or PC/SC    survives network loss    people, shifts, rules, reports    period files or API
  • Reader: a 13.56 MHz contactless reader at the desk, entrance or classroom door. ACS's NFC readers do not read 125 kHz proximity badges, so check your existing cards first.
  • Capture client: the program (or browser page, in keyboard mode) that receives the card number.
  • Local event store: a small database or file on the PC where each tap is written first.
  • Attendance server: holds the people, the card mapping, shifts and rules, and turns raw taps into attendance.
  • Export: summaries for payroll, HRMS or a student information system.

This page covers the capture side and the interfaces. Shift rules, leave, reports, parent notifications and turnstiles belong to the attendance application; BSD's solution pages cover those.

For attendance the real decision is not the model but the interface: does the reader type the card number into a screen, or does a program read it?

QuestionKeyboard mode (ACR1552U, ACR1581U)PC/SC (any ACS PC/SC reader)
Software on the PCNone: a web page or attendance screen with a focused card fieldA capture client that talks to the reader
Which reader was usedUnknown: every keyboard-mode reader types into the same windowKnown: each reader has its own PC/SC name
Double tapsThe receiving page must filter themOne read per card presence, plus a time rule in the client
Network downA web page usually loses the tapThe client buffers locally and sends later
Feedback at the readerThe reader's own beep only, no "refused" signalProgram-controlled beep and LED for accepted and refused (see LED and buzzer control)
Card data beyond the UIDNoYes, with the card's keys
Best fitOne desk, an existing web or cloud system with a card field, enrolment of new cardsGates, several readers, offline-tolerant sites, anything that must be audited

Which ACS readers

  • ACR1552U: PC/SC by default; ACS lists keyboard emulation for it through the ACR15XX Keyboard Configuration Tool (ACS utility tools page, checked 1 Dec 2026). The ACR1552U reference manual, as summarised in our keyboard guide, also documents a keyboard plus CCID host setting, so a reader can type the UID and still be visible to PC/SC software.
  • ACR1581U: listed by ACS for the same keyboard tool; also has a contact slot for chip cards.
  • ACR1252U: PC/SC only, no keyboard mode. A good PC/SC attendance reader; needs a capture client.
  • ACR122U: PC/SC only, and marked end of life by ACS, so choose a current model for new sites.

Keyboard-mode setup, the number formats and the switch back to PC/SC mode are on our keyboard emulation guide. Keyboard mode has not yet been tested by BSD on its own readers; that page says so too.

Most attendance systems identify a person by the card's UID. That is acceptable when the risk is low and a person is watching, but understand what it means: a UID is readable by any reader, is not a secret, and a keyboard-mode field cannot tell a tap from typed digits. "Buddy punching" with a copied number is possible.

Card and methodWhat identifies the personSuits
MIFARE Classic 1K, UID onlyThe 4- or 7-byte UID, looked up in the attendance databaseStaff or students at a supervised desk or gate; low-value records
NTAG / MIFARE Ultralight, UID onlyThe 7-byte UIDLow-cost cards, stickers or key fobs where only identification is needed
MIFARE Classic, ID in a protected sectorAn employee or roll number written in a sector under your own keys, read after authenticationWhen the number must come from the card, not a copyable UID; see reading MIFARE Classic in C#
MIFARE DESFire, ID in an application fileA file read after AES authenticationMulti-use campus cards (attendance plus cashless or access), higher assurance; see reading DESFire cards

If you read secured data, the keys must not sit in the capture client's code or config; see where keys should be stored and the MIFARE key management guide. Also check that your cards use a fixed UID: some DESFire and MIFARE Plus cards can be set to send a random UID on every tap, which breaks UID-based attendance.

  1. Tap and read. Read the UID once per card presence. In PC/SC this is the card-arrived event, as in our C# UID guide; in keyboard mode it is the typed number followed by Enter.
  2. Normalise. Convert the number to the one format your database stores (hex or decimal, byte order, leading zeros). Mismatches here are the most common reason a valid card is "unknown"; see hex, decimal and byte order.
  3. Look up. Card number to employee code or student roll number. Keep the mapping in the attendance database with a status (active, lost, replaced) and its history, so old records still resolve after a card is reissued.
  4. Apply the duplicate rule (next section), then write the event to the local store.
  5. Feedback. A short beep or green LED for "recorded", a different signal for "unknown card", and the person's name on screen if there is one.
  6. Sync. Send unsent events to the attendance server.

What to store for each tap

FieldWhy
Event ID (for example a GUID made at the PC)Lets the server ignore an event that is sent twice after a retry
Device / reader IDWhich gate, door or desk; and in or out where readers are per direction
Card number (normalised)Re-resolve later if the mapping was missing at tap time
Person ID (empty if unknown)The key that payroll and reports use
Time in UTC, plus the local offsetUnambiguous across sites and daylight-saving changes
Source (tap, manual correction)Corrections must be visible as corrections
Sync statusWhat still has to be sent

Log unknown cards instead of discarding them: they reveal enrolment gaps and attempts with foreign cards. Store raw taps, and calculate "first in, last out", hours and late marks on the server; do not decide attendance at the reader.

People tap twice, hold a card on the reader, or tap again because they did not hear the beep. Handle this at two levels.

  • Reader level (PC/SC): read a card once when it arrives and ignore it until it leaves the field. A card left on the reader then produces one event, not one per second. Our .NET reader application already works this way.
  • Rule level: ignore the same card on the same reader within a set window, for example 30 to 120 seconds. Make the window a setting: a canteen counter wants it short, a gate long enough to absorb a hesitant second tap, a classroom door perhaps a whole period.
  • Keyboard mode: there is no card-left event, so the receiving page or application must apply the time rule itself, by card number and time.

Keep the suppressed taps in a debug log, not in the attendance table, so you can still see them when someone says "I did tap in".

Networks fail, servers restart, Wi-Fi at a gate drops. An attendance tap must never depend on the server being reachable at that moment.

  1. Write locally first. The capture client writes each event to a local store (a small embedded database or an append-only file) before trying to send it.
  2. Send in the background, oldest first, and mark each event as sent only when the server confirms it.
  3. Retry safely. Because each event has its own ID, the server can accept a resend without creating a duplicate.
  4. Keep the mapping cached. A local copy of the card-to-person list lets the client show names and flag unknown cards while offline; refresh it when the connection returns.
  5. Show the backlog. A visible "12 taps waiting to send" warns the administrator before payroll day.

Keyboard mode into a web page cannot do this on its own: if the page cannot reach its server, the tap is usually lost. That is a strong reason to use a PC/SC capture client wherever the network is not reliable.

Attendance is only as good as the clock that stamps it. A PC that drifts five minutes turns on-time arrivals into late marks, and a user who can change the PC's clock can change attendance.

  • Synchronise every capture PC. On Windows, the Windows Time service does this, from a domain controller in a domain or from an internet time server otherwise. w32tm /query /status shows the current source and last successful sync.
  • Stamp in UTC and store the local offset with it; convert to local time only for display and reports.
  • Compare with the server. When events are synced, the server can compare the PC's clock with its own and flag a PC that is out by more than a set tolerance.
  • Restrict clock changes. Capture PCs should run under accounts that cannot change the system time.
  • One PC, several readers. With PC/SC, each reader appears under its own name, and identical models are told apart by the number at the end of the name. The capture client should store a fixed mapping "reader name to gate and direction", as explained in matching ACS reader names. With keyboard mode, every reader types into the same window and you cannot tell them apart.
  • In and out. The clearest design is one reader per direction. A single reader with "first tap in, next tap out" works for desks but goes wrong as soon as someone misses a tap.
  • One PC per gate. For distant gates, run a capture client on a PC (or small Windows device) at each gate, each syncing to the server, rather than running long USB cables. USB 2.0 cables are specified for about 5 metres.
  • Throughput. At a busy gate, the time per person is the tap, the read and the feedback. Reading only the UID is fastest; authenticated reads add time, so test with a real queue before deciding.
  • Desktop readers are for indoor desks. For barriers, turnstiles, outdoor mounting or walk-through UHF gates, see BSD's attendance and crowd control solution and NFC access control.

Payroll and HR systems do not want raw taps. They want, per person and per day or period, values such as first in, last out, hours worked, late minutes and absent days, keyed by the employee code, never by the card number.

  • Agree the format with the payroll or HR team: CSV or Excel layout, column order, date and time formats, the employee code field, and how leave and holidays are shown. Follow their template exactly.
  • API where available. Some HRMS products accept attendance through an API; the same event-ID and retry rules apply as for any integration (see the tap-to-transaction data flow).
  • Lock the period. Once payroll is run, the period's attendance should be locked. Later corrections should be new, visible records with a reason, not silent edits.
  • Reconcile before export. Unknown cards, single taps (in without out) and taps from PCs with a clock warning should be resolved first.

For students, the equivalent export is to the school ERP or student information system. BSD's school attendance solution describes how it exchanges student masters and attendance with an existing school ERP. For ERP and business-system interfaces in general (REST, file import, ODBC), see integrating smart card readers with ERP software.

  • Minimal data on the card. For UID-based attendance, nothing personal needs to be written to the card. If an ID is stored, store a number, not a name, date of birth or photo.
  • Minimal data in the log. Card number, person ID, device and time are enough. Names and photos belong in the people master, not in every event.
  • Retention. Decide how long raw taps are kept (for example until the payroll or academic period is closed and audited) and delete or archive them on schedule.
  • Access. Limit who can see movement history; it shows where a person was and when. Log who exported what.
  • Notice. Tell staff, students and parents what is recorded and why, and follow the data protection law that applies to you (in India, the Digital Personal Data Protection Act, 2023). This page is not legal advice.

This page adds no new code. A capture client is the .NET NFC reader application plus a look-up, a local store and a sync loop; its next steps list exactly those additions. The building blocks are PC/SC programming in C#, reader detection and replug handling and one UID read per tap; for other languages see Java and the Python card monitor. All are compiled by BSD and marked "not yet tested on hardware" on their pages.

What you seeLikely causeWhat to do
Enrolled card shows as "unknown"Number format differs between enrolment and captureNormalise in one place; check one card both ways. See wrong UID or different card number.
Two or more records for one tapNo debounce, or resend without event IDsAdd the duplicate rule and event IDs (above).
Taps missing after a network outageKeyboard mode into a web page, or a client that sends before savingUse a PC/SC client that writes locally first.
Everyone at one site is late by the same minutesThe capture PC's clock has driftedCheck w32tm /query /status; fix the time source; flag the affected period.
Card number typed into the wrong windowKeyboard mode, focus lostKiosk-style screen, or switch to PC/SC. See keyboard mode problems.
A different number on every tap of the same cardRandom UID enabled on the cardUse fixed-UID cards, or read a stored ID with the card's key.
Client stops reading after the PC sleeps or the reader is repluggedStale PC/SC contextRebuild the context on service errors; see the detection guide.
Reader not listed at allDriver, Smart Card service, or reader set to keyboard-onlyRun the PC/SC status check and the "no reader found" steps.

This page is for teams building or integrating the capture side. BSD Infotech also supplies complete systems, with readers, cards, software, reports and installation:

Schools and colleges

Gate, classroom and bus attendance with NFC or RFID cards, mobile, CCTV or UHF, crowd control and parent notifications.

School attendance and crowd control

Campus and staff time and attendance

Student attendance, access control and employee time recording linked to payroll formats.

Campus management system

Custom capture software

A capture client or bridge around ACS readers for your existing attendance or HR software.

NFC and smart card application development

Entry with barriers

Door and gate control with card readers, controllers and turnstiles.

NFC access control

The readers listed for ACS's keyboard configuration tool were checked on the official ACS utility tools page on 1 Dec 2026. Keyboard-mode settings come from the ACR1552U Series Reference Manual as summarised in our keyboard emulation guide; card and key facts come from our linked MIFARE and DESFire guides, which cite their ACS and NXP sources.

BSD Infotech is an independent ACS supplier and integrator, not the manufacturer. ACS, the ACS logo and ACS product names belong to Advanced Card Systems Ltd. MIFARE, MIFARE Ultralight, NTAG and DESFire are trademarks of NXP B.V. Windows is a trademark of Microsoft Corporation.

Connecting card readers to attendance?

Tell us your attendance or HR software, your entrances and your cards. BSD Infotech supplies ACS readers and builds the capture software or the complete attendance system.