Intro
The deadline for blog post submission is way too close to be ignored so let's get down to business. I've been lately busy with a lot of work-related stuff. All the hobby projects had to be put on hold. But since the summer vacation is getting closer, the calendar schedule for the people working at universities tend to show more free time slots. Here at Lodz University of Technology it's (luckily!) no different.
The project
The project I submitted for Wolfson Road Test has to do with the stuff I do at work, meaning streaming audio and video signals through various networks, in plethora of standards and technologies. Here's the story: there's an unplugged music festival held far, far away in the Polish Beskidy mountains near Muszyna-Złockie village (it's called "Śpiewanki Turystyczne" - you can google it up or visit their FB page). And it's really unplugged - you won't find any electricity anywhere near a 20 minutes walk. The event takes place in a tent throughout the weekend evenings, the light is provided by a few dozens of candles (which is cool in a way, because you can estimate the luminous intensity of the lighting in SI candela units simply by counting all the candles).
Last year I couldn't attend it myself but I wanted to listen to one of the concerts. I asked Bartek Zgorzelski - my long time friend and the spiritus-movens of the the event - if I could do the streaming and he really liked the idea. One week before the festival I started to prepare the equipment.
From the very beginning I wanted to do the streaming using Raspberry Pi, but all the USB sound cards I had were experiencing the "bulk transfer" issue resulting in poor sound quality. Also, the 3G modem I had drew too much power from the USB port and sometimes it didn't start, and sometimes it blew the Pi's polyfuses. Changing the PSU and bridging the fuses took care of the instabilites, but the poor quality audio wasn't easily fixable. In the end I prepared an Intel Atom based convertible laptop with a travel battery, a 12V charger and car battery. The set ran for about 12 hours. After that the car battery couldn't provide enough power to keep charging the batteries and the system shut down. The same amount of power would keep the Pi running for a month I guess...
When I heared about the road test I thought this is possibly the best way to get hands on a great piece of useful hardware without spending a penny. And so my original idea will come to life thanks to element14 - i'm looking forward to do this year's "Śpiewanki" (8-10.08.2014) web audio streaming using a Raspberry Pi and a Wolfson Audio Card.
How I'd like it to work
The goal is to have an autonomous headless system controlled using a web interface through WiFi. The interface will allow to choose between Shoutcast/Icecast and RTMP servers, enter the server URL, change the capture parameters (source, input volume level, number of channels) and encoding parameters (codec, bitrate). It might be handy to have a connection speed test and simple network and cell modem diagnostics (ping, traceroute, cell signal level and connection mode). The internet connection using a EDGE/3G/LTE USB modem should come up automaticaly after boot or after inserting the modem to a USB port. A VU/dbFS/volume meter would be a nice addition.
Prerequisites
Just after receiving the sound card it came to my mind that all three Pis I had at my command were version 1.0. And as such didn't have the P5 connector in place, which is needed for the card to work. So I had to order a new one - version B, revision 2.0 - and after a week it landed in my snail-mailbox. I loaded the Wolfson-prepared Raspbian to a rather slow but large 16 GB SD card I had lying around, connected the network cable, keyboard, monitor and a 2 amp USB PSU (just in case) and of we went.
All the multimedia related packages tend to have a lot of large dependencies, so first thing to do is to resize the root filesystem, because they won't fit in the original image size. You can do this by hand (fdisk and resize2fs) just to prove yourself that - if done carefully - messing with a live mounted filesystem is doable. But then you leave all the low level stuff to raspi-config, and this time I took the easy road.
Before going further I made sure that I'm connected to public IP network and I'm able to log in through SSH. It's likely I'll be working on this project from various strange places besides work and home so this is a must. Remember to change the "stock" password. Have in mind that internet bots possibly have pi/raspberry pair in their dictionaries already.
What's next
In the second part I'll be dealing with instalation and configuration of the WiFi interface, audio capture and encoding. The web interface should come in part III. Please stand by