Music by numbers - more notes

I blogged before about building a Raspberry Pi music player by numbers thingy and I said that I’d mention some more details about the software used. I did write up the notes, but then forgot to post it on the blog, so here goes, better late than never…

I had already mentioned the USB Message Board linux driver and the MP3 player that I used. The USB Message Board also requires the libusb-1.0-dev package to be installed, like this:

sudo apt-get install libusb-1.0-0-dev

But before I got that far, I needed an OS … and I wanted a version that wouldn’t corrupt the filesystem on the SD card if I just switched the power off at the mains. I have ended up running something called IPE - Industrial Perennial Environment of which I’m using the R1 edition, which is based on Raspbian. It seems to work a treat: I don’t need to worry about clean shutdowns, the filesystem runs in read-only mode. The R2 version of IPE looks even better, but for the time being I’ve stuck with the Raspbian derived version which is more familiar to me.

It goes without saying, that the webserver I used to provide the web-based API was my own dweb lightweight webserver which seems to have done the job very well.

I also wanted the Raspberry Pi to offer its own WiFi hotspot, for which I followed these instructions. After that I also followed this advice and disabled ifplugd for the wireless lan.

So … putting those things together and with a simple C program, I have:

  • a version of Raspbian which can be powered off without a safe shutdown
  • a Raspberry Pi which operates a WiFi hotspot with a DHCP server
  • an MP3 player which shows the track number on an LED display
  • a web based user interface and API

Normally, I just use Safari on my iPhone to call up a song over WiFi, but I added a numeric keypad as a backup, in case of WiFi interference or other problems. I’m sure that I could really go to town and make a much more complicated wireless MP3 player out of this … but what I have just seems to work perfectly, so at the moment I’m leaving it well alone.