Live Demo: https://sysdevrun.github.io/nfc-cdc-browser-reader/
A web-based NFC reader interface that uses WebUSB to communicate with ACS ACR518 (ACR1281S-C1) and compatible NFC readers configured in CDC (serial) mode.
- WebUSB CDC Communication: Direct USB communication with NFC readers in CDC/serial mode
- Card UID Reading: Read NFC card unique identifiers (MIFARE, ISO14443-A)
- Reader Commands: Send common reader commands (firmware version, serial number, antenna control)
- MIFARE Classic Support: Authenticate and read MIFARE Classic card blocks
- Custom APDU: Send custom APDU commands for advanced operations
- Continuous Polling: Auto-detect cards when placed on the reader
- LED/Buzzer Control: Control reader LEDs and buzzer for feedback
- ACS ACR1281S-C1 (ACR518)
- ACS ACR122U
- ACS ACR1252U
- Other ACS readers in CDC mode
- Generic USB-CDC NFC readers
WebUSB is required. Supported browsers:
- Google Chrome (recommended)
- Microsoft Edge
- Opera
Note: Firefox and Safari do not support WebUSB.
- Open the application in a supported browser
- Click "Connect Reader" and select your NFC reader from the popup
- Place an NFC card on the reader
- Click "Get UID" to read the card's unique identifier
For continuous reading, click "Auto Poll" to automatically detect cards.
| Command | Description |
|---|---|
FF CA 00 00 00 |
Get Card UID |
FF CA 01 00 00 |
Get Card ATS/Historical Bytes |
FF 00 48 00 00 |
Get Firmware Version |
FF 00 4A 00 00 |
Get Serial Number |
FF 00 52 0A 00 |
Buzzer (100ms) |
FF 82 00 00 06 FF FF FF FF FF FF |
Load Default Key |
FF 86 00 00 05 01 00 BB 60 00 |
Authenticate Block BB with Key A |
FF B0 00 BB 10 |
Read Block BB (16 bytes) |
To configure an ACS ACR1281S-C1 (ACR518) for CDC mode:
- Use the ACS reader configuration tool
- Set the operation mode to "CDC" or "Serial"
- The reader will appear as a USB CDC device (COM port on Windows, ttyACM on Linux)
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewThis project is configured to deploy to GitHub Pages automatically when pushing to the main branch.
The GitHub Actions workflow will:
- Install dependencies
- Build the project with
./as the base path - Deploy to GitHub Pages
The application uses the USB CDC (Communications Device Class) protocol to communicate with NFC readers. For ACS readers in CDC mode:
- Commands are wrapped in a frame:
STX (0x02) + LEN (2 bytes) + DATA + ETX (0x03) + LRC - APDU commands use the PC/SC-lite pseudo-APDU format with CLA=0xFF
- Responses follow the same framing with SW1/SW2 status bytes
WebUSB requires user interaction to connect to devices, ensuring that web pages cannot access USB devices without explicit permission.
MIT