Fix packet data calcsize
Add writer implementation and serial timeout