I am sorry you are having trouble developing code for the Maestro on Windows 10 IoT Core. You might be interested in the Maestro Windows IoT Driver that was recently posted on the forum, which uses one of the Maestro's virtual serial ports.
If you want help troubleshooting your code, could you tell what you mean by "data crc error"? If you are seeing an error message, please post a screenshot of it. In the code you posted, I can't tell what
Length you are using in the setup packet. Therefore, it would help if you could come up with the simplest possible code that should work, but does not work, and then post all of it, along with a clear description of how you ran the code and why you think the code does not work. Also, since the Get Variable requests are different between the Micro Maestro and the Mini Maestros, I would need to know what type of Maestro you are using.
The Maestro does not have any Get Variables requests that return a smaller, more specific amount of data like you suggested.
The Maestro bytecode consists of opcodes and data bytes. The opcodes start at 0, which is QUIT, and then they are numbered sequentially from there. I have attached Opcode.cs, which is part of the source code of Bytecode.dll and defines the values of the all the opcodes. For some of the opcodes, you will need to insert additional little-endian data bytes into the bytecode after the opcode.
Opcode.cs (3.3 KB)