So I’ve been working on a small piece of software to interrogate an RFID reader over its serial connection, implemented using a SiLabs USB Virtual Com Port. Naturally, I’ve been doing this on my Mac. Because this particular piece of kit doesn’t really have a protocol as such but rather implements something much more like a serial terminal, I chose to use Expect to interrogate it, which works reasonably well. I don’t want something production-grade because this is an evaluation kit, which will interact rather differently from the final version.
Anyway, I was having a large problem trying to get the bothersome thing to open. Here is what you would typically write in Expect (really Tcl, which is a fairly cool scripting language).