Card Dispenser Communication Protocol: How Host Software Controls the Hardware
Connecting a card dispenser to a kiosk computer is only the first step. The host application still needs a defined way to tell the hardware what to do, receive the result and decide what should happen next.
That is the role of a card dispenser communication protocol.
RS232, USB or another interface provides the communication path. The protocol defines the commands, responses and device information exchanged through that path.
For a bench test, sending a command and seeing a card move may be enough to confirm basic communication. For an unattended kiosk, it is not enough.
The application also needs to understand:
- whether the device is ready;
- whether a command was accepted;
- whether the requested operation completed;
- whether an error or timeout occurred;
- what state the transaction is in;
- what the next card movement should be;
- how to recover from an interrupted transaction.
A reliable integration therefore treats the card dispenser as a stateful hardware device, not simply as a collection of software commands.
Quick Answer
A card dispenser communication protocol defines how host software sends instructions to the card dispenser and interprets its responses, status information and errors.
The communication interface and protocol are different:
RS232 defines the communication channel. The protocol defines what the host and card dispenser say to each other.
An SDK or API can provide a higher-level programming interface, but it does not replace the transaction logic of the kiosk application.
For unattended systems, think in terms of:
Device State → Command → Response → Result → Application Decision → Next State
rather than:
Send Command → Assume Success
1. Interface, Protocol, SDK and Application Are Different Layers
These terms are often used together during integration, but they solve different problems.
| Layer | What It Defines |
|---|---|
| RS232 / USB / Other Interface | How the hardware is connected |
| Serial Parameters | Baud rate, data bits, parity and stop bits where applicable |
| Communication Protocol | Commands, responses and data structure |
| SDK / API | Programming functions available to the developer |
| Host Application | Transaction, workflow and business logic |
Suppose a card dispenser supports RS232.
That tells you there is a serial communication path.
It does not yet tell you:
How do I request a card movement?
or:
How does the device report whether the operation succeeded?
Those answers come from the protocol or an applicable SDK/API.
A better pre-integration question is therefore not only:
“Does the card dispenser support RS232?”
but:
“Which communication protocol or SDK/API is available for our host environment?”
2. What Does a Card Dispenser Communication Protocol Define?
There is no universal command set shared by all card dispensers.
The exact format depends on the product.
Depending on the device, a protocol may define:
- command structure;
- command identifiers;
- parameters;
- response structure;
- device status;
- operation results;
- error information;
- data validation or checksum where applicable;
- communication timing or timeout requirements.
Conceptually, communication looks like this:
Host Application → Command → Card Dispenser
followed by:
Card Dispenser → Response / Status → Host Application
The exact command bytes, parameters and response codes should always come from the protocol document for the specific model.
Two card dispensers can both use RS232 while using completely different command structures.
This is another reason why:
RS232 compatibility does not mean protocol compatibility.
3. The Host Application Controls the Transaction
The card dispenser controls its internal hardware.
The host application controls the transaction.
A simplified architecture is:
Host Application
↓
SDK/API or Protocol Implementation
↓
Communication Interface
↓
Card Dispenser Controller
↓
Motors / Sensors / Card Path
Information then returns from the hardware to the application.
The dispenser may report information about a mechanical operation or device condition.
The host application has the broader system context.
It may know:
- which transaction is active;
- whether user registration or payment succeeded;
- whether an RFID operation is required;
- whether a third-party system returned success;
- whether the card should be presented, collected or recycled;
- whether the transaction should continue or stop.
This separation is fundamental:
The dispenser executes card-handling actions. The host application decides when those actions belong in the transaction.
4. Command, Response and Device State Are Not the Same Thing
These three concepts should be handled separately in application logic.
Command
A command describes what the host requests.
Depending on the model, this may include functions such as:
- query status;
- feed or move a card;
- present a card;
- collect or recycle a card where supported;
- initialize or reset the mechanism where supported.
Response
A response tells the host what the device reports after receiving or processing a request.
The exact response structure depends on the protocol.
Device State
Device state describes the current hardware condition.
Depending on the model and available protocol information, this may include conditions such as:
- ready;
- busy;
- card at a defined position;
- card supply condition;
- card-path condition;
- hardware error.
Not every card dispenser provides the same commands, responses or status information.
The useful principle is:
Command = What should the hardware do?
Response = What did the hardware report?
State = What condition is the hardware in now?
That distinction becomes particularly important when something does not go according to plan.
5. Why a Successful Demo Is Not Yet a Production Integration
Demo software is extremely useful during the first stage of integration.
It can help confirm:
- the host can communicate with the device;
- serial settings are correct;
- the dispenser responds;
- basic card movements work;
- supported status or test functions can be queried.
A typical test tool may expose individual operations through buttons such as:
Status → Feed → Dispense → Collect → Reset
where those functions are supported.
This proves that the hardware and communication path can work.
But a production kiosk has a different requirement.
The real application must decide:
When should the card move?
What condition must be true before the command is sent?
What result should be expected?
What should happen if that result is not received?
Where should the card go after another subsystem succeeds or fails?
So:
Demo software validates individual hardware functions. Production software coordinates those functions into a complete transaction.
This is why copying demo buttons into a kiosk application is not the same as completing the integration.
6. A Card Transaction Should Be State-Aware
A basic implementation might look like:
Send Dispense Command → Done
A more robust unattended workflow is closer to:
Check Available Device Status
↓
Confirm Appropriate Starting Condition
↓
Send Required Card Command
↓
Receive and Validate Response
↓
Evaluate Result / Available State
↓
Decide Next Action
If another subsystem is involved, the workflow continues.
For example:
Position Card
↓
Perform RFID Operation
↓
Check Electronic Result
↓
Present / Collect / Recycle According to Application Logic
This creates an important distinction:
Command transmitted ≠ Complete transaction
and, depending on the protocol:
Command accepted ≠ Every subsequent physical or application step completed
The application should use the actual feedback available from the selected device instead of assuming a result.
7. Success, Error and Timeout Need Different Handling
A production application should distinguish between different communication outcomes.
Valid Success Response
The device returns a valid response indicating success according to the protocol.
The application can move to the next defined transaction state.
Valid Error Response
The device responds, but reports an error or condition that prevents normal completion.
The host can interpret the available error/status information and choose an appropriate recovery action.
No Response / Timeout
The expected response is not received within the defined period.
This situation needs particular care.
Consider:
Host sends command
↓
Device receives command
↓
Mechanical action begins
↓
Expected response does not reach the host
From the host application’s perspective, the final physical state may now be uncertain.
Therefore:
No response does not always prove that no physical action occurred.
The exact recovery method depends on the protocol and the status information available from the device.
Where supported, a safer approach is:
Timeout → Confirm/Re-establish Communication → Query Available Device State → Determine Current Condition → Decide Recovery Action
This is more robust than immediately repeating the previous card-movement command.
8. Why Blind Retry Is Risky in Card Handling
Imagine that the application sends a dispense command.
The device receives it and starts moving a card, but the response is lost.
The host reaches its timeout limit.
If the application immediately sends the same dispense command again, the first operation may already have started or completed.
The second command can therefore produce a card movement that the application did not intend.
This is especially important in unattended equipment because the software cannot rely on an operator looking inside the mechanism after every communication exception.
A better design principle is:
Retry based on the known or recoverable device state, not only on the last command sent.
If the current state cannot be determined safely, the application may need to enter a controlled recovery or service state instead of continuing the normal transaction.
The exact action should follow the capabilities of the hardware and protocol.
9. Direct Protocol or SDK/API?
There are two common software-development approaches.
| Direct Protocol | SDK / API |
|---|---|
| Application communicates using the protocol directly | Library exposes programming functions |
| Developer handles command construction and parsing | Library may abstract low-level protocol operations |
| Provides direct protocol-level control | Can reduce development effort |
| Suitable for some custom environments | Convenient when supported OS/language matches |
| Requires protocol implementation and testing | Depends on the supplied library and its environment |
Neither is universally better.
The decision depends on:
- host operating system;
- programming language;
- available development resources;
- required hardware functions;
- application architecture;
- maintenance requirements.
An SDK also does not replace application logic.
An SDK function may make it easy to request:
Move Card
but the application still needs to determine:
When should the card move?
and:
What should happen if the operation fails?
The SDK simplifies access to the device.
The host application still owns the transaction.
10. Does RS232 Mean Windows Only?
No.
RS232 is a communication interface, not an operating system.
Windows, Linux or Android may potentially communicate with a serial card dispenser when the required hardware interface and software environment are available.
The actual implementation depends on:
- host hardware;
- serial interface or adapter;
- operating-system support;
- drivers where required;
- device permissions;
- development environment;
- protocol or SDK availability.
For example, a Windows application may use a supplied DLL/SDK or implement the serial protocol directly.
A Linux application may communicate through an available serial interface using the device protocol.
An Android application may use an applicable Android SDK or serial implementation together with suitable hardware.
However:
Do not assume that every Android device provides a directly usable RS232 interface.
The Android board, serial connection method and available development resources should be confirmed before the architecture is finalized.
11. Example: SNR-K750 Series Integration Architecture
The SNR-K750 series provides a useful real-world example.
For applicable configurations, development resources include:
- communication protocol;
- K7X0 DLL interface documentation;
- C# demo SDK;
- demo/test software.
A Windows implementation may conceptually use:
Windows Application
↓
DLL/SDK or Direct Protocol
↓
Serial Communication
↓
SNR-K750 Card Dispenser
For another host environment, the applicable protocol or SDK resources should be confirmed according to the specific project.
The integration sequence should therefore begin with:
Product Model → Required Card Workflow → Host OS → Interface → Protocol/SDK
The SNR-K750C supports dispensing and card collection workflows.
The SNR-K750L supports dispensing, collection and recycling, making it applicable where reusable card circulation is required.
Those physical capabilities affect the application logic.
For example, software cannot implement a recycling workflow simply because the protocol contains card-control functions; the selected hardware must also provide the required physical card path.
Applicable development resources are available through our SDK & API section, while test software can be used to verify basic communication and supported device functions before the production application is developed.
12. Coordinate the Protocol with RFID and Other Subsystems
Card dispenser integration becomes more interesting when another subsystem needs to process the card before it reaches the user.
An RFID workflow may look like:
Feed Card
↓
Position Card
↓
RFID Read/Write or Other Required Operation
↓
Receive Electronic Result
↓
Application Decision
↓
Present / Collect / Recycle
The card dispenser protocol controls the applicable physical card-handling operations.
The RFID reader or encoder handles its own electronic function.
The host application coordinates the two.
Therefore:
Mechanical Success ≠ Electronic Success
A card may reach the correct position while the RFID operation fails.
The application should not present that card simply because the mechanical command succeeded.
For the electronic side of this architecture, see our Card Dispenser RFID Reader Guide.
The same principle applies when integrating other third-party subsystems: define which device performs each operation and which result allows the transaction to move to the next state.
13. Build a State Machine for Unattended Operation
For a production kiosk, it is useful to think in states rather than buttons.
A simplified model could be:
Idle
↓
Device Check
↓
Card Processing
↓
External Processing if Required
↓
Present / Collect / Recycle
↓
Transaction Complete
An abnormal event may instead lead to:
Normal State → Error or Unknown State → Recovery Logic → Known State
The exact state machine depends on the application and on what information the device protocol provides.
The goal is not to create unnecessary software complexity.
The goal is to make sure the application can answer:
What state is this transaction in?
before deciding:
What hardware command should be sent next?
This is particularly important for unattended kiosks, where a transaction may be interrupted by communication loss, application restart, user behavior or another subsystem.
14. Log the Workflow and Test the Recovery Path
Good logging makes integration and field troubleshooting much easier.
Where appropriate, useful records may include:
- timestamp;
- transaction reference;
- requested command or function;
- device response;
- available device state;
- timeout;
- retry or recovery action;
- final card destination;
- final transaction result.
For RFID, hotel key or other credential applications, sensitive keys or protected credential data should not be written into ordinary application logs.
The purpose is to reconstruct the workflow.
For example:
Feed requested → Card positioned → RFID operation failed → Card collected
is much more useful during troubleshooting than a generic:
Transaction failed
Testing should follow the same principle.
Do not test only the successful path.
Depending on the actual hardware and application, test cases may include:
- normal command/response;
- repeated transactions;
- reported device errors;
- communication timeout;
- communication disconnect/reconnect;
- application restart;
- host restart;
- power interruption;
- interrupted transaction with a card inside;
- recovery from an unknown state;
- RFID or third-party processing failure.
Not every scenario applies to every model.
But for an unattended kiosk:
Test recovery as seriously as normal operation.
Card Dispenser Software Integration Checklist
Before development begins, confirm the complete software-control chain.
1. Hardware
Product Model → Required Card Functions → Host Interface
2. Communication
Interface → Serial Parameters if Applicable → Communication Protocol
3. Development
Host OS → Programming Environment → Direct Protocol or SDK/API
4. Device Control
Available State → Command → Response → Result
5. Transaction Logic
Current State → Application Decision → Next Action
6. Exception Handling
Error → Timeout → Unknown State → Recovery
7. External Processing
RFID / Encoder / Other Subsystem → Result → Card Decision
8. Validation
Normal Transaction → Interrupted Transaction → Recovery → Final Card State
The key question is not only:
Can our software send a command?
It is:
Does our application have enough information to decide safely what should happen next?
FAQ
What Is a Card Dispenser Communication Protocol?
A card dispenser communication protocol defines how host software sends commands to the dispenser and interprets its responses, status information and errors. The exact command structure and available functions depend on the product model.
Is RS232 the Same as a Communication Protocol?
No. RS232 defines a serial communication interface. The communication protocol defines the commands, responses and data exchanged through that interface.
Do I Need an SDK to Control a Card Dispenser?
Not always. Some applications can implement the device communication protocol directly, while others use a supplied SDK/API. The appropriate method depends on the product, host operating system and development environment.
Can Android Control an RS232 Card Dispenser?
Potentially, yes. The Android hardware must provide a suitable serial communication path, and the application needs an applicable protocol or SDK implementation. Not every Android device provides a directly usable RS232 interface.
What Should Software Do After a Communication Timeout?
Do not automatically assume that the previous physical operation never occurred. Where the hardware and protocol support it, confirm communication, query the available device state and determine the current card condition before retrying or selecting another recovery action.
Should I Resend a Dispense Command After No Response?
Not blindly. The first command may have reached the device even if its response was not received. Repeating a card-movement command without checking the available device state can create an unintended second operation.
Is Demo Software Enough to Integrate a Card Dispenser?
No. Demo software is useful for verifying communication and individual hardware functions. A production kiosk application still needs transaction logic, state handling, error recovery and coordination with other subsystems.
Final Recommendation
Reliable card dispenser integration is not built around a single dispense function.
It is built around a controlled interaction between software and hardware:
Understand State → Send Command → Validate Response → Evaluate Result → Decide Next Action
The card dispenser communication protocol defines the language used for that interaction.
RS232 or another interface carries the communication. An SDK/API may simplify development. The host application coordinates the complete transaction.
For an unattended kiosk, the most important software question is therefore not:
“Can we send the dispense command?”
It is:
“Can the application determine what happened and safely decide what should happen next?”
That is the difference between proving a card dispenser works on a test bench and integrating it into a reliable unattended system.
Integrating a Card Dispenser with Your Kiosk Software?
Send us your:
Card dispenser model + required card workflow + host OS + development environment + communication interface + application requirements.
SNROKIOSK can provide applicable communication protocols, SDK/API resources, demo software and technical documentation to support testing and software integration.
