So i was recently at a convention run by friends. I tend to align myself to the position of least uselessness, so I like to be helpful. Somehow this lead to my good nature being exploited for mediocre software1.

One of the problems at these things is that while we go to great effort to produce a lovely convention booklet, no one actually reads it until the week after. Having the event schedule in there feels like a bit of a waste of time.

I’ve seen info-beamer used at CCC events to display information, and I’ve played with doing the same myself within the hackerspace. I quickly threw together a simple layout with pirate fonts and a pirate themed background (guess what the convention theme was). It displayed the next 10 events - a little bit of json, a little bit of lua. An exercise left to the reader, as it matters not particularly what it did.

A test version that was never used.

I ran into a few issues with displaying events, however. My chosen hardware was the ever popular Raspberry Pi as I have access to about a million of them. Raspberry Pis are simple, but present the problem of having no real time clock - they don’t hold the time of day between reboots.

My solution was to have an onboard script that would tell the device what time it was, roughly, based on when I made the SD image. This meant when the cleaners restarted one, it displayed yesterdays events. Whoops.

In future, I shall either have an RTC on board, or some sort of network I can provide them networked time through. I can’t trust there will be a hotel network, which makes it all the more difficult!

I also came across a few… scheduling errors. This may have been related to me handmaking the JSON file that info-beamer referenced for all events. It may also be related to me being drunk at 3am on day 0 as I finished writing up the last events. People went to the wrong room at the wrong time… no big deal.

In future, I’ll have a smarter application to generate the JSON for me, and probably enable us to do lots of smarter event things. Handmaking unix timestamps was tiresome, to say the least.

Because of how info-beamer works, I can swap out the JSON file, it’ll automatically scan the new one and update the screen straight away based on that information. Likewise, I can change the clock and it’ll fix what’s displayed. Ideally, I should be able to run an NTP server and SFTP server on my person, and use wifi magic when I’m in the area of the screen to automatically update it if need be. That’s maybe a stretch goal…

This is all just running info-beamer though, none of it’s that exciting.

The real challenge for me came in making the system an application that would reliably run in the hostile environment of the hotel. No reliable wireless, no reliable power, no reliable ops team to fix it.

I figured my best bet was to pre-make a raspberry pi image, which I could update, if needed, and put straight on to an SD card.

First off, I downloaded Raspbian Lite - xorg isn’t required for this.

I mounted it locally follwing these instructions:

http://blog.videgro.net/2015/11/modify-disk-image-raspbian/

I couldn’t make zsh do inline arithmetic, so I calculated my sectors first

I wanted to chroot into the image to make changes - to do that, I had to emulate the raspberry pi’s hardware. QEMU makes this easier. Instructions on setting it up live here: https://wiki.debian.org/RaspberryPi/qemu-user-static

Instead of chroot, I used systemd-nspawn, which lives in systemd-container on Debian

Chroot or systemd-nspawn into the image.

Install the requirements (Raspbian Stretch): apt update && apt install libevent-2.0-5 libavformat57 libpng12-0 libfreetype6 libavresample3 python-tz

At this time you can put your info-beamer binary and display files on the image.

It would be wise at this stage to exit the chroot, unmount and sync the image and dd it to a memory card (see the videogro link above for instructions). Then you can run info-beamer and see if it works!

After that, we want to make the system boot to infobeamer and start your support scripts. Luckily, the infobeamer dev has this documented - I followed this method and got it running.

[https://info-beamer.com/blog/running-info-beamer-in-production](Running info-beamer in Production))

Following these guides, tweaking and fiddling for a few hours gave me an SD card image I could flash and boot-to-infobeamer with.

If I had to update the time, I had one script to edit and copy to the SD card. If i had to update the schedule, I had one file to edit and copy to the SD card.

Apart from me being a drunk asshole on day 0, it ran smoothly.


  1. I actually just wrote it and offered it up, but let’s not get truth get in the way of a good story. ↩︎