My piece Immrama is a live notation piece. A python script generates image files, as the performance is happening, which are put on a web page. Performers connect via any wifi device with a web browser to see the notation. It uses really simple technologies, so nearly any device should work. A Newton won’t (I made enquires) but an old Blackberry will.
Setting it up requires python and a web server and a lot of faff. It could be packaged into a mac app, but I’m working on linux and it seems like more and more people in the arts are turning to windows, as Apple increasingly ignores their former core audience of artists and designers. It runs fine on my laptop, of course, but I don’t want to have to provide that to anybody who wants to do the piece. Nor do I want to force ensembles to have IT people on hand. Fortunately, I think I’ve stumbled on how to package this for the masses.
I’m working right now to get it all running on a Raspberry Pi. This is a tiny, cheap computer. Instead of having a hard drive, it uses SD cards. This means that I can set everything up to run my piece, put it all on an SD card, and then anybody can put that SD card into their Raspberry Pi and the piece will be ready to go! …In principle, at least.
This piece needs wifi, which does not come with the Pi. Pi owners who want wireless networking get their wifi dongles separately. I got mine off a friend who didn’t need it any more. And while setting up the networking bit, I found at least three different sets of instructions depending on what dongle people have. I could try to detect what dongle they have and then auto-install needed software to match, but, yikes, there are many things I would rather do with my life. I think instead, if you order an SD card, by default, it should come with a dongle – the buyer can opt out, but not without understanding they may need to install different libraries and do some reconfiguring.
Or, I dunno, if you want to run the piece and don’t want to buy a dongle, send me yours and I’ll get it working and send it back with an SD card?
My last software job was doing something called being a release engineer – I took people’s stuff that worked on their own machine and packaged it so the rest of the world could use it. I wanted to be a developer, but that was the job I could get. It seems like I’m still release engineering, even as a composer.
Anyway, this is all very techy, but the point here is to prevent end users from having to do all this. When I’m done, I’ll make an image of the card and use that to make new cards, which I can post to people, saving them my woe. Or, even better, some publishing company will send them to people, so I don’t need to do my own order fulfilment, because queuing at the post office, keeping cards and dongles on hand, etc gets very much like running a small business, which is not actually the point.
Tech Notes so far
Later, I’m going to forget how I got this working, so this is what I did:
- Get Raspian wheezy, put it on a card.
- Boot the Pi off the card
- Put the card in the Pi
- Plug in the HDMI cable to the monitor and the Pi
- Connect the Pi to a powered USB hub
- Put the dongle on the powered hub.
- Plug in a mouse and keyboard
- Connect your Piu to the internet via an ethernet cable
- Turn on the HDMI monitor and the hub
- Plug in the Pi’s power cable (and send electricity to the Pi). Make sure you do this last.
- On the setup screen, set it to boot to the desktop and set the locale. then reboot
- Open a terminal and run:
sudo apt-get update
sudo apt-get install aptitude
sudo aptitude safe-upgrade
sudo apt-get autoremove
sudo apt-get clean
sudo aptitude install rfkill hostapd hostap-utils iw dnsmasq lighttpd - Using your regular computer (not the Pi), Find the wifi channel with the least traffic and least overlap
sudo iwlist wlan0 scan | grep Frequency | sort | uniq -c | sort -n
- Try to find out what dongle I have
- run: iw list
- That returns ‘nl80211 not found’
- run: lsusb
- That says I have a RTL8188CUS 802.11n adaptor
- Use this script for a rtl8188CUS dongle
- For future, it would be nice to get the location from the system locale
- Autoset the SSID to he name of the piece
- Autoset a default password
- Indeed, remove all interactivity from the script
- Reboot
It might not seem like much, but that was all day yesterday. The first step alone took bloody ages.
To Do
- Install needed fonts, etc.
- Try to ensure that the internet remains available over ethernet, but if this isn’t possible, You can still chekc out a github repo to a USB stick and move data that way…
- Find out what wifi dongle would be best for this application – ideally it has a low power draw, decent range, cheap and commonly owned among people with Pis
- Set it to hijack all web traffic and serve pages but not with apache! Use the highttpd installed earlier