CNC (computer numerically controlled) machines are a class of machine tool that recieves instructions (typically in the format of G-Code) from another machine, and executes the code to control the machine's movements. While G-Code itself is an open standard, sometimes manufacturers create equipment which does not communicate in G-Code at the network level, and thus require expensive, proprietary software packages to control the machines. However, when these communicate over ethernet using ordinary network protocols, we have the opportunity to take a listen with open source software, and see if we can develop methods of controlling the machine with our own code!
Emco PCMill CNC machine - Pardon the disarray in the workshop!
Port Mirroring, hapening at the Data Link Layer (Level 2) allows one to copy every message sent between a server and a PC to another device, allowing deeper inspection into the running processes.
To recieve and interpret these packets, we use a software called WireShark, which performs network packet capture, facilitating the storage and analysis of the sent data.
Port Mirroring Depiction
While this work is ongoing, I hope to release open-source code capable of running these machines without an expensive software license.