mark :: blog

23 May 2006: Simplify

When I give presentations I have to find something to display the time (since I never wear a watch), somewhere to put some speaker notes down (since I sometimes forget a useful point), and then I keep knocking it all over everytime I go to the laptop to hit space to get the next slide. I'd quite like to use the laptop display to display my speaker notes and a clock, but OpenOffice doesn't support doing that yet.

I recently changed to using a smartphone to save carrying around and having to recharge lots of gadgets. I bought a Mio A701 which is a nice phone, PDA, and has GPS in one package. Since the Mio also has bluetooth I thought that for my presentations at the Red Hat Summit next week it would be nice to use the PDA to control the presentation, watch my time, and give me any speaker notes.

The smartphone runs Windows Mobile 5, unfortunately and I wanted to set something up quickly and without much effort. I don't mind writing apps for it, but I'd rather avoid it. So my first thought was to use vnc, but the vnc client on the pocketpc wasn't great and kept crashing, and I'd have to create some app to interface with OpenOffice anyway. Once OpenOffice supports multiple displays it may be more useful to revisit doing this via vnc.

My laptop runs Fedora Core 5 with a MSI bluetooth USB dongle plugged in.

Step 1: Get the phone talking to the laptop

This should have been the easiest step, but took an hour to get working right as I originally struggled getting the phone to connect to a 'serial port' service. The commands below were sufficient to advertise a 'dial up network' service and have pppd handle the connection. I didn't bother setting up any IP forwarding as I don't need the phone to be able to use the laptop as a way to get generic network access.

   /sbin/service bluetooth start
   sdptool add --channel=2 DUN
   dund -u --listen --channel=2 --msdun noauth \
      crtscts 115200 ms-dns lock
Then on the Windows Mobile I added a new connection, selected "bluetooth" modem, created a new partnership with the laptop DUN service, any phone number, any username and password (to stop it prompting later), advanced to remove the "wait for dial tone" option. If you're doing this from scratch you'll need to play with settings in /etc/bluetooth/hcid.conf to make sure you set up a PIN for pairing and so on.

Once this is done using the browser on the phone with a URL of causes it to connect, pppd starts, and the phone happily can connect to the web server on the laptop. If you want DNS working you'll need to mess with the dns IP above or make sure your laptop DNS server is set up to accept connections on that interface. So far so good.

Step 2: Control the presentation

The next step was to be able to control the presentation. I couldn't see any nice way to remotely control, so a colleague suggested finding something that used the xtest extension just to inject keystrokes. the X11::GUITest perl module on CPAN does the job perfectly. So I hacked up a quick perl script you run as your local user that acts as a web server and on certain requests will inject a space character into whatever has focus.

pic of the setup

Step 3: Speaker Notes

Next step is to get the mini perl webserver to display my speaker notes as well as the link to the next slide, although, to be honest, I could probably have committed the notes to memory in the time it took to set this all up.

Download the trivial little perl script

Created: 23 May 2006
Tagged as:

Hi! I'm Mark Cox. This blog gives my thoughts on security work, open source, home automation, and other topics.