I'm replacing a broken legacy application on an offline Windows 7 x86 computer. The new application needs to communicate with two peripherals: a CashCode SM-2073 bill validator and a Verifone VX 820 credit/debit card terminal. I have no previous experience working with serial devices, so I'm unsure how to open the COM ports, send commands, wait for responses, read the returned data, and make decisions based on those responses. The application must be built for .NET Framework 3.5, and this is for a self-service ticket kiosk.
3 Answers
Be careful with the Verifone terminal in particular. A card reader usually isn't something you can operate just by writing arbitrary text to its COM port. It may require a vendor SDK, payment processor integration, encryption keys, configuration files, or a specific payment-terminal protocol. The bill validator may have a documented serial protocol, but the payment device could be locked to the processor or kiosk vendor. Confirm what interface and certification requirements the payment provider supports before writing the integration.
Start with the programming manuals for both devices. The fact that they use COM ports only describes the transport; each peripheral still has its own protocol, command format, baud rate, parity, stop bits, handshaking, initialization sequence, and response rules. In .NET 3.5 you can use System.IO.Ports.SerialPort: configure the port settings from the manual, open it, send bytes with Write or WriteLine, and then either handle DataReceived or read with a timeout. Log the raw bytes while developing so you can compare them with the protocol documentation.
You don't necessarily need to upgrade the application to a newer .NET version just to use serial communication. SerialPort is available in the older framework. A newer framework might make documentation easier to find, but upgrading an old offline kiosk can introduce deployment and compatibility risks. First identify the exact hardware interfaces and test each device separately with a small diagnostic program, using explicit read and write timeouts rather than blocking forever.
The original prototype targeted .NET 8 and x64, but the kiosk is an older Windows 7 x86 machine, so I’m rebuilding it for the installed environment. It will normally stay offline, aside from the connection required by the card terminal.

So the overall SerialPort workflow is probably similar for both devices, but I should expect completely different commands and response formats. I’ll need the vendor documentation before I can implement either one reliably.