A bit more work on firmware (untested).