How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04

From Opendigitalradio
Jump to: navigation, search

Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04

Contents

Introduction

How to install all the needed software for transmitting DAB+ from scratch on Ubuntu 11.04. Some of it was absolutely not straight-forward in this Linux distro, but with good help from particularly Pascal Charest in the mailing list (thank you Pascal!), I succeeded in the end. So here, I will describe step-by-step how it can be done.

Addition, 2013: This setup has been reported not to work with the latest generation of the WBX board (WBX revision 3).

Notes

Please note:

  • The OS in my case is Ubuntu 11.04, 32 bit version, standard version (not the server version). Hardware is Ettus USRP1 and WBX daughterboard. I have not tried it with other OS or hardware.
  • I only intend to describe how to install all the software, not how to use it after installation. But how to use it is pretty much the same as on the mmbTools live cd, based on Ubuntu 9.04. Note however, that crc-dabmod, crc-dwap.py and crc-dabplus are installed with their names in lower case, so they must be called with lower case names also in your shell script.
  • You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it's "tar xvzf package.tar.gz", and for tar.bz2 it's "tar xvjf package.tar.bz2".
  • I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.
  • There might be some of it which can be done in an easier way, but I'm not that experienced with Linux, and this is what worked for me.

Step 0: Update your system

Begin with "sudo apt-get update" to make sure that you can install all that you need.

Step 1: Installation of Gnuradio 3.3.0

This is needed for USRP1 with WBX.

  1. First "sudo apt-get build-dep gnuradio" (takes quite some time).
  2. Then go to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and install all the dependencies as mentioned in the first step there (for Ubuntu 11.04). Do NOT continue with the next step (Installing GNU Radio) on that page. Instead -
  3. Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (by default it goes to a "Downloads" folder in your homedir, this is fine).
  4. Before you can compile it, you will need to apply a patch as described here: http://lists.nongnu.org/archive/html/discuss-gnuradio/2011-05/msg00108.html But it was not so easy to apply the patch directly from that page, so you might want to just patch it manually instead (in fact, that's what I did) : To patch it manually, open ~/Downloads/gnuradio-3.3.0/usrp2/host/lib/usrp2.cc with a text editor. In line 41, 43 and 73 change "usrp2::usrp2" into just "usrp2". That's all, then save and close.
  5. Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It's "./configure", "make", "make check" and "sudo make install".
  6. Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to "Configuring USRP support" and perform the steps mentioned there. I chose to reboot the pc after this, to be absolutely sure that the USRP support would work. Note: The section also mentions that an UHD driver can be installed from the ettus.com homepage, but you don't need to do that.
  7. At the end of the "Configuring USRP support" section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The "./usrp_benchmark_usb.py" test fails, but it doesn't matter in our case. The "./test_usrp_standard_tx" should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).

Step 2: Crc-DabMod and CRC-Dwap.py

  1. Download CRC-DabMod from the CRC homepage, http://mmbtools.crc.ca/content/view/44/71/ , unpack it and compile as described in ~/Downloads/crc-dabmod-0.2.0/INSTALL . It's "./configure --disable-debug", "make" and "sudo make install".
  2. Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .
  3. Navigate to /usr/local/bin and replace the existing crc-dwap.py with the new one that you have just downloaded (rename it into crc-dwap.py (lower case) so that it's name becomes exactly the same as the old one). Then set it's permissions: "sudo chmod a+x crc-dwap.py".

Step 3: Crc-DabMux and Libfec

  1. First some necessary software: "sudo apt-get install devscripts". Note: This will also install a mail server (postfix) and ask you for a configuration, but, unless you actually want a mail server, you can just select "OK" and then "No configuration" (do not just close the terminal window).
  2. And "sudo apt-get install debhelper" (you might already have this).
  3. Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.
  4. Inside the Libfec 3.0.1-2 package are some more packages and a README file. Be sure to do EXACTLY as described in that README file. After that, also do "sudo dpkg -i ../libfec3-dev_3.0.1-*.deb" (thanks to Chaim Zax for this addition).
  5. Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It's just the usual way, "./configure", "make" and "sudo make install".

Step 4: Buffer software

On the mmbTools live cd, the "bfr" buffer is used between CRC-DabMux and CRC-DabMod. But on this Ubuntu 11.04 system, my experience is, that bfr sometimes stops working and hangs the whole system. Instead I use mbuffer, which works better for me:

  1. "sudo apt-get install mbuffer".

Step 5: CRC-DabPlus

Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don't have or want CRC-DabPlus, you can skip this step. Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don't have to do it again now.

  • Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).
  • As mentioned on http://opendigitalradio.org/index.php/CRC-dabplus there is a bit more to do, and for me it was a bit different in Ubuntu 11.04, this is what works for me: Open /etc/rc.local with a text editor (with root privileges, for example "sudo gedit /etc/rc.local") and insert the following lines before the existing "exit 0":
sudo mount --bind /dev/bus /proc/bus
sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices
sudo /usr/sbin/aksusbd restart
  • Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.
  • Install CRC-DabPlus as described in the README.html.

Step 6: AudioScience ASI504x sound cards

In the README.html which came with CRC-DabPlus is described how to use it together with AudioScience sound cards. It also tells how to install the AudioScience cards, but this is NOT necessary in Ubuntu 11.04. It already works "out of the box". However, the GUI sound control panel does not work correctly with these cards, so if you need to change its configuration, you must use the non-GUI alsamixer (type "alsamixer" in a terminal window).

That's it. Now you're ready to set up your DAB multiplex.

Personal tools