printers-for-people / ACEResearch

Anycubic ACE Pro Reverse Engineering
3 stars 0 forks source link

Model and test frame handling #5

Open Jookia opened 1 week ago

Jookia commented 1 week ago

Right now we have a fairly incomplete picture of how the frame handling works. Writing a simulation in Python and then a tester in C that can run on the printer and validate assumptions is a good start.

The current state machine model I'm going to assume the ACE has is:

If any of these fail, it will restart the entire process. The following tests should help validate this behaviour:

The test would work by sending a valid packet, then a bad packet, then a valid packet. The test succeeds if the bad packet does not influence the second response.

wiltwong commented 1 week ago

Probably easier to compile a serial to net proxy for the Kobra 3 and use socat on a remote computer to do this kinda testing before going to make a static binary. I'll try to compile and get binaries for https://github.com/cminyard/ser2net or something equivalent this week.

Jookia commented 1 week ago

After thinking through #8 , I'm genuinely curious if the input buffer is capped at 64 bytes (one CDC packet). It would be a good idea to test larger packets.