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


A Multi-Version Rdiff-Backup Server

Posted on Sat, 19 Jul 2008

Rdiff-Backup provides a fairly nice way of backing up a server, and I have used it to back-up a number of different servers, each with a different version of rdiff-backup. This is annoying because although a version 1.1.15 should work with 1.1.12, for example, in reality it does tend to complain.

Because of this version-skew on different types of servers, I took the approach of having multiple versions installed on the backup server (Mac OS X Panther in the first case, and now Leopard). This document details how you can house multiple versions of the rdiff-backup server on the same machine and use a different version per-client.

You can find the documentation and supporting files in the Files section.


A “Split SSH” Configuration for Different Access Policies

Posted on Sat, 24 May 2008

What with all the hubbub with the OpenSSL faults in the news recently, I deciced I would do something to put down another large problem I have with a closely related product–OpenSSH, although I should immediately point out that this is not necessarily particular to OpenSSH.

You see, OpenSSH has very little support for easily creating rich access policies. The access policy I wanted to create was to allow password authentication to clients inside our campus, but only allow public-key authentication to clients coming from outside the network.

The reason for this, as anyone running an Internet-facing SSH server will be able to immediately appreciate, is that every day many login requests are made from the Internet to SSH servers, trying to brute-force account names and passwords; sometimes they are successful, but most of the time it just creates a lot of noise in the logs and an uneasy what-if feeling in your gut.

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.


Next 5 entries