How to use Expect on Mac OS X for Serial Devices

Posted on Sat, 20 Sep 2008

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).

Read more...


Re-Updated Keynote Speakers Notes

Posted on Sat, 15 Mar 2008

Oops, it seems I put the Strip workflow in the Extract archive. Hope that didn’t freak anyone out. Thanks to Wally for pointing this out.

PS. I have tried the extractor on the latest version of Keynote, and it doesn’t work correctly, but I don’t really intend to update it, since the latest version does of Keynote does a reasonable job of printing a sheet of handouts with notes (certainly better than I was producing).


Updated Keynote Speakers Notes

Posted on Thu, 06 Mar 2008

I have released an updated version of my Keynote Speakers Notes extraction utility. It is now available as an easy-to-use Automator Workflow.


Windows Sharing—No port 445 for you!

Posted on Sun, 24 Feb 2008

So I was trying to mount my Mac OS X home directory via CIFS to my Ubuntu 7.10 virtual machine (in VirtualBox). I was getting a very long pause for the mount, and it would eventually succeed. Sometimes, the easiest way to diagnose a problem is not using things like --verbose (an argument to mount.cifs), but rather with a sniffer, namely Wireshark.

Turns out, that CIFS tries to connect to TCP/445. Well, no surprises there. What did surprise me was that it was failing (and repeatedly trying again). On my 10.4 Mac, Windows Sharing was enabled for the firewall. Upon closer inspection though, that only enabled the older SMB stuff (TCP/139 and UDP/137,138), but not TCP/445. So I added a custom entry to allow TCP/445 (I called it “Windows Sharing - CIFS”) and filed a bug report with Apple. I wonder if this is already fixed in 10.5.


Stripping Keynote Speakers Notes

Posted on Sun, 17 Feb 2008

I was looking around on the Keynote discussion forums, looking to announce my previous Keynote XSLT work, and came across a user who was looking to remove all the speakers notes, so they could send a Keynote document (as a Keynote file) to some people.

So I whipped up an XSLT transform that is basically an identity transform, and integrated it with an Automator workflow.


Next 4 entries