What a crappy, poorly thought-out protocol.
You have a variable length integer (up to 4 bytes) but lets also have some fixed sized integer types less than 4 bytes for the giggles.
You have an error byte...sometimes...with command/response contextual meanings.
You have properties, that may or may not be there, but only for some commands and responses.
You have command specific, fixed, fields before the properties for some commands/responses.
Some commands ack, except when they don't.
Half the state is in the client and the other half is in the server.
A significant number of the "features" are to get around the previous bullet point.