Hardware Input Device Simulator for Developers
A Windows desktop tool that simulates hardware input devices — barcode scanners, RFID readers, weighing scales, card readers, serial devices, and more — so developers can test their software without buying or connecting real hardware.
If you're building POS software, inventory systems, access control, kiosk apps, or any application that depends on external hardware — you know the pain:
- No scanner? Can't test barcode input.
- No scale? Can't test weight readings.
- No RFID reader? Can't test card taps.
- No serial device? Can't test COM port communication.
DeviceMocker solves this. It simulates all these devices and sends data to your application exactly like real hardware would.
| Device | What it does |
|---|---|
| Barcode / QR Scanner | Sends barcodes via keyboard wedge. 20 sample barcodes, random generator, batch scan mode. |
| Virtual Keyboard | Sends individual keys, shortcuts (Ctrl+C, etc.), function keys F1-F12, arrow keys. |
| Custom Button Panel | POS-style configurable buttons. Cash, Card, Discount, Submit, etc. |
| Serial Text Sender | Sends text to COM ports. Built-in simulation mode with 5 virtual devices. |
| Weighing Scale | Sends weight values in standard scale formats (ST,GS protocol). kg/lb/g/oz. |
| RFID / NFC Reader | Sends card UIDs. 8 sample cards, hex/decimal formats, random UID generator. |
| Magstripe Card Reader | Sends track 1/2/3 data. Visa, MasterCard, Amex test cards included. |
| Test Sequence Builder | Build and replay multi-step action sequences. 3 presets included. |
| Channel | Description |
|---|---|
| Keyboard Wedge | Types into the active window using Windows SendInput API |
| Serial (COM Port) | Sends data to a physical or virtual COM port |
| TCP Client | Sends data to a TCP server |
| UDP | Sends UDP datagrams |
| HTTP Webhook | POSTs JSON payload to any URL |
- Profile Management — Save, load, import/export device profiles as JSON
- Activity Logs — Every action logged with timestamp, device, channel, payload, status
- Log Export — Export logs to CSV or JSON
- Dark / Light Theme — Toggle from Settings
- Send After Countdown — 3-second delay so you can switch to your target app
- Batch Scan Mode — Fire multiple barcodes automatically with configurable interval
- Windows 10/11
- .NET 8 SDK
- Visual Studio 2022 (optional, for development)
git clone https://github.com/x1n-Q/DeviceMocker.git
cd DeviceMocker/DeviceMocker
dotnet run- Open Notepad
- Open DeviceMocker → Devices → Barcode / QR Scanner
- Click "Coca-Cola 330ml" from the sample barcodes on the right
- You get 3 seconds — click inside Notepad
- Notepad receives
5449000000996+ Enter — exactly like a real scanner
Device Module → Input Router → Output Channel → Target Application
Example:
Barcode Scanner Simulator
→ creates DeviceAction (payload: "4801234567890", suffix: "Enter")
→ InputRouter routes to KeyboardOutputService
→ SendInput API types the barcode into the active window
→ Your POS app receives it as if a real scanner was plugged in
The architecture separates devices from output channels, so the same barcode data can be sent via keyboard, serial, TCP, UDP, or HTTP.
Best for: POS systems, inventory apps, warehouse software.
- Go to Devices → Barcode / QR Scanner
- Click a sample barcode from the right panel, or type your own
- Select suffix: Enter (most common for scanners), Tab, or None
- Click Send After 3s → switch to your app
- The barcode types into your app's focused input field
Batch Mode: Enable batch scan, set count and interval, click Start — fires multiple random barcodes automatically.
Best for: Inventory software, shipping apps, food service systems.
- Go to Devices → Weighing Scale
- Set weight value, unit (kg/lb/g/oz), and format
- Standard format:
ST,GS,+ 5.00 kg(matches AND, Ohaus, CAS scales) - Raw Number:
5.00(for apps that parse just the number) - Click Send After 3s → switch to your app's weight field
Best for: Access control, attendance systems, membership apps.
- Go to Devices → RFID / NFC Reader
- Click a sample card or generate a random UID
- Choose format: hex uppercase, lowercase, decimal, with colons, with spaces
- Click Tap After 3s → switch to your app
Best for: Testing COM port communication without hardware.
Simulation Mode (no hardware needed):
- Go to Devices → Serial Text Sender — Simulation Mode is ON by default
- Select a virtual device (Echo, Weighing Scale, Barcode Scanner, Temperature Sensor, Access Control)
- Click quick commands (READ, STATUS, WEIGHT) or type your own
- Watch the terminal show TX → RX with hex bytes
Hardware Mode:
- Uncheck Simulation Mode
- Select COM port, baud rate, line ending
- Click Connect → type payload → Send
Best for: Automated testing, form filling, login sequences.
- Go to Devices → Test Sequence Builder
- Load a preset: POS Login, Scan 3 Items, or Form Fill
- Or build your own: add steps with payload, type (Text/Key/Shortcut), suffix, and delay
- Click Run Sequence → switch to your app
- All steps execute in order with configured delays
DeviceMocker/
├── Core/ — ServiceLocator, InputRouter, OutputChannelManager, DeviceManager
├── Models/ — DeviceAction, DeviceProfile, DeviceLog, OutputResult, enums
├── Interfaces/ — IDeviceModule, IOutputChannel, ILoggerService, IStorageService
├── Services/ — KeyboardOutput, SerialOutput, TCP, UDP, HTTP, Logger, Settings
├── Devices/
│ ├── Scanner/ — Barcode/QR scanner simulator
│ ├── VirtualKeyboard/
│ ├── PosPanel/ — Custom button panel
│ ├── SerialDevice/ — Serial COM port sender with simulation
│ ├── Scale/ — Weighing scale simulator
│ ├── RfidReader/ — RFID/NFC reader simulator
│ ├── MagstripeReader/ — Card swipe simulator
│ └── SequenceBuilder/ — Test sequence recorder/player
├── ViewModels/ — MVVM ViewModels for all pages
├── Views/ — Dashboard, Devices, Profiles, Logs, Settings
├── Helpers/ — RelayCommand, AsyncRelayCommand, ViewModelBase
└── Profiles/ — Default JSON profiles
MVVM Pattern — ViewModels handle logic, Views handle UI, Services handle I/O.
Device → Router → Channel — Every device creates a DeviceAction, the InputRouter routes it to the correct IOutputChannel, and the channel sends it to the target.
Modular Design — Adding a new device or output channel requires:
- Create a class implementing
IDeviceModuleorIOutputChannel - Register it in
ServiceLocator - Create a ViewModel + View
- Add a DataTemplate in MainWindow
- Receipt Printer Tester (ESC/POS commands)
- Cash Drawer Trigger
- Gamepad / Controller Simulator
- WebSocket Output Channel
- MQTT Output Channel
- Plugin System
- Macro Recorder
- Multi-device Simulation
- Installer / Auto-update
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes (
git commit -m 'Add my feature') - Push to the branch (
git push origin feature/my-feature) - Open a Pull Request
This project is licensed under the Apache License 2.0 — see the LICENSE file for details.
x1n-Q — GitHub
DeviceMocker — Test your software without buying hardware.