fully implement current usb-side message protocol

still missing code to receive commands from the cloud, but at this point
that should be pretty easy to add.