On this page
SAM ID card reader
Resident ID card security module card search, card selection and explicit card reading driver
Compatible devices and models
| Device series / model examples | Connection requirements |
|---|---|
| Resident ID card readers using SAM security-module commands | Match the AA AA AA 96 69 sync header, length, XOR checksum and responses for module query, card search, selection and reading. |
Connect the SAM command interface
- Confirm the reader exposes SAM commands through serial or transparent TCP in its vendor tool. A USB SDK-only or keyboard-output reader is not automatically a matching byte interface.
- Record serial or network settings, close the vendor tool’s serial connection and create the matching gateway channel. Select SAM ID card reader. Defaults are
10000 mstimeout and20 mssend delay; no Modbus station is needed. - Without a card, read the module number and check module status first. No card is a search-stage result rather than proof of broken serial communication.
- Present an authorized card and execute Search, Select and Read in order. After a card change or failed step, restart with Search.
Responses use the AA AA AA 96 69 sync header, length and XOR checksum. Methods take no arguments and use no register address or terminator. Text and photo data belong to the complete card result, not generic byte-order, len or array conversion. Module number and status suffice for routine connection diagnosis.
Open the plugin
Enter “Development Configuration → Collection Configuration”, create a device and select “SAM ID card reader” in “Device Plugin”.
Supported channels and data types
| Channel type | Pre-configuration check |
|---|---|
| Serial Port | Confirm that the serial port is not occupied by other programs and maintains the same baud rate, data bits, stop bits and parity bits as the device. |
| TCP Client | Confirm network reachability of the device IP, port, and gateway to the device. |
Optional data types: Select by page options
Address rules
- The SAM ID card security module does not support register variable addresses. Please perform the complete card reading process by reading the module number, checking the module status, finding the card, selecting the card and reading the card dynamically.
Special methods
| Method | Purpose | Parameters |
|---|---|---|
| ReadModuleNumberAsync | Read the security module number | No parameters |
| CheckModuleStatusAsync | Check security module status | No parameters |
| SearchCardAsync | Search ID card | No parameters |
| SelectCardAsync | Select ID card | No parameters |
| ReadCardAsync | Read ID card | No parameters |
Device debug
Enter “Development Configuration → Collection Configuration”, select the current device then open “Protocol Debug” at the top of the workspace.

Debugging notes
Card searching, card selection, and reading summaries may display identity information and require sensitive data permissions and secondary confirmation.
Functions
| Function | Purpose |
|---|---|
| Read module number | Identifies the connected ID-card security module. |
| Check module status | Checks whether the security module is ready for card operations. |
| Search card | Detects an ID card in the reader’s sensing area. |
| Select card | Selects the detected card before reading it. |
| Read card | Reads identity information from the selected card; this operation accesses personal data. |
Verify the configuration
Match the module number to the reader label or confirm the status query; use Search → Select → Read for the separate card workflow.
Troubleshooting
- Ordinary register variables do not apply. If module status is healthy but card reads fail, check placement and Search/Select order.
- Special method execution fails: Check method parameters and permissions; control, write or reset methods also need to confirm that the device is in a state that allows operation.
- The serial port device does not respond: Confirm that the serial port is not occupied, and check the baud rate, data bits, stop bits and parity bits.
Related links
- Collection configuration: View channel, device and common variable configuration.
- Plugin Index: Find other collection or data-forward plugins.