I now own three G-Code machines:
- My new Voltera
- An OtherMill desktop CNC milling machine
- A Simple Metal 3D printer
All of these connect via CDC devices on USB, and of course they all talk G-Code. My 3D printer is connected on an OctoPi, but the other two are on a Mac Mini in my workshop. The problem is that the software for both devices just blindly assume that when they see a CDC device appear, and the machine on the other end of the device talks G-Code, just plow ahead going: "Yup! Found my device! Let's talk!".
I had a scare last week when I had left the mill turned on but hadn't yet powered up the V1. The Voltera software connected to the mill and decided it needed a firmware update(!) but fortunately that didn't get anywhere or I could have ended up with a bricked mill. I force-quit the software, powered-off the mill, turned on the V1, and all was well.
Conversely, when the OtherPlan software is running at the same time as the Voltera, powering up the V1 makes it think the mill has gone online.
Having done quite a bit of USB with my Software Engineer hat on, I can think of two ways to avoid this:
- When the serial device is enumerated by the OS, examine the VID/PID to ensure that this is "your" device
- If that's not feasible, open the serial device and send a quick query to get some sort of indentification response (I don't know G-code all that well, but there must be something) that differentiates your device from another manufacturer.
Not a huge deal right now, and you're not the only vendor that suffers from this problem. I just make sure to power off the device I'm not using so as not to confuse its associated software. But would be nice not to have to worry about it, and it seems like a fix wouldn't be all that hard.