How to read and write NFC M1 card?

First of all, this is just a tutorial, there is no complete code. Overview What is the NFC M1 card? The NFC M1 is a passive RFID/NFC card produced by NXP Semiconductors. It has 1 KB of storage, divided into 16 sectors. It operates at 13.56 MHz (High Frequency), which is the standard frequency for NFC. It follows the ISO/IEC 14443-A(Type-A) protocol. For example diagram: Read Card How to read card in Android? First, you should have a android phone of NFC function. You must be enable NFC in your android phone. A empty or useless card. Let’s write code. AndroidManifest.xml Request permissions <uses-permission android:name="android.permission.NFC" /> <uses-feature android:name="android.hardware.nfc" android:required="true" /> MainActivity.kt Define a NFC adapter: private var nfcAdapter: NfcAdapter? = null, NfcAdapter is android.nfc.NfcAdapter Init NFC adapter in MainActivity#onCreate method: this.nfcAdapter = NfcAdapter.getDefaultAdapter(this) Create a override method(For example): If you need to read cards from other SAKs or card models, you will need to write the corresponding multi-branch conditions yourself. ...

February 18, 2026 · 6 min · ZetoHkr

How to easily use Kqueue in C language

This tutorial is designed for macOS or BSD systems. What is kqueue? kqueue is an event notification mechanism in macOS (and BSD systems such as FreeBSD). If you are writing a server, but you don’t want to allocate a thread for each client; you can use kqueue to listen for events from clients, for example: Who just connected? Who disconnected? Which client has sent a message? The system notifies you automatically. Multiple clients can be served by a single thread. This is I/O Multiplexing. kqueue is similar to epoll in Linux and iocp in Windows. This will save resources. ...

November 2, 2025 · 14 min · ZetoHkr