Skip to main content

NFC Cards

Any 13.56 MHz NFC tag (NTAG stickers, MIFARE cards, key fobs) can be registered as a playback trigger. Tap it against the reader area and Safi plays whatever the card is bound to. It is the fastest way to start a recitation and the only control a child or a guest needs to learn.

Only the card's unique ID is used; nothing is written to the card, so tags shared with other systems keep working there.

What a card can trigger

BindingBehavior on tap
An SD file, chosen as a reciter and surah or as a direct file pathPlays that file from the SD card
A radio stationConnects and plays the stream (needs WiFi)

A file path is anchored to the card automatically, so a bare path like Al-Husari/001_Al-Fatihah.mp3 is resolved under /sdcard for you, and long folder and file names work.

Registering a card

  1. Open the dashboard, NFC page. The registration form sits beside the list of existing cards.
  2. Fill in the card's UID. Either type it (it is usually printed on the tag) or click Scan card and tap the new card on the reader; the UID fills itself in. Scanning listens over the live WebSocket, and falls back to polling if the socket is down.
  3. Give the card a name ("Bedroom card") and choose the mode. For SD file, pick a reciter and surah or type a file path like /sdcard/Al-Husari/001_Al-Fatihah.mp3. For Stream, paste the station URL. Save.

The card works immediately. Registered cards are listed beside the form, where each can be deleted; to change what a card plays, register the same UID again.

The device stores up to 50 cards by default (a firmware build option can raise it).

Card removal behavior

What happens when you lift the card off the reader is a setting (Settings, Card removal):

PolicyBehavior
Continue (default)Playback keeps going; the card is just a trigger
PausePlayback pauses, and re-tapping the same card resumes
StopPlayback stops when the card leaves

"Pause" turns cards into physical presence tokens: recitation plays while the card lies on the device. Households with children tend to love this mode.

Practical notes

  • Tap the card flat against the enclosure area above the PN532 module. Typical read range through a printed case is one to two centimeters.
  • Metal-backed phone NFC tags and cards embedded in metal wallets read poorly or not at all.
  • An unregistered card shows a brief toast on the display: the gold Arabic title بطاقة غير معروفة over the English line "Unknown card". Nothing else happens.
  • The tap is also announced to the dashboard, which is how the registration flow detects the card you are adding.