by raminf · 1mo ago · 0 comments
On a lot of IoT projects, it's easier to create a "functional" software simulator for the hardware part so the mobile and cloud people can get going without having to wait for test hardware. Those simulators work at the level of emulating BLE or WiFi/API commands. Once you have hardware, the simulators are only used in CI/CD testing.
Where I can see this coming handy is instead of a "functional simulator" to actually have real firmware running for each mobile or back-end dev and CI/CD runner.
But if it's just an approximation anyways, why not save yourself an awful lot of time and emulate the HAL a few layers up for the 95% of logic which doesn't require the actual hardware?
Just like in software, your cloud web app doesn't need a cycle-accurate emulation of the entire Amazon cloud. Mocking a few REST calls is often more than enough, and in practice mocking the SDK API has basically the same result.