Tuesday, 9 September 2014

Controlling an AVB network from a Raspberry Pi

I’ve been playing with Audio Video Bridging (https://www.xmos.com/applications/avb) quite a bit lately and historically I’ve always used the AVDECC-Lib controller (https://github.com/audioscience/avdecc-lib) running on my laptop, either under Windows or Linux.

My intention is to create a completely standalone demo so I’ve since compiled the AVDECC-Lib controller for my Raspberry Pi.

The first thing to do is ensure that the GCC compiler is v4.7 :

sudo apt-get install g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7 
sudo update-alternatives --config gcc

Next we need to ensure that we have all of the required applications and modules :

sudo apt-get install cmake
sudo apt-get install git
sudo apt-get install libpcap-dev
sudo apt-get install libreadline-dev

Now we clone AVDECC-Lib from github :

git clone git://github.com/audioscience/avdecc-lib --recursive

Finally we build the library and application :

cd avdecc-lib
cmake .

Now we can run the controller and manage our AVB network :

sudo controller/app/cmdline/avdecccmdline

Note, it is necessary to use sudo because the application requires direct access to the Ethernet PHY.
The controller will now give you a list of network interfaces and you need to choose the appropriate one (2).

AVDECC Controller version: v0.4.9
1 (lo, address: <>)
2 (eth0, address: <>)
Enter the interface number (1-2): 2

That’s it, we are now at the controller command line :

Enter "help" for a list of valid commands.


  1. Hello, I've been trying to make this work but being a Noob have run into dificulties.
    The first problem is this string:git clone git://github.com/audioscience/avdecc-lib --recursive
    I think its been moved so I used this:git clone https://github.com/audioscience/avdecc-lib.git
    Which works up until i go to make and then I get:

    pi@raspberrypi ~/avdecc-lib $ make
    Scanning dependencies of target controller
    [ 2%] Building CXX object controller/lib/CMakeFiles/controller.dir/src/control_ descriptor_imp.cpp.o
    In file included from /home/pi/avdecc-lib/controller/lib/src/entity_descriptor_i mp.h:32:0,
    from /home/pi/avdecc-lib/controller/lib/src/end_station_imp.h:3 3,
    from /home/pi/avdecc-lib/controller/lib/src/control_descriptor_ imp.cpp:33:
    /home/pi/avdecc-lib/controller/lib/src/descriptor_base_imp.h:36:29: fatal error: jdksavdecc_util.h: No such file or directory
    compilation terminated.
    controller/lib/CMakeFiles/controller.dir/build.make:54: recipe for target 'contr oller/lib/CMakeFiles/controller.dir/src/control_descriptor_imp.cpp.o' failed
    make[2]: *** [controller/lib/CMakeFiles/controller.dir/src/control_descriptor_im p.cpp.o] Error 1
    CMakeFiles/Makefile2:93: recipe for target 'controller/lib/CMakeFiles/controller .dir/all' failed
    make[1]: *** [controller/lib/CMakeFiles/controller.dir/all] Error 2
    Makefile:72: recipe for target 'all' failed
    make: *** [all] Error 2

    Can you tell me what I'm doing wrong?



  2. Hi Geoff, You can do it that way but the error is the missing sub library jdksavdecc. You need the --recursive or you will need to clone the library separately, as per the AVDECC-Lib readme : https://github.com/audioscience/avdecc-lib/blob/master/README.md
    All the best,

  3. Hi John,

    Thanks for getting back to me. I will try that and let you know how I get on!

  4. Can I use this to stream Audio from my Raspberry Pi to an AVB network?