Windows desktop tooling for developers who need to test hardware-dependent software without relying on physical devices.
DeviceMocker combines two workflows:
Simulation mode: send realistic device input into a target app through keyboard, serial, TCP, UDP, or HTTP.Emulator mode: listen for supported device traffic and behave like a development-time POS endpoint.
DeviceMocker is built for:
- POS software development
- internal line-of-business applications
- inventory and warehouse systems
- kiosk and self-service flows
- access-control and card-based workflows
- teams that need repeatable hardware testing before real devices are available
The goal is practical development support: help teams simulate or emulate the hardware behavior their software expects, with a workflow that is easy to run on a Windows developer machine.
This repository ships two Windows desktop apps:
The main application for device simulation and POS-oriented emulator hosting.
Current highlights:
- 9 built-in device simulators
- 5 output channels
- saved profiles and reusable settings
- action logging and export
- countdown-based sends for focus switching
- ESC/POS receipt-printer emulator host
- printer-driven cash drawer state tracking
A companion test client for exercising the DeviceMocker emulator host during development.
Current highlights:
- send ESC/POS receipt content over TCP or serial
- trigger drawer-kick commands
- send cut-paper commands
- send raw hex payloads
- reset drawer state for test workflows
Available device modules:
| Device | Purpose |
|---|---|
| Barcode / QR Scanner | Keyboard-style scan input with samples, random values, and batch sending |
| Virtual Keyboard | Text, keys, shortcuts, and navigation testing |
| POS Button Panel | Configurable point-of-sale style button actions |
| Serial Text Sender | COM-port payload testing with direct and simulated workflows |
| Weighing Scale | Weight strings in scale-friendly formats |
| RFID / NFC Reader | UID-based tap simulation |
| Magstripe Reader | Track 1/2/3 swipe testing |
| Test Sequence Builder | Repeatable multi-step input flows |
| Cash Drawer | Text-command-based open/status simulation |
Available output channels:
| Channel | Purpose |
|---|---|
| Keyboard Wedge | Sends focused input through Windows keyboard events |
| Serial | Sends payloads to a COM port |
| TCP Client | Sends payloads to a TCP endpoint |
| UDP | Sends payloads as datagrams |
| HTTP Webhook | Sends JSON payloads to an HTTP endpoint |
The current emulator host is intentionally focused.
Supported development target today:
- ESC/POS receipt-printer traffic
- printer-driven cash drawer behavior
- TCP listener workflows
- serial listener workflows
- raw-byte logging
- parsed event logging
- receipt preview rendering for supported text commands
Phase-1 emulator support is aimed at real development and integration testing, especially for POS teams using ESC/POS-compatible printing flows.
The easiest way to install DeviceMocker is directly from the Microsoft Store:
- Windows 10 or Windows 11
- .NET 8 SDK for source builds
git clone https://github.com/x1n-Q/DeviceMocker.git
cd DeviceMocker
dotnet run --project DeviceMocker/DeviceMocker.csproj- Open Notepad.
- Open
DeviceMocker. - Go to
Devices -> Barcode / QR Scanner. - Click a sample barcode.
- Switch focus to Notepad during the countdown.
- The barcode is typed into Notepad like scanner input.
To test the current ESC/POS emulator:
- Open
DeviceMocker. - Go to
Emulators. - Set:
Device Type = ReceiptPrinterEmulation Protocol = EscPosDrawer Kick Link Mode = PrinterDrivenTransport Binding = TcpTCP Binding IP = 127.0.0.1TCP Listening Port = 9100
- Click
Start Host. - Run the companion app:
dotnet run --project Samples/PosHardwareTestApp/PosHardwareTestApp.csproj- In the test app, click
Print + Kick Drawer. - DeviceMocker should show receipt output and set the drawer state to open.
DeviceMocker/
|-- DeviceMocker/
| |-- Core/
| |-- Devices/
| |-- Helpers/
| |-- Interfaces/
| |-- Models/
| |-- Services/
| |-- ViewModels/
| `-- Views/
`-- Samples/
`-- PosHardwareTestApp/
DeviceMockeris the main product.Samples/PosHardwareTestAppis a companion integration client, not a separate platform product.- The current emulator host is intentionally scoped to supported receipt-printer and drawer development scenarios.
Release-ready Windows builds can be generated with:
dotnet publish DeviceMocker/DeviceMocker.csproj -c Release -r win-x64
dotnet publish Samples/PosHardwareTestApp/PosHardwareTestApp.csproj -c Release -r win-x64This repository also includes packaged release output under releases/ when generated locally.
To generate a one-click Windows setup executable for DeviceMocker with the bundled POS Hardware Test App:
powershell -ExecutionPolicy Bypass -File installer/Build-Installer.ps1The installer is written to releases/ as DeviceMocker-Setup-v<version>-win-x64.exe.
This repository includes DeviceMocker.Package/ plus SDK-based MSIX scripts under msix/.
Important notes:
- publisher display metadata is set to
xinQ - author metadata is set to
Daniel Depaor - for Microsoft Store submission, rebuild with the exact publisher string from Partner Center
To generate a signed local test MSIX package:
powershell -ExecutionPolicy Bypass -File msix/Build-MSIX.ps1 -SignPackageTo generate a Store-ready package with your real Partner Center publisher:
powershell -ExecutionPolicy Bypass -File msix/Build-MSIX.ps1 -Publisher "CN=YOUR-PARTNER-CENTER-PUBLISHER"To install the locally signed MSIX package, run this from an elevated PowerShell window:
powershell -ExecutionPolicy Bypass -File msix/Install-MSIX.ps1Apache License 2.0. See LICENSE.
Created by x1n-Q.