No test device? Simulate!
MorphSo basically the problem we have is this: systems we develop are for IoT devices deployed all over the world. These are expensive devices. Our only prototype is usually tied up in field trials for weeks. And the software team needs to develop, test, and debug code that communicates with these devices over serial ports and TCP sockets. Without realistic simulators (technically not emulators like I wrote last time) we usually resort to mocking at the wrong abstraction level, writing code that "should work" but fails on real hardware, or we wait until equipment becomes available.
Basically I need to solve this by creating virtual devices that are indistinguishable from real hardware at the protocol level: they create actual PTY devices and TCP sockets, broadcast telemetry in the exact format the real devices use, respond to the same commands, and can even replay recorded data from actual deployments to reproduce bugs. This means our entire software stack (from low-level serial data consumers to high-level stuff) can be developed and tested continuously on an ordinary laptop. What's cool is that I can add it to our test pipeline, create as many "virtual" devices we want and do stress tests of our cloud offering as well.
Since I have time, I'll probably use Rust for this. Opus will come in handy if I get too close to the deadline, but for now, I will only use AI to help me think about how to go about this.
Some things I'll need to keep in mind: I need to simulate Baud Rate throttling and jitter/variable data output intervals, cross-platform PTY Handling (I think this is going to be a pain in the ass) and the "replay" feature for the data stream.
What do you think I should call this app? (make it terminal friendly)