So the code and captured data is attached. I'm working on everything like this: (forgive me for the cheesy file names)

1. Raw data capture using the test.py file. This just saves all data for analysis

2. packet match finder works.py. This will listen to the network continuously and print and save to a text file all of the repeated payloads. (remember: the other packet data is ignored, since it changes every time) The trick here is to initialize the machine two times, then you can see all of the packets that are sent to the machine to initialize it more easily.

3. replicatetraffic.py: This file is intended to have a list of all packets to send to the machine and send them after receiving the prerequisite packet from the machine, also stored in a list from previous analysis. Note: Will have to add the keep alive packet function somewhere


4. (Coming after mastering the above) control.py: This file will work with the initiated machine and dispatch commands. It will read the received packets for the simple data such as position ackowledgement and machine status.

Curious if anyone has any experience with this or thoughts on how to proceed. I'm going to dig deeper into packets to finalize my code to initialize the machine, then move onto other things if I can get the initialization down.

I've fooled around with reading the packets to and from the machine, finding the patterns for the initialization process, and working out the differences. The payloads of the TCP packets are identical each time.

To control the machine seems do-able, but it requires some lazy coding since I have no idea what all of the data during the initialization process really means. A lot of it is concise, but there's huge swaths that are not.

My plan was just to use my packet captures and send the raw data from the control PC to the machine to initialize it without completely understanding what it is and does. The only thing that should matter, is that it is the exact same payload every time, and I can replicate it, or at least I think.

If this assumption is correct, it would mean that I need to figure out the rest of the stuff about the packets. The payload is identical each time during initialization, but the other details around the packet are not. We're talking things like headers, I guess. I don't know all that there is to know about packets yet. Only ever messed with packet payloads.