<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.opendigitalradio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ubr</id>
	<title>OpenDigitalRadio - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.opendigitalradio.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ubr"/>
	<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/Special:Contributions/Ubr"/>
	<updated>2026-04-26T01:29:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1550</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1550"/>
		<updated>2020-09-04T03:27:41Z</updated>

		<summary type="html">&lt;p&gt;Ubr: Altered the section about using a named fifo to explain when it&amp;#039;s necessary and when not. Also adjusted the file names in that section, new names with spi instead of epg.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie. Nick Piggott has contributed with some additions.&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB SPI from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* Confused about EPG and SPI? In this context, EPG and SPI are basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This tool uses RadioDNS to locate and acquire Service Information (SI.xml), Programme Information (PI.xml) and Logos.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each station you want to add to the SPI must be registered in RadioDNS using the correct information (Ensemble ID, Service ID, Service Component ID), and have correctly formatted SI, PI and logo files in PNG format. Find out more at https://radiodns.org/technical/documentation/#howto&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install python-crcmod python-bitarray python-dateutil python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 5: pyradiodns====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/radiodns/pyradiodns and unpack to a folder, e.g. /home/user/pyradiodns-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
 pip install setuptools&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 8: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/local/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your SPI (EPG)===&lt;br /&gt;
&lt;br /&gt;
====Generating your SPI====&lt;br /&gt;
&lt;br /&gt;
Odr-radioepg-bridge is a command-line tool, which will:&lt;br /&gt;
* First read your mux.conf (from your ODR-DabMux configuration) to get information about your services.&lt;br /&gt;
* Then try to fetch SPI data for your services from the internet using RadioDNS.&lt;br /&gt;
* And lastly generate an output file containing a complete SPI.&lt;br /&gt;
&lt;br /&gt;
If you type &amp;quot;generate-epg -h&amp;quot; you will get a list of available command-line arguments:&lt;br /&gt;
&lt;br /&gt;
 usage: generate-epg [-h] [-o OUTPUT] [-X] [-d DAYS] [-p PACKET_SIZE]&lt;br /&gt;
                     [-a PACKET_ADDRESS] [-D]&lt;br /&gt;
                     f&lt;br /&gt;
 &lt;br /&gt;
 Encodes an SPI bitstream for services in a multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
   f                  multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
   -h, --help         show this help message and exit&lt;br /&gt;
   -o OUTPUT          output bitstream file&lt;br /&gt;
   -X                 turn debug on&lt;br /&gt;
   -d DAYS            number of days ahead to encode schedule files&lt;br /&gt;
   -p PACKET_SIZE     Packet size in bytes&lt;br /&gt;
   -a PACKET_ADDRESS  Packet address&lt;br /&gt;
   -D                 output Datagroups instead of Packets&lt;br /&gt;
&lt;br /&gt;
The positional argument tells the tool where to find your mux.conf.&lt;br /&gt;
The other arguments are optional, and some default values will be used if you don&amp;#039;t set them:&lt;br /&gt;
&lt;br /&gt;
* -o can be used to set filename and path to your output file (your SPI). Default is output.dat, placed in the folder from where you run the tool.&lt;br /&gt;
* -d is the number of days of programme schedule you want in you SPI. From 1 til 4 days, default is 2.&lt;br /&gt;
* -p is packet size. Available values are 24, 48, 72 and 96. Default is 96. Which value you should use, depends on the bitrate in which you are broadcasting your SPI (see below).&lt;br /&gt;
* -a is the packet address for your SPI. Default is 1, which will normally be fine. Important is, that you must set the same address in your mux.conf (see below).&lt;br /&gt;
* -D will tell the script to output Datagroups instead of Packets. This is useful for some commercial multiplexers or in case you want to broadcast your SPI as X-PAD instead of packet data. Note: You do not need this if you plan to broadcast your SPI the way it&amp;#039;s described on this wiki page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
If your mux.conf is placed in /home/user/odr/config/mux.conf, and you want 4 days in your SPI (today and the next 3 days) and you want to broadcast it in 16 kbit/s, your command line could look like this:&lt;br /&gt;
&lt;br /&gt;
 generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf&lt;br /&gt;
&lt;br /&gt;
This will generate a file named output.dat containing your SPI. In this example, I have set the packet size to 48, which is suitable for 16 kbit/s. I have not set the packet address, which means that the default value of 1 will be used.&lt;br /&gt;
&lt;br /&gt;
====Packet sizes and bitrates====&lt;br /&gt;
&lt;br /&gt;
The packet size, which you set when you generate your SPI, should match the bitrate in which you intend to broadcast it. If the packet size is too large, your SPI will not be transmitted. If the packet size is too small, your SPI will (probably) be transmitted, but it will be slower than necessary, because more space will be used for packet headers and maybe partly empty data packets. I will recommend these values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bitrate&lt;br /&gt;
! Packet size&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 96&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Broadcasting your SPI====&lt;br /&gt;
&lt;br /&gt;
To broadcast your SPI using ODR-DabMux, create a packet data service in your mux.conf like in this example:&lt;br /&gt;
&lt;br /&gt;
In the services section:&lt;br /&gt;
&lt;br /&gt;
 srv-spi {&lt;br /&gt;
 label &amp;quot;EPG &amp;amp; Logos&amp;quot;&lt;br /&gt;
 shortlabel &amp;quot;EPGLogos&amp;quot;&lt;br /&gt;
 ; the service-ID consists of 8 hex digits for packet data services. Usually the first two digits will&lt;br /&gt;
 ; be the same as your ECC, and the third digit will be the same as the first digit in your Ensemble Id.&lt;br /&gt;
 id 0xe1912345&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the subchannels section:&lt;br /&gt;
&lt;br /&gt;
 sub-spi {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for SPI.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your SPI again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output file from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/output.dat&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
And in the components section (if you are using version 3.1.1 or earlier of odr-dabmux)&lt;br /&gt;
&lt;br /&gt;
 comp-spi {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-spi&lt;br /&gt;
 subchannel sub-spi&lt;br /&gt;
 figtype 0x7&lt;br /&gt;
 ; The address must be the same as your packet address set when you generate the SPI (default value is 1).&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are using version 3.1.2 or later of odr-dabmux, the construction of the component section is slightly different&lt;br /&gt;
&lt;br /&gt;
 comp-spi {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-spi&lt;br /&gt;
 subchannel sub-spi&lt;br /&gt;
 user-applications {&lt;br /&gt;
   userapp &amp;quot;spi&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now (re)start your ODR-DabMux, and your SPI should be transmitted.&lt;br /&gt;
&lt;br /&gt;
===Updating your SPI automatically every day===&lt;br /&gt;
&lt;br /&gt;
====Feeding the SPI from a fifo will ensure that you can update it without restarting the MUX====&lt;br /&gt;
&lt;br /&gt;
While the setup shown above will allow you to broadcast your SPI, it &amp;#039;&amp;#039;might&amp;#039;&amp;#039; not allow you to update your SPI without having to restart your MUX.&lt;br /&gt;
* If the SPI output file is &amp;#039;&amp;#039;rewritten&amp;#039;&amp;#039;, the new content will be picked up by ODR-DabMux automatically, and your SPI will immediately be updated. This will be the case if you use generate-epg to generate a new file directly upon the the old one.&lt;br /&gt;
* However, if the SPI output file is &amp;#039;&amp;#039;replaced&amp;#039;&amp;#039;, the new file will &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; be picked up by ODR-DabMux, until you restart it. This will be the case, if you generate a new file elsewhere (e.g. in a different folder or on another machine) and then &amp;#039;&amp;#039;copy&amp;#039;&amp;#039; it into where the old one is.&lt;br /&gt;
&lt;br /&gt;
To get around this, and be sure that you can always update your SPI, any way you want, you can feed your SPI to ODR-DabMux from a named fifo instead of a file.&lt;br /&gt;
&lt;br /&gt;
Navigate to the folder where you have your SPI and create a fifo like this:&lt;br /&gt;
&lt;br /&gt;
 mkfifo spififo&lt;br /&gt;
&lt;br /&gt;
In the subchannel section of your mux.conf, you should replace your SPI file (output.dat) with your fifo, and also add a new line, &amp;quot;nonblock true&amp;quot;, so that your SPI subchannel looks like this:&lt;br /&gt;
&lt;br /&gt;
 sub-spi {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for SPI.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your SPI again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/spififo&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 nonblock true&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Your SPI must be continously sent to the fifo. You can make a shell script for that. Create a file, sendspi.sh, with this content:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
 while :&lt;br /&gt;
 do&lt;br /&gt;
  &lt;br /&gt;
 cat /home/user/odr-radioepg-bridge-master/output.dat &amp;gt;&amp;gt; /home/user/odr-radioepg-bridge-master/spififo&lt;br /&gt;
  &lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
And make it executable (chmod +x sendspi.sh).&lt;br /&gt;
&lt;br /&gt;
This script must be running all the time. If you&amp;#039;re already using Supervisor to keep your MUX running (as described here: https://github.com/Opendigitalradio/dab-scripts), it&amp;#039;s easy to also use supervisor for this script. Create a new file, sendspi.conf, in your /home/user/odr/config/supervisor folder with this content:&lt;br /&gt;
&lt;br /&gt;
 [program:sendspi]&lt;br /&gt;
 command=bash -c &amp;quot;/home/user/odr-radioepg-bridge-master/sendspi.sh&amp;quot;&lt;br /&gt;
 autostart=true&lt;br /&gt;
 autorestart=true&lt;br /&gt;
 startretries=99999&lt;br /&gt;
 priority=10&lt;br /&gt;
 stderr_logfile=/dev/stdout&lt;br /&gt;
 stdout_logfile=/dev/stdout&lt;br /&gt;
&lt;br /&gt;
Then run these commands:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /home/user/odr/config/supervisor/sendspi.conf /etc/supervisor/conf.d/sendspi.conf&lt;br /&gt;
 sudo supervisorctl reread&lt;br /&gt;
 sudo supervisorctl update&lt;br /&gt;
&lt;br /&gt;
Now your SPI is sent to ODR-DabMux from the fifo, and you will now be able to update your SPI, any way you want, without having to restart ODR-DabMux.&lt;br /&gt;
&lt;br /&gt;
====Updating your SPI automatically every day====&lt;br /&gt;
&lt;br /&gt;
You can update your SPI every 24 hours by adding a new daily task to cron.&lt;br /&gt;
&lt;br /&gt;
Create a new file&lt;br /&gt;
&lt;br /&gt;
 /etc/cron.daily/spi&lt;br /&gt;
&lt;br /&gt;
with the single line (with the same parameters as when you generate your SPI yourself)&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
By default, the cron job will run every day at around 06:00. If you want your SPI to update more frequently (every 4 hours), you could add it to the user cron job with&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and add the line&lt;br /&gt;
&lt;br /&gt;
 0 */4 * * * /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The SPI creates new MOT TransportIDs for every object each time it is run. A receiver will not recognise that objects have been previously received and cached. If there is an interruption in reception, the SPI will be incomplete. The more frequently you update the SPI, more likely it is that a receiver will not be able to utilise the cached objects.&lt;br /&gt;
&lt;br /&gt;
===Some observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (at least those up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1549</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1549"/>
		<updated>2020-08-03T23:43:38Z</updated>

		<summary type="html">&lt;p&gt;Ubr: Added installation of python setuptools in step 5 for installation of pyradiodns&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie. Nick Piggott has contributed with some additions.&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB SPI from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* Confused about EPG and SPI? In this context, EPG and SPI are basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This tool uses RadioDNS to locate and acquire Service Information (SI.xml), Programme Information (PI.xml) and Logos.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each station you want to add to the SPI must be registered in RadioDNS using the correct information (Ensemble ID, Service ID, Service Component ID), and have correctly formatted SI, PI and logo files in PNG format. Find out more at https://radiodns.org/technical/documentation/#howto&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install python-crcmod python-bitarray python-dateutil python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 5: pyradiodns====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/radiodns/pyradiodns and unpack to a folder, e.g. /home/user/pyradiodns-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
 pip install setuptools&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 8: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/local/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your SPI (EPG)===&lt;br /&gt;
&lt;br /&gt;
====Generating your SPI====&lt;br /&gt;
&lt;br /&gt;
Odr-radioepg-bridge is a command-line tool, which will:&lt;br /&gt;
* First read your mux.conf (from your ODR-DabMux configuration) to get information about your services.&lt;br /&gt;
* Then try to fetch SPI data for your services from the internet using RadioDNS.&lt;br /&gt;
* And lastly generate an output file containing a complete SPI.&lt;br /&gt;
&lt;br /&gt;
If you type &amp;quot;generate-epg -h&amp;quot; you will get a list of available command-line arguments:&lt;br /&gt;
&lt;br /&gt;
 usage: generate-epg [-h] [-o OUTPUT] [-X] [-d DAYS] [-p PACKET_SIZE]&lt;br /&gt;
                     [-a PACKET_ADDRESS] [-D]&lt;br /&gt;
                     f&lt;br /&gt;
 &lt;br /&gt;
 Encodes an SPI bitstream for services in a multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
   f                  multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
   -h, --help         show this help message and exit&lt;br /&gt;
   -o OUTPUT          output bitstream file&lt;br /&gt;
   -X                 turn debug on&lt;br /&gt;
   -d DAYS            number of days ahead to encode schedule files&lt;br /&gt;
   -p PACKET_SIZE     Packet size in bytes&lt;br /&gt;
   -a PACKET_ADDRESS  Packet address&lt;br /&gt;
   -D                 output Datagroups instead of Packets&lt;br /&gt;
&lt;br /&gt;
The positional argument tells the tool where to find your mux.conf.&lt;br /&gt;
The other arguments are optional, and some default values will be used if you don&amp;#039;t set them:&lt;br /&gt;
&lt;br /&gt;
* -o can be used to set filename and path to your output file (your SPI). Default is output.dat, placed in the folder from where you run the tool.&lt;br /&gt;
* -d is the number of days of programme schedule you want in you SPI. From 1 til 4 days, default is 2.&lt;br /&gt;
* -p is packet size. Available values are 24, 48, 72 and 96. Default is 96. Which value you should use, depends on the bitrate in which you are broadcasting your SPI (see below).&lt;br /&gt;
* -a is the packet address for your SPI. Default is 1, which will normally be fine. Important is, that you must set the same address in your mux.conf (see below).&lt;br /&gt;
* -D will tell the script to output Datagroups instead of Packets. This is useful for some commercial multiplexers or in case you want to broadcast your SPI as X-PAD instead of packet data. Note: You do not need this if you plan to broadcast your SPI the way it&amp;#039;s described on this wiki page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
If your mux.conf is placed in /home/user/odr/config/mux.conf, and you want 4 days in your SPI (today and the next 3 days) and you want to broadcast it in 16 kbit/s, your command line could look like this:&lt;br /&gt;
&lt;br /&gt;
 generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf&lt;br /&gt;
&lt;br /&gt;
This will generate a file named output.dat containing your SPI. In this example, I have set the packet size to 48, which is suitable for 16 kbit/s. I have not set the packet address, which means that the default value of 1 will be used.&lt;br /&gt;
&lt;br /&gt;
====Packet sizes and bitrates====&lt;br /&gt;
&lt;br /&gt;
The packet size, which you set when you generate your SPI, should match the bitrate in which you intend to broadcast it. If the packet size is too large, your SPI will not be transmitted. If the packet size is too small, your SPI will (probably) be transmitted, but it will be slower than necessary, because more space will be used for packet headers and maybe partly empty data packets. I will recommend these values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bitrate&lt;br /&gt;
! Packet size&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 96&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Broadcasting your SPI====&lt;br /&gt;
&lt;br /&gt;
To broadcast your SPI using ODR-DabMux, create a packet data service in your mux.conf like in this example:&lt;br /&gt;
&lt;br /&gt;
In the services section:&lt;br /&gt;
&lt;br /&gt;
 srv-spi {&lt;br /&gt;
 label &amp;quot;EPG &amp;amp; Logos&amp;quot;&lt;br /&gt;
 shortlabel &amp;quot;EPGLogos&amp;quot;&lt;br /&gt;
 ; the service-ID consists of 8 hex digits for packet data services. Usually the first two digits will&lt;br /&gt;
 ; be the same as your ECC, and the third digit will be the same as the first digit in your Ensemble Id.&lt;br /&gt;
 id 0xe1912345&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the subchannels section:&lt;br /&gt;
&lt;br /&gt;
 sub-spi {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for SPI.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your SPI again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output file from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/output.dat&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
And in the components section (if you are using version 3.1.1 or earlier of odr-dabmux)&lt;br /&gt;
&lt;br /&gt;
 comp-spi {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-spi&lt;br /&gt;
 subchannel sub-spi&lt;br /&gt;
 figtype 0x7&lt;br /&gt;
 ; The address must be the same as your packet address set when you generate the SPI (default value is 1).&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are using version 3.1.2 or later of odr-dabmux, the construction of the component section is slightly different&lt;br /&gt;
&lt;br /&gt;
 comp-spi {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-spi&lt;br /&gt;
 subchannel sub-spi&lt;br /&gt;
 user-applications {&lt;br /&gt;
   userapp &amp;quot;spi&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now (re)start your ODR-DabMux, and your SPI should be transmitted.&lt;br /&gt;
&lt;br /&gt;
===Updating your SPI automatically every day===&lt;br /&gt;
&lt;br /&gt;
====Feeding the SPI from a fifo to be able to update it without restarting the MUX====&lt;br /&gt;
&lt;br /&gt;
While the setup shown above will allow you to broadcast your SPI, it will not allow you to update your SPI without having to restart your MUX. To get around this, you can feed your SPI to ODR-DabMux from a named fifo instead of a file.&lt;br /&gt;
&lt;br /&gt;
Navigate to the folder where you have your SPI and create a fifo like this:&lt;br /&gt;
&lt;br /&gt;
 mkfifo epgfifo&lt;br /&gt;
&lt;br /&gt;
In the subchannel section of your mux.conf, you should replace your SPI file (output.dat) with your fifo, and also add a new line, &amp;quot;nonblock true&amp;quot;, so that your SPI subchannel looks like this:&lt;br /&gt;
&lt;br /&gt;
 sub-spi {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for SPI.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your SPI again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/epgfifo&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 nonblock true&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Your SPI must be continously sent to the fifo. You can make a shell script for that. Create a file, sendepg.sh, with this content:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
 while :&lt;br /&gt;
 do&lt;br /&gt;
  &lt;br /&gt;
 cat /home/user/odr-radioepg-bridge-master/output.dat &amp;gt;&amp;gt; /home/user/odr-radioepg-bridge-master/epgfifo&lt;br /&gt;
  &lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
And make it executable (chmod +x sendepg.sh).&lt;br /&gt;
&lt;br /&gt;
This script must be running all the time. If you&amp;#039;re already using Supervisor to keep your MUX running (as described here: https://github.com/Opendigitalradio/dab-scripts), it&amp;#039;s easy to also use supervisor for this script. Create a new file, sendepg.conf, in your /home/user/odr/config/supervisor folder with this content:&lt;br /&gt;
&lt;br /&gt;
 [program:sendepg]&lt;br /&gt;
 command=bash -c &amp;quot;/home/user/odr-radioepg-bridge-master/sendepg.sh&amp;quot;&lt;br /&gt;
 autostart=true&lt;br /&gt;
 autorestart=true&lt;br /&gt;
 startretries=99999&lt;br /&gt;
 priority=10&lt;br /&gt;
 stderr_logfile=/dev/stdout&lt;br /&gt;
 stdout_logfile=/dev/stdout&lt;br /&gt;
&lt;br /&gt;
Then run these commands:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /home/user/odr/config/supervisor/sendepg.conf /etc/supervisor/conf.d/sendepg.conf&lt;br /&gt;
 sudo supervisorctl reread&lt;br /&gt;
 sudo supervisorctl update&lt;br /&gt;
&lt;br /&gt;
Now your SPI is sent to ODR-DabMux from the fifo, and you will now be able to update your SPI without having to restart ODR-DabMux.&lt;br /&gt;
&lt;br /&gt;
====Updating your SPI automatically every day====&lt;br /&gt;
&lt;br /&gt;
You can update your SPI every 24 hours by adding a new daily task to cron.&lt;br /&gt;
&lt;br /&gt;
Create a new file&lt;br /&gt;
&lt;br /&gt;
 /etc/cron.daily/spi&lt;br /&gt;
&lt;br /&gt;
with the single line (with the same parameters as when you generate your SPI yourself)&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
By default, the cron job will run every day at around 06:00. If you want your SPI to update more frequently (every 4 hours), you could add it to the user cron job with&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and add the line&lt;br /&gt;
&lt;br /&gt;
 0 */4 * * * /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The SPI creates new MOT TransportIDs for every object each time it is run. A receiver will not recognise that objects have been previously received and cached. If there is an interruption in reception, the SPI will be incomplete. The more frequently you update the SPI, more likely it is that a receiver will not be able to utilise the cached objects.&lt;br /&gt;
&lt;br /&gt;
===Some observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (at least those up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1548</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1548"/>
		<updated>2020-07-26T00:50:02Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie. Nick Piggott has contributed with some additions.&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB SPI from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* Confused about EPG and SPI? In this context, EPG and SPI are basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This tool uses RadioDNS to locate and acquire Service Information (SI.xml), Programme Information (PI.xml) and Logos.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each station you want to add to the SPI must be registered in RadioDNS using the correct information (Ensemble ID, Service ID, Service Component ID), and have correctly formatted SI, PI and logo files in PNG format. Find out more at https://radiodns.org/technical/documentation/#howto&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install python-crcmod python-bitarray python-dateutil python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 5: pyradiodns====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/radiodns/pyradiodns and unpack to a folder, e.g. /home/user/pyradiodns-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 8: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/local/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your SPI (EPG)===&lt;br /&gt;
&lt;br /&gt;
====Generating your SPI====&lt;br /&gt;
&lt;br /&gt;
Odr-radioepg-bridge is a command-line tool, which will:&lt;br /&gt;
* First read your mux.conf (from your ODR-DabMux configuration) to get information about your services.&lt;br /&gt;
* Then try to fetch SPI data for your services from the internet using RadioDNS.&lt;br /&gt;
* And lastly generate an output file containing a complete SPI.&lt;br /&gt;
&lt;br /&gt;
If you type &amp;quot;generate-epg -h&amp;quot; you will get a list of available command-line arguments:&lt;br /&gt;
&lt;br /&gt;
 usage: generate-epg [-h] [-o OUTPUT] [-X] [-d DAYS] [-p PACKET_SIZE]&lt;br /&gt;
                     [-a PACKET_ADDRESS] [-D]&lt;br /&gt;
                     f&lt;br /&gt;
 &lt;br /&gt;
 Encodes an SPI bitstream for services in a multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
   f                  multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
   -h, --help         show this help message and exit&lt;br /&gt;
   -o OUTPUT          output bitstream file&lt;br /&gt;
   -X                 turn debug on&lt;br /&gt;
   -d DAYS            number of days ahead to encode schedule files&lt;br /&gt;
   -p PACKET_SIZE     Packet size in bytes&lt;br /&gt;
   -a PACKET_ADDRESS  Packet address&lt;br /&gt;
   -D                 output Datagroups instead of Packets&lt;br /&gt;
&lt;br /&gt;
The positional argument tells the tool where to find your mux.conf.&lt;br /&gt;
The other arguments are optional, and some default values will be used if you don&amp;#039;t set them:&lt;br /&gt;
&lt;br /&gt;
* -o can be used to set filename and path to your output file (your SPI). Default is output.dat, placed in the folder from where you run the tool.&lt;br /&gt;
* -d is the number of days of programme schedule you want in you SPI. From 1 til 4 days, default is 2.&lt;br /&gt;
* -p is packet size. Available values are 24, 48, 72 and 96. Default is 96. Which value you should use, depends on the bitrate in which you are broadcasting your SPI (see below).&lt;br /&gt;
* -a is the packet address for your SPI. Default is 1, which will normally be fine. Important is, that you must set the same address in your mux.conf (see below).&lt;br /&gt;
* -D will tell the script to output Datagroups instead of Packets. This is useful for some commercial multiplexers or in case you want to broadcast your SPI as X-PAD instead of packet data. Note: You do not need this if you plan to broadcast your SPI the way it&amp;#039;s described on this wiki page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
If your mux.conf is placed in /home/user/odr/config/mux.conf, and you want 4 days in your SPI (today and the next 3 days) and you want to broadcast it in 16 kbit/s, your command line could look like this:&lt;br /&gt;
&lt;br /&gt;
 generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf&lt;br /&gt;
&lt;br /&gt;
This will generate a file named output.dat containing your SPI. In this example, I have set the packet size to 48, which is suitable for 16 kbit/s. I have not set the packet address, which means that the default value of 1 will be used.&lt;br /&gt;
&lt;br /&gt;
====Packet sizes and bitrates====&lt;br /&gt;
&lt;br /&gt;
The packet size, which you set when you generate your SPI, should match the bitrate in which you intend to broadcast it. If the packet size is too large, your SPI will not be transmitted. If the packet size is too small, your SPI will (probably) be transmitted, but it will be slower than necessary, because more space will be used for packet headers and maybe partly empty data packets. I will recommend these values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bitrate&lt;br /&gt;
! Packet size&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 96&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Broadcasting your SPI====&lt;br /&gt;
&lt;br /&gt;
To broadcast your SPI using ODR-DabMux, create a packet data service in your mux.conf like in this example:&lt;br /&gt;
&lt;br /&gt;
In the services section:&lt;br /&gt;
&lt;br /&gt;
 srv-spi {&lt;br /&gt;
 label &amp;quot;EPG &amp;amp; Logos&amp;quot;&lt;br /&gt;
 shortlabel &amp;quot;EPGLogos&amp;quot;&lt;br /&gt;
 ; the service-ID consists of 8 hex digits for packet data services. Usually the first two digits will&lt;br /&gt;
 ; be the same as your ECC, and the third digit will be the same as the first digit in your Ensemble Id.&lt;br /&gt;
 id 0xe1912345&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the subchannels section:&lt;br /&gt;
&lt;br /&gt;
 sub-spi {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for SPI.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your SPI again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output file from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/output.dat&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
And in the components section (if you are using version 3.1.1 or earlier of odr-dabmux)&lt;br /&gt;
&lt;br /&gt;
 comp-spi {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-spi&lt;br /&gt;
 subchannel sub-spi&lt;br /&gt;
 figtype 0x7&lt;br /&gt;
 ; The address must be the same as your packet address set when you generate the SPI (default value is 1).&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If you are using version 3.1.2 or later of odr-dabmux, the construction of the component section is slightly different&lt;br /&gt;
&lt;br /&gt;
 comp-spi {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-spi&lt;br /&gt;
 subchannel sub-spi&lt;br /&gt;
 user-applications {&lt;br /&gt;
   userapp &amp;quot;spi&amp;quot;&lt;br /&gt;
   }&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now (re)start your ODR-DabMux, and your SPI should be transmitted.&lt;br /&gt;
&lt;br /&gt;
===Updating your SPI automatically every day===&lt;br /&gt;
&lt;br /&gt;
====Feeding the SPI from a fifo to be able to update it without restarting the MUX====&lt;br /&gt;
&lt;br /&gt;
While the setup shown above will allow you to broadcast your SPI, it will not allow you to update your SPI without having to restart your MUX. To get around this, you can feed your SPI to ODR-DabMux from a named fifo instead of a file.&lt;br /&gt;
&lt;br /&gt;
Navigate to the folder where you have your SPI and create a fifo like this:&lt;br /&gt;
&lt;br /&gt;
 mkfifo epgfifo&lt;br /&gt;
&lt;br /&gt;
In the subchannel section of your mux.conf, you should replace your SPI file (output.dat) with your fifo, and also add a new line, &amp;quot;nonblock true&amp;quot;, so that your SPI subchannel looks like this:&lt;br /&gt;
&lt;br /&gt;
 sub-spi {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for SPI.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your SPI again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/epgfifo&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 nonblock true&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Your SPI must be continously sent to the fifo. You can make a shell script for that. Create a file, sendepg.sh, with this content:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
 while :&lt;br /&gt;
 do&lt;br /&gt;
  &lt;br /&gt;
 cat /home/user/odr-radioepg-bridge-master/output.dat &amp;gt;&amp;gt; /home/user/odr-radioepg-bridge-master/epgfifo&lt;br /&gt;
  &lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
And make it executable (chmod +x sendepg.sh).&lt;br /&gt;
&lt;br /&gt;
This script must be running all the time. If you&amp;#039;re already using Supervisor to keep your MUX running (as described here: https://github.com/Opendigitalradio/dab-scripts), it&amp;#039;s easy to also use supervisor for this script. Create a new file, sendepg.conf, in your /home/user/odr/config/supervisor folder with this content:&lt;br /&gt;
&lt;br /&gt;
 [program:sendepg]&lt;br /&gt;
 command=bash -c &amp;quot;/home/user/odr-radioepg-bridge-master/sendepg.sh&amp;quot;&lt;br /&gt;
 autostart=true&lt;br /&gt;
 autorestart=true&lt;br /&gt;
 startretries=99999&lt;br /&gt;
 priority=10&lt;br /&gt;
 stderr_logfile=/dev/stdout&lt;br /&gt;
 stdout_logfile=/dev/stdout&lt;br /&gt;
&lt;br /&gt;
Then run these commands:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /home/user/odr/config/supervisor/sendepg.conf /etc/supervisor/conf.d/sendepg.conf&lt;br /&gt;
 sudo supervisorctl reread&lt;br /&gt;
 sudo supervisorctl update&lt;br /&gt;
&lt;br /&gt;
Now your SPI is sent to ODR-DabMux from the fifo, and you will now be able to update your SPI without having to restart ODR-DabMux.&lt;br /&gt;
&lt;br /&gt;
====Updating your SPI automatically every day====&lt;br /&gt;
&lt;br /&gt;
You can update your SPI every 24 hours by adding a new daily task to cron.&lt;br /&gt;
&lt;br /&gt;
Create a new file&lt;br /&gt;
&lt;br /&gt;
 /etc/cron.daily/spi&lt;br /&gt;
&lt;br /&gt;
with the single line (with the same parameters as when you generate your SPI yourself)&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
By default, the cron job will run every day at around 06:00. If you want your SPI to update more frequently (every 4 hours), you could add it to the user cron job with&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and add the line&lt;br /&gt;
&lt;br /&gt;
 0 */4 * * * /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The SPI creates new MOT TransportIDs for every object each time it is run. A receiver will not recognise that objects have been previously received and cached. If there is an interruption in reception, the SPI will be incomplete. The more frequently you update the SPI, more likely it is that a receiver will not be able to utilise the cached objects.&lt;br /&gt;
&lt;br /&gt;
===Some observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (at least those up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1536</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1536"/>
		<updated>2020-07-23T22:21:13Z</updated>

		<summary type="html">&lt;p&gt;Ubr: Scripts have been moved to Opendigitalradio in Github, and python pip is not used anymore. The section about problems and solutions is removed, because the mentioned problems have been fixed.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie. Nick Piggott has contributed with some additions.&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB EPG from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* Confused about EPG and SPI? In this context, EPG and SPI are basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This tool uses RadioDNS to locate and acquire Service Information (SI.xml), Programme Information (PI.xml) and Logos.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each station you want to add to the EPG must be registered in RadioDNS using the correct information (Ensemble ID, Service ID, Service Component ID), and have correctly formatted SI, PI and logo files in PNG format. Find out more at https://radiodns.org/technical/documentation/#howto&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-crcmod&lt;br /&gt;
 sudo apt-get install python-bitarray&lt;br /&gt;
 sudo apt-get install python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-dateutil&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 5: pyradiodns====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/radiodns/pyradiodns and unpack to a folder, e.g. /home/user/pyradiodns-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 8: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/Opendigitalradio/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/local/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your EPG===&lt;br /&gt;
&lt;br /&gt;
====Generating your EPG====&lt;br /&gt;
&lt;br /&gt;
Odr-radioepg-bridge is a command-line tool, which will:&lt;br /&gt;
* First read your mux.conf (from your ODR-DabMux configuration) to get information about your services.&lt;br /&gt;
* Then try to fetch SPI data for your services from the internet using RadioDNS.&lt;br /&gt;
* And lastly generate an output file containing a complete EPG.&lt;br /&gt;
&lt;br /&gt;
If you type &amp;quot;generate-epg -h&amp;quot; you will get a list of available command-line arguments:&lt;br /&gt;
&lt;br /&gt;
 usage: generate-epg [-h] [-o OUTPUT] [-X] [-d DAYS] [-p PACKET_SIZE]&lt;br /&gt;
                     [-a PACKET_ADDRESS] [-D]&lt;br /&gt;
                     f&lt;br /&gt;
 &lt;br /&gt;
 Encodes an SPI bitstream for services in a multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
   f                  multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
   -h, --help         show this help message and exit&lt;br /&gt;
   -o OUTPUT          output bitstream file&lt;br /&gt;
   -X                 turn debug on&lt;br /&gt;
   -d DAYS            number of days ahead to encode schedule files&lt;br /&gt;
   -p PACKET_SIZE     Packet size in bytes&lt;br /&gt;
   -a PACKET_ADDRESS  Packet address&lt;br /&gt;
   -D                 output Datagroups instead of Packets&lt;br /&gt;
&lt;br /&gt;
The positional argument tells the tool where to find your mux.conf.&lt;br /&gt;
The other arguments are optional, and some default values will be used if you don&amp;#039;t set them:&lt;br /&gt;
&lt;br /&gt;
* -o can be used to set filename and path to your output file (your EPG). Default is output.dat, placed in the folder from where you run the tool.&lt;br /&gt;
* -d is the number of days of programme schedule you want in you EPG. From 1 til 4 days, default is 2.&lt;br /&gt;
* -p is packet size. Available values are 24, 48, 72 and 96. Default is 96. Which value you should use, depends on the bitrate in which you are broadcasting your EPG (see below).&lt;br /&gt;
* -a is the packet address for your EPG. Default is 1, which will normally be fine. Important is, that you must set the same address in your mux.conf (see below).&lt;br /&gt;
* -D will tell the script to output Datagroups instead of Packets. This is useful for some commercial multiplexers or in case you want to broadcast your EPG as X-PAD instead of packet data. Note: You do not need this if you plan to broadcast your EPG the way it&amp;#039;s described on this wiki page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
If your mux.conf is placed in /home/user/odr/config/mux.conf, and you want 4 days in your EPG (today and the next 3 days) and you want to broadcast it in 16 kbit/s, your command line could look like this:&lt;br /&gt;
&lt;br /&gt;
 generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf&lt;br /&gt;
&lt;br /&gt;
This will generate a file named output.dat containing your EPG. In this example, I have set the packet size to 48, which is suitable for 16 kbit/s. I have not set the packet address, which means that the default value of 1 will be used.&lt;br /&gt;
&lt;br /&gt;
====Packet sizes and bitrates====&lt;br /&gt;
&lt;br /&gt;
The packet size, which you set when you generate your EPG, should match the bitrate in which you intend to broadcast it. If the packet size is too large, your EPG will not be broadcasted. If the packet size is too small, your EPG will (probably) be broadcasted, but it will be slower than necessary, because more space will be used for packet headers and maybe partly empty data packets. I will recommend these values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bitrate&lt;br /&gt;
! Packet size&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 96&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Broadcasting your EPG====&lt;br /&gt;
&lt;br /&gt;
To broadcast your EPG using ODR-DabMux, create a packet data service in your mux.conf like in this example:&lt;br /&gt;
&lt;br /&gt;
In the services section:&lt;br /&gt;
&lt;br /&gt;
 srv-epg {&lt;br /&gt;
 label &amp;quot;EPG&amp;quot;&lt;br /&gt;
 shortlabel &amp;quot;EPG&amp;quot;&lt;br /&gt;
 ; the service-ID consists of 8 hex digits for packet data services. Usually the first two digits will&lt;br /&gt;
 ; be the same as your ECC, and the third digit will be the same as the first digit in your Ensemble Id.&lt;br /&gt;
 id 0xe1912345&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the subchannels section:&lt;br /&gt;
&lt;br /&gt;
 sub-epg {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for EPG.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your EPG again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output file from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/output.dat&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
And in the components section:&lt;br /&gt;
&lt;br /&gt;
 comp-epg {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-epg&lt;br /&gt;
 subchannel sub-epg&lt;br /&gt;
 figtype 0x7&lt;br /&gt;
 ; The address must be the same as your packet address set when you generate the EPG (default value is 1).&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now (re)start your ODR-DabMux, and your EPG should be broadcasted.&lt;br /&gt;
&lt;br /&gt;
===Updating your EPG automatically every day===&lt;br /&gt;
&lt;br /&gt;
====Feeding the EPG from a fifo to be able to update it without restarting the MUX====&lt;br /&gt;
&lt;br /&gt;
While the setup shown above will allow you to broadcast your EPG, it will not allow you to update your EPG without having to restart your MUX. To get around this, you can feed your EPG to ODR-DabMux from a named fifo instead of a file.&lt;br /&gt;
&lt;br /&gt;
Navigate to the folder where you have your EPG and create a fifo like this:&lt;br /&gt;
&lt;br /&gt;
 mkfifo epgfifo&lt;br /&gt;
&lt;br /&gt;
In the subchannel section of your mux.conf, you should replace your EPG file (output.dat) with your fifo, and also add a new line, &amp;quot;nonblock true&amp;quot;, so that your EPG subchannel looks like this:&lt;br /&gt;
&lt;br /&gt;
 sub-epg {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for EPG.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your EPG again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/epgfifo&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 nonblock true&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Your EPG must be continously sent to the fifo. You can make a shell script for that. Create a file, sendepg.sh, with this content:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
 while :&lt;br /&gt;
 do&lt;br /&gt;
  &lt;br /&gt;
 cat /home/user/odr-radioepg-bridge-master/output.dat &amp;gt;&amp;gt; /home/user/odr-radioepg-bridge-master/epgfifo&lt;br /&gt;
  &lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
And make it executable (chmod +x sendepg.sh).&lt;br /&gt;
&lt;br /&gt;
This script must be running all the time. If you&amp;#039;re already using Supervisor to keep your MUX running (as described here: https://github.com/Opendigitalradio/dab-scripts), it&amp;#039;s easy to also use supervisor for this script. Create a new file, sendepg.conf, in your /home/user/odr/config/supervisor folder with this content:&lt;br /&gt;
&lt;br /&gt;
 [program:sendepg]&lt;br /&gt;
 command=bash -c &amp;quot;/home/user/odr-radioepg-bridge-master/sendepg.sh&amp;quot;&lt;br /&gt;
 autostart=true&lt;br /&gt;
 autorestart=true&lt;br /&gt;
 startretries=99999&lt;br /&gt;
 priority=10&lt;br /&gt;
 stderr_logfile=/dev/stdout&lt;br /&gt;
 stdout_logfile=/dev/stdout&lt;br /&gt;
&lt;br /&gt;
Then run these commands:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /home/user/odr/config/supervisor/sendepg.conf /etc/supervisor/conf.d/sendepg.conf&lt;br /&gt;
 sudo supervisorctl reread&lt;br /&gt;
 sudo supervisorctl update&lt;br /&gt;
&lt;br /&gt;
Now your EPG is sent to ODR-DabMux from the fifo, and you will now be able to update your EPG without having to restart ODR-DabMux.&lt;br /&gt;
&lt;br /&gt;
====Updating your EPG automatically every day====&lt;br /&gt;
&lt;br /&gt;
You can update your EPG every 24 hours by adding a new daily task to cron.&lt;br /&gt;
&lt;br /&gt;
Create a new file&lt;br /&gt;
&lt;br /&gt;
 /etc/cron.daily/epg&lt;br /&gt;
&lt;br /&gt;
with the single line (with the same parameters as when you generate your EPG yourself)&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
By default, the cron job will run every day at around 06:00. If you want your EPG to update more frequently (every 4 hours), you could add it to the user cron job with&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and add the line&lt;br /&gt;
&lt;br /&gt;
 0 */4 * * * /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The EPG creates new MOT TransportIDs for every object each time it is run. A receiver will not recognise that objects have been previously received and cached. If there is an interruption in reception, the EPG will be incomplete. The more frequently you update the EPG, more likely it is that a receiver will not be able to utilise the cached objects.&lt;br /&gt;
&lt;br /&gt;
===Some observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (at least those up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1535</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1535"/>
		<updated>2020-07-21T14:53:01Z</updated>

		<summary type="html">&lt;p&gt;Ubr: Finished the section about updating the EPG automatically every day&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB EPG from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* In this context, EPG and SPI is basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This tool uses RadioDNS to locate and acquire Service Information (SI.xml), Programme Information (PI.xml) and Logos.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Each station you want to add to the EPG must be registered in RadioDNS using the correct information (Ensemble ID, Service ID, Service Component ID), and have correctly formatted SI, PI and logo files in PNG format. Find out more at https://radiodns.org/technical/documentation/#howto&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-crcmod&lt;br /&gt;
 sudo apt-get install python-bitarray&lt;br /&gt;
 sudo apt-get install python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Important: &amp;#039;&amp;#039;&amp;#039;It MUST be this commit&amp;#039;&amp;#039;&amp;#039;, NOT the original one from GlobalRadio from 2017 (thanks to Nick Piggott for help figuring out this).&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-dateutil&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 5: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
 sudo pip install hybridspi&lt;br /&gt;
 sudo pip install pyradiodns&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/magicbadger/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/local/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your EPG===&lt;br /&gt;
&lt;br /&gt;
====Generating your EPG====&lt;br /&gt;
&lt;br /&gt;
Odr-radioepg-bridge is a command-line tool, which will:&lt;br /&gt;
* First read your mux.conf (from your ODR-DabMux configuration) to get information about your services.&lt;br /&gt;
* Then try to fetch SPI data for your services from the internet using RadioDNS.&lt;br /&gt;
* And lastly generate an output file containing a complete EPG.&lt;br /&gt;
&lt;br /&gt;
If you type &amp;quot;generate-epg -h&amp;quot; you will get a list of available command-line arguments:&lt;br /&gt;
&lt;br /&gt;
 usage: generate-epg [-h] [-o OUTPUT] [-X] [-d DAYS] [-p PACKET_SIZE]&lt;br /&gt;
                     [-a PACKET_ADDRESS]&lt;br /&gt;
                     f&lt;br /&gt;
 &lt;br /&gt;
 Encodes an EPG bitstream for services in a multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
   f                  multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
   -h, --help         show this help message and exit&lt;br /&gt;
   -o OUTPUT          output bitstream file&lt;br /&gt;
   -X                 turn debug on&lt;br /&gt;
   -d DAYS            number of days ahead to encode schedule files&lt;br /&gt;
   -p PACKET_SIZE     Packet size in bytes&lt;br /&gt;
   -a PACKET_ADDRESS  Packet address&lt;br /&gt;
&lt;br /&gt;
The positional argument tells the tool where to find your mux.conf.&lt;br /&gt;
The other arguments are optional, and some default values will be used if you don&amp;#039;t set them:&lt;br /&gt;
&lt;br /&gt;
* -o can be used to set filename and path to your output file (your EPG). Default is output.dat, placed in the folder from where you run the tool.&lt;br /&gt;
* -d is the number of days of programme schedule you want in you EPG. From 1 til 4 days, default is 2.&lt;br /&gt;
* -p is packet size. Available values are 24, 48, 72 and 96. Default is 96. Which value you should use, depends on the bitrate in which you are broadcasting your EPG (see below).&lt;br /&gt;
* -a is the packet address for your EPG. Default is 1, which will normally be fine. Important is, that you must set the same address in your mux.conf (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
If your mux.conf is placed in /home/user/odr/config/mux.conf, and you want 4 days in your EPG (today and the next 3 days) and you want to broadcast it in 16 kbit/s, your command line could look like this:&lt;br /&gt;
&lt;br /&gt;
 generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf&lt;br /&gt;
&lt;br /&gt;
This will generate a file named output.dat containing your EPG. In this example, I have set the packet size to 48, which is suitable for 16 kbit/s. I have not set the packet address, which means that the default value of 1 will be used.&lt;br /&gt;
&lt;br /&gt;
====Packet sizes and bitrates====&lt;br /&gt;
&lt;br /&gt;
The packet size, which you set when you generate your EPG, should match the bitrate in which you intend to broadcast it. If the packet size is too large, your EPG will not be broadcasted. If the packet size is too small, your EPG will (probably) be broadcasted, but it will be slower than necessary, because more space will be used for packet headers and maybe partly empty data packets. I will recommend these values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bitrate&lt;br /&gt;
! Packet size&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 96&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Broadcasting your EPG====&lt;br /&gt;
&lt;br /&gt;
To broadcast your EPG using ODR-DabMux, create a packet data service in your mux.conf like in this example:&lt;br /&gt;
&lt;br /&gt;
In the services section:&lt;br /&gt;
&lt;br /&gt;
 srv-epg {&lt;br /&gt;
 label &amp;quot;EPG&amp;quot;&lt;br /&gt;
 shortlabel &amp;quot;EPG&amp;quot;&lt;br /&gt;
 ; the service-ID consists of 8 hex digits for packet data services. Usually the first two digits will&lt;br /&gt;
 ; be the same as your ECC, and the third digit will be the same as the first digit in your Ensemble Id.&lt;br /&gt;
 id 0xe1912345&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the subchannels section:&lt;br /&gt;
&lt;br /&gt;
 sub-epg {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for EPG.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your EPG again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output file from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/output.dat&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
And in the components section:&lt;br /&gt;
&lt;br /&gt;
 comp-epg {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-epg&lt;br /&gt;
 subchannel sub-epg&lt;br /&gt;
 figtype 0x7&lt;br /&gt;
 ; The address must be the same as your packet address set when you generate the EPG (default value is 1).&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now (re)start your ODR-DabMux, and your EPG should be broadcasted.&lt;br /&gt;
&lt;br /&gt;
===Updating your EPG automatically every day===&lt;br /&gt;
&lt;br /&gt;
====Feeding the EPG from a fifo to be able to update it without restarting the MUX====&lt;br /&gt;
&lt;br /&gt;
While the setup shown above will allow you to broadcast your EPG, it will not allow you to update your EPG without having to restart your MUX. To get around this, you can feed your EPG to ODR-DabMux from a named fifo instead of a file.&lt;br /&gt;
&lt;br /&gt;
Navigate to the folder where you have your EPG and create a fifo like this:&lt;br /&gt;
&lt;br /&gt;
 mkfifo epgfifo&lt;br /&gt;
&lt;br /&gt;
In the subchannel section of your mux.conf, you should replace you EPG file (output.dat) with your fifo, and also add a new line, &amp;quot;nonblock true&amp;quot;, so that your EPG subchannel looks like this:&lt;br /&gt;
&lt;br /&gt;
 sub-epg {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for EPG.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your EPG again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/epgfifo&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 nonblock true&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
Your EPG must be continously sent to the fifo. You can make a shell script for that. Create a file, sendepg.sh, with this content:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
  &lt;br /&gt;
 while :&lt;br /&gt;
 do&lt;br /&gt;
  &lt;br /&gt;
 cat /home/user/odr-radioepg-bridge-master/output.dat &amp;gt;&amp;gt; /home/user/odr-radioepg-bridge-master/epgfifo&lt;br /&gt;
  &lt;br /&gt;
 done&lt;br /&gt;
&lt;br /&gt;
And make it executable (chmod +x sendepg.sh).&lt;br /&gt;
&lt;br /&gt;
This script must be running all the time. If you&amp;#039;re already using Supervisor to keep your MUX running (as discribed here: https://github.com/Opendigitalradio/dab-scripts), it&amp;#039;s easy to also use supervisor for this script. Create a new file, sendepg.conf, in your /home/user/odr/config/supervisor folder with this content:&lt;br /&gt;
&lt;br /&gt;
 [program:sendepg]&lt;br /&gt;
 command=bash -c &amp;quot;/home/user/odr-radioepg-bridge-master/sendepg.sh&amp;quot;&lt;br /&gt;
 autostart=true&lt;br /&gt;
 autorestart=true&lt;br /&gt;
 startretries=99999&lt;br /&gt;
 priority=10&lt;br /&gt;
 stderr_logfile=/dev/stdout&lt;br /&gt;
 stdout_logfile=/dev/stdout&lt;br /&gt;
&lt;br /&gt;
Then run these commands:&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /home/user/odr/config/supervisor/sendepg.conf /etc/supervisor/conf.d/sendepg.conf&lt;br /&gt;
 sudo supervisorctl reread&lt;br /&gt;
 sudo supervisorctl update&lt;br /&gt;
&lt;br /&gt;
Now your EPG is sent to ODR-DabMux from the fifo, and you will now be able to update your EPG without having to restart ODR-DabMux.&lt;br /&gt;
&lt;br /&gt;
====Updating your EPG automatically every day====&lt;br /&gt;
&lt;br /&gt;
You can update your EPG every 24 hours by adding a new daily task to cron.&lt;br /&gt;
&lt;br /&gt;
Create a new file&lt;br /&gt;
&lt;br /&gt;
 /etc/cron.daily/epg&lt;br /&gt;
&lt;br /&gt;
with the single line (with the same parameters as when you generate your EPG yourself)&lt;br /&gt;
&lt;br /&gt;
 /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
By default, the cron job will run every day at around 06:00. If you want your EPG to update more frequently (every 4 hours), you could add it to the user cron job with&lt;br /&gt;
&lt;br /&gt;
 crontab -e&lt;br /&gt;
&lt;br /&gt;
and add the line&lt;br /&gt;
&lt;br /&gt;
 0 */4 * * * /usr/local/bin/generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf -o /home/user/odr-radioepg-bridge-master/output.dat&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
The EPG creates new MOT TransportIDs for every object each time it is run. A receiver will not recognise that objects have been previously received and cached. If there is an interruption in reception, the EPG will be incomplete. The more frequently you update the EPG, more likely it is that a receiver will not be able to utilise the cached objects.&lt;br /&gt;
&lt;br /&gt;
===Some problems and solutions===&lt;br /&gt;
&lt;br /&gt;
====Local variable &amp;#039;ecc&amp;#039; referenced before assignment====&lt;br /&gt;
&lt;br /&gt;
For some domains, lookup will cause the script to fail with error message &amp;quot;local variable &amp;#039;ecc&amp;#039; referenced before assignment&amp;quot; if the domain has no _radiotag._tcp SRV record.&lt;br /&gt;
&lt;br /&gt;
You can get around this by opening this file in a text editor:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/pyradiodns/rdns.py&lt;br /&gt;
and remove or comment out line 13 &amp;quot;(&amp;#039;radiotag&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If the domain is not using RadioVIS, you might also have to remove line 14 &amp;quot;(&amp;#039;radiovis&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;, but I haven&amp;#039;t experienced this myself.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;rdns.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed on a wrong date====&lt;br /&gt;
&lt;br /&gt;
I have observed that radio programmes beginning before noon (or all programmes on some receivers) were listed on a wrong date, one day before the correct date. My solution was to modify line 428 in this file:&lt;br /&gt;
&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
Here, &amp;quot;(timepoint.hour - 12)&amp;quot; should be changed to &amp;quot;timepoint.hour&amp;quot;, so that line 428 will be:&lt;br /&gt;
&lt;br /&gt;
 jd = jdn + timepoint.hour / 24 + timepoint.minute / 1440 + timepoint.second / 86400&lt;br /&gt;
&lt;br /&gt;
This should fix the daystamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed with wrong timestamps if your time zone is not UTC====&lt;br /&gt;
&lt;br /&gt;
I have observed that if the time zone is not UTC, all radio programmes were listed with wrong times. My solution was to make some modifications to this file:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
After line 419 (&amp;quot;bits.setall(False)&amp;quot;) I have added the following two lines:&lt;br /&gt;
&lt;br /&gt;
 offset = (timepoint.utcoffset().days * 86400 + timepoint.utcoffset().seconds) + (timepoint.dst().days * 86400 + timepoint.dst().days)&lt;br /&gt;
 timepoint=timepoint - timedelta(seconds=offset)&lt;br /&gt;
&lt;br /&gt;
(The first line is taken from line 457, from where it can then be removed)&lt;br /&gt;
&lt;br /&gt;
And after line 28 (&amp;quot;import sys&amp;quot;), I have added this line:&lt;br /&gt;
&lt;br /&gt;
 from datetime import timedelta&lt;br /&gt;
&lt;br /&gt;
This should fix the timestamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
===Other observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1527</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1527"/>
		<updated>2020-07-13T05:13:24Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB EPG from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* In this context, EPG and SPI is basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;You must already have a working EPG (SPI) for hybrid radio via radioDNS, before you can use this tool.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-crcmod&lt;br /&gt;
 sudo apt-get install python-bitarray&lt;br /&gt;
 sudo apt-get install python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Important: &amp;#039;&amp;#039;&amp;#039;It MUST be this commit&amp;#039;&amp;#039;&amp;#039;, NOT the original one from GlobalRadio from 2017 (thanks to Nick Piggott for help figuring out this).&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-dateutil&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
 sudo ln -s /home/user/python-dabmsc-master/bin/decode /usr/bin/decode&lt;br /&gt;
&lt;br /&gt;
(If your folder is not /home/user/python-dabmsc-master, use your_path/bin/decode in the last command line above).&lt;br /&gt;
&lt;br /&gt;
====Step 5: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
 sudo pip install hybridspi&lt;br /&gt;
 sudo pip install pyradiodns&lt;br /&gt;
&lt;br /&gt;
There is no setup.py file in this package, but you can create one yourself. Go to the /src subfolder (/home/user/odr-radiodns-bridge-master/src) and create a file, setup.py with this content:&lt;br /&gt;
&lt;br /&gt;
 from distutils.core import setup&lt;br /&gt;
 &lt;br /&gt;
 setup(&lt;br /&gt;
     name=&amp;#039;odr-radiodns-bridge&amp;#039;,&lt;br /&gt;
     version=&amp;#039;1.0&amp;#039;,&lt;br /&gt;
     packages=[&amp;#039;odr&amp;#039;, &amp;#039;odr.radiodns&amp;#039;],&lt;br /&gt;
     url=&amp;#039;https://github.com/nickpiggott/odr-radiodns-bridge&amp;#039;,&lt;br /&gt;
     license=&amp;#039;GNU Lesser General Public License 2.1&amp;#039;,&lt;br /&gt;
     author=&amp;#039;Nick Piggott&amp;#039;,&lt;br /&gt;
     author_email=&amp;#039;nick@piggott.eu&amp;#039;,&lt;br /&gt;
     description=&amp;#039;Tools to bridge RadioDNS applications into the OpenDigitalRadio environment&amp;#039;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/magicbadger/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your EPG===&lt;br /&gt;
&lt;br /&gt;
====Generating your EPG====&lt;br /&gt;
&lt;br /&gt;
Odr-radioepg-bridge is a command-line tool, which will:&lt;br /&gt;
* First read your mux.conf (from your ODR-DabMux configuration) to get information about your services.&lt;br /&gt;
* Then try to fetch SPI data for your services from the internet using RadioDNS.&lt;br /&gt;
* And lastly generate an output file containing a complete EPG.&lt;br /&gt;
&lt;br /&gt;
If you type &amp;quot;generate-epg -h&amp;quot; you will get a list of available command-line arguments:&lt;br /&gt;
&lt;br /&gt;
 usage: generate-epg [-h] [-o OUTPUT] [-X] [-d DAYS] [-p PACKET_SIZE]&lt;br /&gt;
                     [-a PACKET_ADDRESS]&lt;br /&gt;
                     f&lt;br /&gt;
 &lt;br /&gt;
 Encodes an EPG bitstream for services in a multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
   f                  multiplex configuration file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
   -h, --help         show this help message and exit&lt;br /&gt;
   -o OUTPUT          output bitstream file&lt;br /&gt;
   -X                 turn debug on&lt;br /&gt;
   -d DAYS            number of days ahead to encode schedule files&lt;br /&gt;
   -p PACKET_SIZE     Packet size in bytes&lt;br /&gt;
   -a PACKET_ADDRESS  Packet address&lt;br /&gt;
&lt;br /&gt;
The positional argument tells the tool where to find your mux.conf.&lt;br /&gt;
The other arguments are optional, and some default values will be used if you don&amp;#039;t set them:&lt;br /&gt;
&lt;br /&gt;
* -o can be used to set filename and path to your output file (your EPG). Default is output.dat, placed in the folder from where you run the tool.&lt;br /&gt;
* -d is the number of days of programme schedule you want in you EPG. From 1 til 4 days, default is 2.&lt;br /&gt;
* -p is packet size. Available values are 24, 48, 72 and 96. Default is 96. Which value you should use, depends on the bitrate in which you are broadcasting your EPG (see below).&lt;br /&gt;
* -a is the packet address for your EPG. Default is 1, which will normally be fine. Important is, that you must set the same address in your mux.conf (see below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
If your mux.conf is placed in /home/user/odr/config/mux.conf, and you want 4 days in your EPG (today and the next 3 days) and you want to broadcast it in 16 kbit/s, your command line could look like this:&lt;br /&gt;
&lt;br /&gt;
 generate-epg -d 4 -p 48 /home/user/odr/config/mux.conf&lt;br /&gt;
&lt;br /&gt;
This will generate a file named output.dat containing your EPG. In this example, I have set the packet size to 48, which is suitable for 16 kbit/s. I have not set the packet address, which means that the default value of 1 will be used.&lt;br /&gt;
&lt;br /&gt;
====Packet sizes and bitrates====&lt;br /&gt;
&lt;br /&gt;
The packet size, which you set when you generate your EPG, should match the bitrate in which you intend to broadcast it. If the packet size is too large, your EPG will not be broadcasted. If the packet size is too small, your EPG will (probably) be broadcasted, but it will be slower than necessary, because more space will be used for packet headers and maybe partly empty data packets. I will recommend these values:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Bitrate&lt;br /&gt;
! Packet size&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 48&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 32&lt;br /&gt;
| 96&lt;br /&gt;
|-&lt;br /&gt;
| 48&lt;br /&gt;
| 72&lt;br /&gt;
|-&lt;br /&gt;
| 64&lt;br /&gt;
| 96&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Broadcasting your EPG====&lt;br /&gt;
&lt;br /&gt;
To broadcast your EPG using ODR-DabMux, create a packet data service in your mux.conf like in this example:&lt;br /&gt;
&lt;br /&gt;
In the services section:&lt;br /&gt;
&lt;br /&gt;
 srv-epg {&lt;br /&gt;
 label &amp;quot;EPG&amp;quot;&lt;br /&gt;
 shortlabel &amp;quot;EPG&amp;quot;&lt;br /&gt;
 ; the service-ID consists of 8 hex digits for packet data services. Usually the first two digits will&lt;br /&gt;
 ; be the same as your ECC, and the third digit will be the same as the first digit in your Ensemble Id.&lt;br /&gt;
 id 0xe1912345&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the subchannels section:&lt;br /&gt;
&lt;br /&gt;
 sub-epg {&lt;br /&gt;
 ; type packet or enhancedpacket can be used for EPG.&lt;br /&gt;
 type enhancedpacket&lt;br /&gt;
 ; if you change the bitrate, remember to also change the packet size accordingly (see above) and generate your EPG again.&lt;br /&gt;
 bitrate 16&lt;br /&gt;
 protection-profile EEP_A&lt;br /&gt;
 protection 3&lt;br /&gt;
 ; inputuri is the path and filename for your output file from generate-epg&lt;br /&gt;
 inputuri &amp;quot;/home/user/odr-radioepg-bridge-master/output.dat&amp;quot;&lt;br /&gt;
 inputproto file&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
And in the components section:&lt;br /&gt;
&lt;br /&gt;
 comp-epg {&lt;br /&gt;
 type 60&lt;br /&gt;
 service srv-epg&lt;br /&gt;
 subchannel sub-epg&lt;br /&gt;
 figtype 0x7&lt;br /&gt;
 ; The address must be the same as your packet address set when you generate the EPG (default value is 1).&lt;br /&gt;
 address 0x1&lt;br /&gt;
 datagroup true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now (re)start your ODR-DabMux, and your EPG should be broadcasted.&lt;br /&gt;
&lt;br /&gt;
===Updating your EPG automatically every day===&lt;br /&gt;
&lt;br /&gt;
To be written....&lt;br /&gt;
&lt;br /&gt;
===Some problems and solutions===&lt;br /&gt;
&lt;br /&gt;
====Local variable &amp;#039;ecc&amp;#039; referenced before assignment====&lt;br /&gt;
&lt;br /&gt;
For some domains, lookup will cause the script to fail with error message &amp;quot;local variable &amp;#039;ecc&amp;#039; referenced before assignment&amp;quot; if the domain has no _radiotag._tcp SRV record.&lt;br /&gt;
&lt;br /&gt;
You can get around this by opening this file in a text editor:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/pyradiodns/rdns.py&lt;br /&gt;
and remove or comment out line 13 &amp;quot;(&amp;#039;radiotag&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If the domain is not using RadioVIS, you might also have to remove line 14 &amp;quot;(&amp;#039;radiovis&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;, but I haven&amp;#039;t experienced this myself.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;rdns.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed on a wrong date====&lt;br /&gt;
&lt;br /&gt;
I have observed that radio programmes beginning before noon (or all programmes on some receivers) were listed on a wrong date, one day before the correct date. My solution was to modify line 428 in this file:&lt;br /&gt;
&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
Here, &amp;quot;(timepoint.hour - 12)&amp;quot; should be changed to &amp;quot;timepoint.hour&amp;quot;, so that line 428 will be:&lt;br /&gt;
&lt;br /&gt;
 jd = jdn + timepoint.hour / 24 + timepoint.minute / 1440 + timepoint.second / 86400&lt;br /&gt;
&lt;br /&gt;
This should fix the daystamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed with wrong timestamps if your time zone is not UTC====&lt;br /&gt;
&lt;br /&gt;
I have observed that if the time zone is not UTC, all radio programmes were listed with wrong times. My solution was to make some modifications to this file:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
After line 419 (&amp;quot;bits.setall(False)&amp;quot;) I have added the following two lines:&lt;br /&gt;
&lt;br /&gt;
 offset = (timepoint.utcoffset().days * 86400 + timepoint.utcoffset().seconds) + (timepoint.dst().days * 86400 + timepoint.dst().days)&lt;br /&gt;
 timepoint=timepoint - timedelta(seconds=offset)&lt;br /&gt;
&lt;br /&gt;
(The first line is taken from line 457, from where it can then be removed)&lt;br /&gt;
&lt;br /&gt;
And after line 28 (&amp;quot;import sys&amp;quot;), I have added this line:&lt;br /&gt;
&lt;br /&gt;
 from datetime import timedelta&lt;br /&gt;
&lt;br /&gt;
This should fix the timestamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
===Other observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=User:Ubr&amp;diff=1526</id>
		<title>User:Ubr</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=User:Ubr&amp;diff=1526"/>
		<updated>2020-07-12T17:23:45Z</updated>

		<summary type="html">&lt;p&gt;Ubr: Ubr moved page User:Ubr to How to install odr-radioepg-bridge in Debian Jessie: Was created without a title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[How to install odr-radioepg-bridge in Debian Jessie]]&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1525</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1525"/>
		<updated>2020-07-12T17:23:44Z</updated>

		<summary type="html">&lt;p&gt;Ubr: Ubr moved page User:Ubr to How to install odr-radioepg-bridge in Debian Jessie: Was created without a title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB EPG from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* In this context, EPG and SPI is basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;You must already have a working EPG (SPI) for hybrid radio via radioDNS, before you can use this tool.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-crcmod&lt;br /&gt;
 sudo apt-get install python-bitarray&lt;br /&gt;
 sudo apt-get install python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Important: &amp;#039;&amp;#039;&amp;#039;It MUST be this commit&amp;#039;&amp;#039;&amp;#039;, NOT the original one from GlobalRadio from 2017 (thanks to Nick Piggott for help figuring out this).&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-dateutil&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
 sudo ln -s /home/user/python-dabmsc-master/bin/decode /usr/bin/decode&lt;br /&gt;
&lt;br /&gt;
(If your folder is not /home/user/python-dabmsc-master, use your_path/bin/decode in the last command line above).&lt;br /&gt;
&lt;br /&gt;
====Step 5: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
 sudo pip install hybridspi&lt;br /&gt;
 sudo pip install pyradiodns&lt;br /&gt;
&lt;br /&gt;
There is no setup.py file in this package, but you can create one yourself. Go to the /src subfolder (/home/user/odr-radiodns-bridge-master/src) and create a file, setup.py with this content:&lt;br /&gt;
&lt;br /&gt;
 from distutils.core import setup&lt;br /&gt;
 &lt;br /&gt;
 setup(&lt;br /&gt;
     name=&amp;#039;odr-radiodns-bridge&amp;#039;,&lt;br /&gt;
     version=&amp;#039;1.0&amp;#039;,&lt;br /&gt;
     packages=[&amp;#039;odr&amp;#039;, &amp;#039;odr.radiodns&amp;#039;],&lt;br /&gt;
     url=&amp;#039;https://github.com/nickpiggott/odr-radiodns-bridge&amp;#039;,&lt;br /&gt;
     license=&amp;#039;GNU Lesser General Public License 2.1&amp;#039;,&lt;br /&gt;
     author=&amp;#039;Nick Piggott&amp;#039;,&lt;br /&gt;
     author_email=&amp;#039;nick@piggott.eu&amp;#039;,&lt;br /&gt;
     description=&amp;#039;Tools to bridge RadioDNS applications into the OpenDigitalRadio environment&amp;#039;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/magicbadger/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your EPG===&lt;br /&gt;
&lt;br /&gt;
To be written....&lt;br /&gt;
&lt;br /&gt;
===Updating your EPG automatically every day===&lt;br /&gt;
&lt;br /&gt;
To be written....&lt;br /&gt;
&lt;br /&gt;
===Some problems and solutions===&lt;br /&gt;
&lt;br /&gt;
====Local variable &amp;#039;ecc&amp;#039; referenced before assignment====&lt;br /&gt;
&lt;br /&gt;
For some domains, lookup will cause the script to fail with error message &amp;quot;local variable &amp;#039;ecc&amp;#039; referenced before assignment&amp;quot; if the domain has no _radiotag._tcp SRV record.&lt;br /&gt;
&lt;br /&gt;
You can get around this by opening this file in a text editor:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/pyradiodns/rdns.py&lt;br /&gt;
and remove or comment out line 13 &amp;quot;(&amp;#039;radiotag&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If the domain is not using RadioVIS, you might also have to remove line 14 &amp;quot;(&amp;#039;radiovis&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;, but I haven&amp;#039;t experienced this myself.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;rdns.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed on a wrong date====&lt;br /&gt;
&lt;br /&gt;
I have observed that radio programmes beginning before noon (or all programmes on some receivers) were listed on a wrong date, one day before the correct date. My solution was to modify line 428 in this file:&lt;br /&gt;
&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
Here, &amp;quot;(timepoint.hour - 12)&amp;quot; should be changed to &amp;quot;timepoint.hour&amp;quot;, so that line 428 will be:&lt;br /&gt;
&lt;br /&gt;
 jd = jdn + timepoint.hour / 24 + timepoint.minute / 1440 + timepoint.second / 86400&lt;br /&gt;
&lt;br /&gt;
This should fix the daystamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed with wrong timestamps if your time zone is not UTC====&lt;br /&gt;
&lt;br /&gt;
I have observed that if the time zone is not UTC, all radio programmes were listed with wrong times. My solution was to make some modifications to this file:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
After line 419 (&amp;quot;bits.setall(False)&amp;quot;) I have added the following two lines:&lt;br /&gt;
&lt;br /&gt;
 offset = (timepoint.utcoffset().days * 86400 + timepoint.utcoffset().seconds) + (timepoint.dst().days * 86400 + timepoint.dst().days)&lt;br /&gt;
 timepoint=timepoint - timedelta(seconds=offset)&lt;br /&gt;
&lt;br /&gt;
(The first line is taken from line 457, from where it can then be removed)&lt;br /&gt;
&lt;br /&gt;
And after line 28 (&amp;quot;import sys&amp;quot;), I have added this line:&lt;br /&gt;
&lt;br /&gt;
 from datetime import timedelta&lt;br /&gt;
&lt;br /&gt;
This should fix the timestamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
===Other observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1524</id>
		<title>How to configure SPI (Service and Programme Information) for ODR-DabMux</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_configure_SPI_(Service_and_Programme_Information)_for_ODR-DabMux&amp;diff=1524"/>
		<updated>2020-07-12T17:18:15Z</updated>

		<summary type="html">&lt;p&gt;Ubr: How to install odr-radioepg-bridge on Debian Jessie&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on odr-radioepg-bridge installation on Debian Jessie&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
This tool (or rather series of tools) will pick up your SPI (Service and Programme Information) from the internet via RadioDNS and generate a DAB EPG from it. It was written by Ben Poor and Nick Piggott. In this HowTo, I will describe how it can be installed on Debian Jessie. Some details might be slightly different on other Debian generations.&lt;br /&gt;
&lt;br /&gt;
* In this context, EPG and SPI is basically the same thing. While EPG (Electronic Programme Guide) is an old, but commonly well-known term, SPI (Service and Programme Information) is now the official name of this feature.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;You must already have a working EPG (SPI) for hybrid radio via radioDNS, before you can use this tool.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I have assumed that you are logged in to your Linux system as a standard user and have sudo installed on your system. If sudo is not installed, you can see here, how to install it on Debian Jessie:&lt;br /&gt;
https://www.geek17.com/en/content/debian-8-jessie-install-and-configure-sudo-25&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Miscellaneous dependencies====&lt;br /&gt;
First there are some dependencies to install with apt-get:&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install python-crcmod&lt;br /&gt;
 sudo apt-get install python-bitarray&lt;br /&gt;
 sudo apt-get install python-isodate&lt;br /&gt;
&lt;br /&gt;
Next there are some dependencies and subcomponents which must be downloaded from github and installed:&lt;br /&gt;
&lt;br /&gt;
====Step 2: python-dabmot====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-dabmot and unpack to a folder, e.g. /home/user/python-dabmot-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 3: python-mot-epg====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/GlobalRadio/python-mot-epg and unpack to a folder, e.g. /home/user/python-mot-epg-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 4: python-msc====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/python-dabmsc and unpack to a folder, e.g. /home/user/python-dabmsc-master&lt;br /&gt;
&lt;br /&gt;
Important: &amp;#039;&amp;#039;&amp;#039;It MUST be this commit&amp;#039;&amp;#039;&amp;#039;, NOT the original one from GlobalRadio from 2017 (thanks to Nick Piggott for help figuring out this).&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-dateutil&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
 sudo ln -s /home/user/python-dabmsc-master/bin/decode /usr/bin/decode&lt;br /&gt;
&lt;br /&gt;
(If your folder is not /home/user/python-dabmsc-master, use your_path/bin/decode in the last command line above).&lt;br /&gt;
&lt;br /&gt;
====Step 5: odr-radiodns-bridge====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radiodns-bridge and unpack to a folder, e.g. /home/user/odr-radiodns-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo apt-get install python-pip&lt;br /&gt;
 sudo pip install hybridspi&lt;br /&gt;
 sudo pip install pyradiodns&lt;br /&gt;
&lt;br /&gt;
There is no setup.py file in this package, but you can create one yourself. Go to the /src subfolder (/home/user/odr-radiodns-bridge-master/src) and create a file, setup.py with this content:&lt;br /&gt;
&lt;br /&gt;
 from distutils.core import setup&lt;br /&gt;
 &lt;br /&gt;
 setup(&lt;br /&gt;
     name=&amp;#039;odr-radiodns-bridge&amp;#039;,&lt;br /&gt;
     version=&amp;#039;1.0&amp;#039;,&lt;br /&gt;
     packages=[&amp;#039;odr&amp;#039;, &amp;#039;odr.radiodns&amp;#039;],&lt;br /&gt;
     url=&amp;#039;https://github.com/nickpiggott/odr-radiodns-bridge&amp;#039;,&lt;br /&gt;
     license=&amp;#039;GNU Lesser General Public License 2.1&amp;#039;,&lt;br /&gt;
     author=&amp;#039;Nick Piggott&amp;#039;,&lt;br /&gt;
     author_email=&amp;#039;nick@piggott.eu&amp;#039;,&lt;br /&gt;
     description=&amp;#039;Tools to bridge RadioDNS applications into the OpenDigitalRadio environment&amp;#039;&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 6: python-hybridspi====&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/magicbadger/python-hybridspi and unpack to a folder, e.g. /home/user/python-hybridspi-master&lt;br /&gt;
&lt;br /&gt;
Then navigate to the folder and run:&lt;br /&gt;
 sudo python setup.py install&lt;br /&gt;
&lt;br /&gt;
====Step 7: odr-radioepg-bridge====&lt;br /&gt;
&lt;br /&gt;
And now for the RadioEPG-bridge itself.&lt;br /&gt;
&lt;br /&gt;
Download from here https://github.com/nickpiggott/odr-radioepg-bridge and unpack to a folder, e.g. /home/user/odr-radioepg-bridge-master&lt;br /&gt;
&lt;br /&gt;
Then run:&lt;br /&gt;
 sudo ln -s /home/user/odr-radioepg-bridge-master/generate-epg /usr/bin/generate-epg&lt;br /&gt;
(If your folder is not /home/user/odr-radioepg-bridge-master, use your_path/generate-epg in the last command line above).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. You should now be able to run this command and see a help text:&lt;br /&gt;
 generate-epg -h&lt;br /&gt;
&lt;br /&gt;
===Generating and broadcasting your EPG===&lt;br /&gt;
&lt;br /&gt;
To be written....&lt;br /&gt;
&lt;br /&gt;
===Updating your EPG automatically every day===&lt;br /&gt;
&lt;br /&gt;
To be written....&lt;br /&gt;
&lt;br /&gt;
===Some problems and solutions===&lt;br /&gt;
&lt;br /&gt;
====Local variable &amp;#039;ecc&amp;#039; referenced before assignment====&lt;br /&gt;
&lt;br /&gt;
For some domains, lookup will cause the script to fail with error message &amp;quot;local variable &amp;#039;ecc&amp;#039; referenced before assignment&amp;quot; if the domain has no _radiotag._tcp SRV record.&lt;br /&gt;
&lt;br /&gt;
You can get around this by opening this file in a text editor:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/pyradiodns/rdns.py&lt;br /&gt;
and remove or comment out line 13 &amp;quot;(&amp;#039;radiotag&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If the domain is not using RadioVIS, you might also have to remove line 14 &amp;quot;(&amp;#039;radiovis&amp;#039;, &amp;#039;TCP&amp;#039;),&amp;quot;, but I haven&amp;#039;t experienced this myself.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;rdns.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed on a wrong date====&lt;br /&gt;
&lt;br /&gt;
I have observed that radio programmes beginning before noon (or all programmes on some receivers) were listed on a wrong date, one day before the correct date. My solution was to modify line 428 in this file:&lt;br /&gt;
&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
Here, &amp;quot;(timepoint.hour - 12)&amp;quot; should be changed to &amp;quot;timepoint.hour&amp;quot;, so that line 428 will be:&lt;br /&gt;
&lt;br /&gt;
 jd = jdn + timepoint.hour / 24 + timepoint.minute / 1440 + timepoint.second / 86400&lt;br /&gt;
&lt;br /&gt;
This should fix the daystamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
====Radio programmes listed with wrong timestamps if your time zone is not UTC====&lt;br /&gt;
&lt;br /&gt;
I have observed that if the time zone is not UTC, all radio programmes were listed with wrong times. My solution was to make some modifications to this file:&lt;br /&gt;
 /usr/local/lib/python2.7/dist-packages/spi/binary/__init__py&lt;br /&gt;
&lt;br /&gt;
After line 419 (&amp;quot;bits.setall(False)&amp;quot;) I have added the following two lines:&lt;br /&gt;
&lt;br /&gt;
 offset = (timepoint.utcoffset().days * 86400 + timepoint.utcoffset().seconds) + (timepoint.dst().days * 86400 + timepoint.dst().days)&lt;br /&gt;
 timepoint=timepoint - timedelta(seconds=offset)&lt;br /&gt;
&lt;br /&gt;
(The first line is taken from line 457, from where it can then be removed)&lt;br /&gt;
&lt;br /&gt;
And after line 28 (&amp;quot;import sys&amp;quot;), I have added this line:&lt;br /&gt;
&lt;br /&gt;
 from datetime import timedelta&lt;br /&gt;
&lt;br /&gt;
This should fix the timestamp issue.&lt;br /&gt;
&lt;br /&gt;
Note: When you modify this file, you might have to remove &amp;#039;&amp;#039;&amp;#039;__init__.pyc&amp;#039;&amp;#039;&amp;#039; in the same folder to make sure that your changes are being used.&lt;br /&gt;
&lt;br /&gt;
===Other observations===&lt;br /&gt;
&lt;br /&gt;
* According to specs, logo slides in DAB EPG must be PNG. Although JPG is allowed in hybrid radio SPI, JPG logos will not be added to your DAB EPG. Be sure that your logos (up to 320x240) are PNG.&lt;br /&gt;
* Programme descriptions (shortDescription) seem to be processed but not shown. Perhaps we will have to look a little further into this.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=971</id>
		<title>How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=971"/>
		<updated>2013-05-23T23:39:29Z</updated>

		<summary type="html">&lt;p&gt;Ubr: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Addition, 2013&amp;#039;&amp;#039;&amp;#039;: This setup has been reported &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; to work with the latest generation of the WBX board (WBX revision 3).&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it&amp;#039;s &amp;quot;tar xvzf package.tar.gz&amp;quot;, and for tar.bz2 it&amp;#039;s &amp;quot;tar xvjf package.tar.bz2&amp;quot;.&lt;br /&gt;
* I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.&lt;br /&gt;
* There might be some of it which can be done in an easier way, but I&amp;#039;m not that experienced with Linux, and this is what worked for me.&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Installation of Gnuradio 3.3.0====&lt;br /&gt;
This is needed for USRP1 with WBX.&lt;br /&gt;
# First &amp;quot;sudo apt-get build-dep gnuradio&amp;quot; (takes quite some time).&lt;br /&gt;
# 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 -&lt;br /&gt;
# Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (by default it goes to a &amp;quot;Downloads&amp;quot; folder in your homedir, this is fine).&lt;br /&gt;
# 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&amp;#039;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 &amp;quot;usrp2::usrp2&amp;quot; into just &amp;quot;usrp2&amp;quot;. That&amp;#039;s all, then save and close.&lt;br /&gt;
# Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It&amp;#039;s &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot;, &amp;quot;make check&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to &amp;quot;Configuring USRP support&amp;quot; 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&amp;#039;t need to do that.&lt;br /&gt;
# At the end of the &amp;quot;Configuring USRP support&amp;quot; section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The &amp;quot;./usrp_benchmark_usb.py&amp;quot; test fails, but it doesn&amp;#039;t matter in our case. The &amp;quot;./test_usrp_standard_tx&amp;quot; should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).&lt;br /&gt;
&lt;br /&gt;
====Step 2: Crc-DabMod and CRC-Dwap.py====&lt;br /&gt;
# 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&amp;#039;s &amp;quot;./configure --disable-debug&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .&lt;br /&gt;
# 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&amp;#039;s name becomes exactly the same as the old one). Then set it&amp;#039;s permissions: &amp;quot;sudo chmod a+x crc-dwap.py&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 3: Crc-DabMux and Libfec====&lt;br /&gt;
# First some necessary software: &amp;quot;sudo apt-get install devscripts&amp;quot;. 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 &amp;quot;OK&amp;quot; and then &amp;quot;No configuration&amp;quot; (do not just close the terminal window).&lt;br /&gt;
# And &amp;quot;sudo apt-get install debhelper&amp;quot; (you might already have this).&lt;br /&gt;
# Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.&lt;br /&gt;
# 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 &amp;quot;sudo dpkg -i ../libfec3-dev_3.0.1-*.deb&amp;quot; (thanks to Chaim Zax for this addition).&lt;br /&gt;
# Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It&amp;#039;s just the usual way, &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 4: Buffer software====&lt;br /&gt;
On the mmbTools live cd, the &amp;quot;bfr&amp;quot; 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:&lt;br /&gt;
# &amp;quot;sudo apt-get install mbuffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 5: CRC-DabPlus====&lt;br /&gt;
Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don&amp;#039;t have or want CRC-DabPlus, you can skip this step.&lt;br /&gt;
Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don&amp;#039;t have to do it again now.&lt;br /&gt;
* Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).&lt;br /&gt;
* 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 &amp;quot;sudo gedit /etc/rc.local&amp;quot;) and insert the following lines before the existing &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
* Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.&lt;br /&gt;
* Install CRC-DabPlus as described in the README.html.&lt;br /&gt;
&lt;br /&gt;
====Step 6: AudioScience ASI504x sound cards====&lt;br /&gt;
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 &amp;quot;out of the box&amp;quot;. However the GUI sound control panel does not work correctly with these cards, so if you need to change it&amp;#039;s configuration, you must use the non-GUI alsamixer (type &amp;quot;alsamixer&amp;quot; in a terminal window).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now you&amp;#039;re ready to set up your DAB multiplex.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=922</id>
		<title>How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=922"/>
		<updated>2012-04-18T00:04:37Z</updated>

		<summary type="html">&lt;p&gt;Ubr: /* Step 1: Installation of Gnuradio 3.3.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it&amp;#039;s &amp;quot;tar xvzf package.tar.gz&amp;quot;, and for tar.bz2 it&amp;#039;s &amp;quot;tar xvjf package.tar.bz2&amp;quot;.&lt;br /&gt;
* I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.&lt;br /&gt;
* There might be some of it which can be done in an easier way, but I&amp;#039;m not that experienced with Linux, and this is what worked for me.&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Installation of Gnuradio 3.3.0====&lt;br /&gt;
This is needed for USRP1 with WBX.&lt;br /&gt;
# First &amp;quot;sudo apt-get build-dep gnuradio&amp;quot; (takes quite some time).&lt;br /&gt;
# 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 -&lt;br /&gt;
# Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (by default it goes to a &amp;quot;Downloads&amp;quot; folder in your homedir, this is fine).&lt;br /&gt;
# 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&amp;#039;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 &amp;quot;usrp2::usrp2&amp;quot; into just &amp;quot;usrp2&amp;quot;. That&amp;#039;s all, then save and close.&lt;br /&gt;
# Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It&amp;#039;s &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot;, &amp;quot;make check&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to &amp;quot;Configuring USRP support&amp;quot; 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&amp;#039;t need to do that.&lt;br /&gt;
# At the end of the &amp;quot;Configuring USRP support&amp;quot; section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The &amp;quot;./usrp_benchmark_usb.py&amp;quot; test fails, but it doesn&amp;#039;t matter in our case. The &amp;quot;./test_usrp_standard_tx&amp;quot; should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).&lt;br /&gt;
&lt;br /&gt;
====Step 2: Crc-DabMod and CRC-Dwap.py====&lt;br /&gt;
# 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&amp;#039;s &amp;quot;./configure --disable-debug&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .&lt;br /&gt;
# 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&amp;#039;s name becomes exactly the same as the old one). Then set it&amp;#039;s permissions: &amp;quot;sudo chmod a+x crc-dwap.py&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 3: Crc-DabMux and Libfec====&lt;br /&gt;
# First some necessary software: &amp;quot;sudo apt-get install devscripts&amp;quot;. 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 &amp;quot;OK&amp;quot; and then &amp;quot;No configuration&amp;quot; (do not just close the terminal window).&lt;br /&gt;
# And &amp;quot;sudo apt-get install debhelper&amp;quot; (you might already have this).&lt;br /&gt;
# Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.&lt;br /&gt;
# 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 &amp;quot;sudo dpkg -i ../libfec3-dev_3.0.1-*.deb&amp;quot; (thanks to Chaim Zax for this addition).&lt;br /&gt;
# Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It&amp;#039;s just the usual way, &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 4: Buffer software====&lt;br /&gt;
On the mmbTools live cd, the &amp;quot;bfr&amp;quot; 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:&lt;br /&gt;
# &amp;quot;sudo apt-get install mbuffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 5: CRC-DabPlus====&lt;br /&gt;
Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don&amp;#039;t have or want CRC-DabPlus, you can skip this step.&lt;br /&gt;
Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don&amp;#039;t have to do it again now.&lt;br /&gt;
* Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).&lt;br /&gt;
* 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 &amp;quot;sudo gedit /etc/rc.local&amp;quot;) and insert the following lines before the existing &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
* Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.&lt;br /&gt;
* Install CRC-DabPlus as described in the README.html.&lt;br /&gt;
&lt;br /&gt;
====Step 6: AudioScience ASI504x sound cards====&lt;br /&gt;
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 &amp;quot;out of the box&amp;quot;. However the GUI sound control panel does not work correctly with these cards, so if you need to change it&amp;#039;s configuration, you must use the non-GUI alsamixer (type &amp;quot;alsamixer&amp;quot; in a terminal window).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now you&amp;#039;re ready to set up your DAB multiplex.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=DAB%2B_script_and_infrastructure_used_for_Kanal_Plus_ensemble_in_Denmark&amp;diff=893</id>
		<title>DAB+ script and infrastructure used for Kanal Plus ensemble in Denmark</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=DAB%2B_script_and_infrastructure_used_for_Kanal_Plus_ensemble_in_Denmark&amp;diff=893"/>
		<updated>2012-02-24T15:02:23Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here&amp;#039;s the script by Ulrik Brinck of Kanal Plus for [http://www.wohnort.org/DAB/denmark.html#Local local ensemble in Denmark]&lt;br /&gt;
&lt;br /&gt;
The ensemble consists of 9 DAB+ programmes, some of them with DLS. The full set of CRC mmbTools is used with crc-dabplus for DAB+ encoding, crc-dabmux for multiplexing and crc-dabmod for OFDM modulation.&lt;br /&gt;
&lt;br /&gt;
The hardware setup is made of:&lt;br /&gt;
*Intel Core i7-2600 4x3.40Ghz PC running Ubuntu Desktop 11.04, 32 bit version&lt;br /&gt;
*2 AudioScience ASI5042 soundcards&lt;br /&gt;
*Ettus USRP1 with WBX daughterboard&lt;br /&gt;
*Power amplifier from Res-Ingenium, Italy&lt;br /&gt;
*Cavity filter from Telmec Broadcasting, Italy&lt;br /&gt;
*Antenna from vhfteknik.se, Sweden&lt;br /&gt;
&lt;br /&gt;
[[Media:Danish DAB+ grass roots trial (Kanal Plus).pdf|Pictures from the setup]] with PC, amplifier, antenna (pics by Niels Dreijer)&lt;br /&gt;
&lt;br /&gt;
===Script===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 DABPLUS=crc-dabplus&lt;br /&gt;
 &lt;br /&gt;
 #First kill any eventual old instances of the software&lt;br /&gt;
 &lt;br /&gt;
 killall CRC-DabMux&lt;br /&gt;
 killall CRC-DabMod&lt;br /&gt;
 killall CRC-Dwap.py&lt;br /&gt;
 killall $DABPLUS&lt;br /&gt;
 killall mbuffer&lt;br /&gt;
 &lt;br /&gt;
 sleep 3&lt;br /&gt;
 &lt;br /&gt;
 #Delete old fifo&amp;#039;s and make new ones, just to be sure to avoid problems at startup if e.g. a bit rate has been changed&lt;br /&gt;
 &lt;br /&gt;
 rm -f fifoer/fifo*&lt;br /&gt;
 &lt;br /&gt;
 for id in 1 2 3 4 5 6 7 8; do&lt;br /&gt;
     [ -e fifo$id ] || mkfifo fifoer/fifo$id&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 #Start the multiplexer, modulator and wave player&lt;br /&gt;
 &lt;br /&gt;
 CRC-DabMux -c 0xE1 -i 0x9101 -L &amp;quot;NivaaDAB&amp;quot; -l &amp;quot;NivaaDAB&amp;quot; \&lt;br /&gt;
 		-F &amp;quot;diverse/testcd56.dab&amp;quot; -b 56 -S -i 0x9101 -y 0 -L &amp;quot;Forsoegskanal&amp;quot; -l &amp;quot;Forsoeg&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo1 -k -b 144 -S -i 0x9102 -y 27 -L &amp;quot;Retro-Radio&amp;quot; -l &amp;quot;Retro&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo2 -k -b 88 -S -i 0x9103 -y 11 -L &amp;quot;Rockkanalen&amp;quot; -l &amp;quot;Rockkanl&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo3 -k -b 88 -S -i 0x9104 -y 9 -L &amp;quot;US Radio&amp;quot; -l &amp;quot;US Radio&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo4 -k -b 88 -S -i 0x9105 -y 9 -L &amp;quot;Humleborg,R.Nord&amp;quot; -l &amp;quot;Hmleborg&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo5 -k -b 88 -S -i 0x9106 -y 10 -L &amp;quot;RadioHLR&amp;quot; -l &amp;quot;RadioHLR&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo6 -k -b 88 -S -i 0x9107 -y 9 -L &amp;quot;Radio 10FM&amp;quot; -l &amp;quot;10FM&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo7 -k -b 48 -S -i 0x9108 -y 9 -L &amp;quot;Interviewkanalen&amp;quot; -l &amp;quot;Intervie&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo8 -k -b 88 -S -i 0x9109 -y 10 -L &amp;quot;Radio Halsnaes&amp;quot; -l &amp;quot;Halsnaes&amp;quot; -C \&lt;br /&gt;
 		-O fifo:///dev/stdout | \&lt;br /&gt;
 	crc-dabmod -g2 -r3200000 -c128000000 | \&lt;br /&gt;
 	mbuffer -m 32m -P 25 | \&lt;br /&gt;
 	crc-dwap.py -r3200000 -f204640000 -g-14 -u &amp;amp;&lt;br /&gt;
 &lt;br /&gt;
 sleep 3&lt;br /&gt;
 &lt;br /&gt;
 #Start the encoders&lt;br /&gt;
 #There are two ASI5042 sound cards, which are identified as hw:2 and hw:3. Each of them have 4 stereo inputs.&lt;br /&gt;
 &lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,0 -b 144 -d tcpserver://:49102 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo1 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,2 -b 88 -d tcpserver://:49103 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo2 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,3 -b 88 -d tcpserver://:49104 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo3 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,1 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo4 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,2 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo5 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,3 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo6 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,1 -b 48 -d tcpserver://:49108 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo7 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,0 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo8 &amp;amp;&lt;br /&gt;
 &lt;br /&gt;
 wait&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=DAB%2B_script_and_infrastructure_used_for_Kanal_Plus_ensemble_in_Denmark&amp;diff=892</id>
		<title>DAB+ script and infrastructure used for Kanal Plus ensemble in Denmark</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=DAB%2B_script_and_infrastructure_used_for_Kanal_Plus_ensemble_in_Denmark&amp;diff=892"/>
		<updated>2012-02-24T15:01:30Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here&amp;#039;s the script by Ulrik Brinck of Kanal Plus for [http://www.wohnort.org/DAB/denmark.html#Local local ensemble in Denmark]&lt;br /&gt;
&lt;br /&gt;
The ensemble consists of 4 DAB+ programmes with DLS. The full set of CRC mmbTools is used with crc-dabplus for DAB+ encoding, crc-dabmux for multiplexing and crc-dabmod for OFDM modulation.&lt;br /&gt;
&lt;br /&gt;
The hardware setup is made of:&lt;br /&gt;
*Intel Core i7-2600 4x3.40Ghz PC running Ubuntu Desktop 11.04, 32 bit version&lt;br /&gt;
*2 AudioScience ASI5042 soundcards&lt;br /&gt;
*Ettus USRP1 with WBX daughterboard&lt;br /&gt;
*Power amplifier from Res-Ingenium, Italy&lt;br /&gt;
*Cavity filter from Telmec Broadcasting, Italy&lt;br /&gt;
*Antenna from vhfteknik.se, Sweden&lt;br /&gt;
&lt;br /&gt;
[[Media:Danish DAB+ grass roots trial (Kanal Plus).pdf|Pictures from the setup]] with PC, amplifier, antenna (pics by Niels Dreijer)&lt;br /&gt;
&lt;br /&gt;
===Script===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 DABPLUS=crc-dabplus&lt;br /&gt;
 &lt;br /&gt;
 #First kill any eventual old instances of the software&lt;br /&gt;
 &lt;br /&gt;
 killall CRC-DabMux&lt;br /&gt;
 killall CRC-DabMod&lt;br /&gt;
 killall CRC-Dwap.py&lt;br /&gt;
 killall $DABPLUS&lt;br /&gt;
 killall mbuffer&lt;br /&gt;
 &lt;br /&gt;
 sleep 3&lt;br /&gt;
 &lt;br /&gt;
 #Delete old fifo&amp;#039;s and make new ones, just to be sure to avoid problems at startup if e.g. a bit rate has been changed&lt;br /&gt;
 &lt;br /&gt;
 rm -f fifoer/fifo*&lt;br /&gt;
 &lt;br /&gt;
 for id in 1 2 3 4 5 6 7 8; do&lt;br /&gt;
     [ -e fifo$id ] || mkfifo fifoer/fifo$id&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 #Start the multiplexer, modulator and wave player&lt;br /&gt;
 &lt;br /&gt;
 CRC-DabMux -c 0xE1 -i 0x9101 -L &amp;quot;NivaaDAB&amp;quot; -l &amp;quot;NivaaDAB&amp;quot; \&lt;br /&gt;
 		-F &amp;quot;diverse/testcd56.dab&amp;quot; -b 56 -S -i 0x9101 -y 0 -L &amp;quot;Forsoegskanal&amp;quot; -l &amp;quot;Forsoeg&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo1 -k -b 144 -S -i 0x9102 -y 27 -L &amp;quot;Retro-Radio&amp;quot; -l &amp;quot;Retro&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo2 -k -b 88 -S -i 0x9103 -y 11 -L &amp;quot;Rockkanalen&amp;quot; -l &amp;quot;Rockkanl&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo3 -k -b 88 -S -i 0x9104 -y 9 -L &amp;quot;US Radio&amp;quot; -l &amp;quot;US Radio&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo4 -k -b 88 -S -i 0x9105 -y 9 -L &amp;quot;Humleborg,R.Nord&amp;quot; -l &amp;quot;Hmleborg&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo5 -k -b 88 -S -i 0x9106 -y 10 -L &amp;quot;RadioHLR&amp;quot; -l &amp;quot;RadioHLR&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo6 -k -b 88 -S -i 0x9107 -y 9 -L &amp;quot;Radio 10FM&amp;quot; -l &amp;quot;10FM&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo7 -k -b 48 -S -i 0x9108 -y 9 -L &amp;quot;Interviewkanalen&amp;quot; -l &amp;quot;Intervie&amp;quot; -C \&lt;br /&gt;
 		-F fifoer/fifo8 -k -b 88 -S -i 0x9109 -y 10 -L &amp;quot;Radio Halsnaes&amp;quot; -l &amp;quot;Halsnaes&amp;quot; -C \&lt;br /&gt;
 		-O fifo:///dev/stdout | \&lt;br /&gt;
 	crc-dabmod -g2 -r3200000 -c128000000 | \&lt;br /&gt;
 	mbuffer -m 32m -P 25 | \&lt;br /&gt;
 	crc-dwap.py -r3200000 -f204640000 -g-14 -u &amp;amp;&lt;br /&gt;
 &lt;br /&gt;
 sleep 3&lt;br /&gt;
 &lt;br /&gt;
 #Start the encoders&lt;br /&gt;
 #There are two ASI5042 sound cards, which are identified as hw:2 and hw:3. Each of them have 4 stereo inputs.&lt;br /&gt;
 &lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,0 -b 144 -d tcpserver://:49102 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo1 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,2 -b 88 -d tcpserver://:49103 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo2 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,3 -b 88 -d tcpserver://:49104 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo3 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,1 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo4 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,2 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo5 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,3 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo6 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,1 -b 48 -d tcpserver://:49108 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo7 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,0 -b 88 | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo8 &amp;amp;&lt;br /&gt;
 &lt;br /&gt;
 wait&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_latest_version_of_gnuradio_with_CRC_MMBtools_live_CD&amp;diff=821</id>
		<title>How to install latest version of gnuradio with CRC MMBtools live CD</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_latest_version_of_gnuradio_with_CRC_MMBtools_live_CD&amp;diff=821"/>
		<updated>2011-10-29T02:22:14Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you have installed Ubuntu and CRC mmbtools CD (beta 9 or older), you cannot use the WBX daughterboard because you need the latest version of gnuradio.&lt;br /&gt;
In this case you can follow these steps to remove the old gnuradio and compile/install the new one. (taken from CRC Workshop organised at EBU)&lt;br /&gt;
&lt;br /&gt;
First open /etc/apt/sources.list with a text editor, for example:&lt;br /&gt;
&lt;br /&gt;
 sudo gedit /etc/apt/sources.list&lt;br /&gt;
&lt;br /&gt;
Inside this file, change all the URL&amp;#039;s from http://(something).ubuntu.com/ubuntu into http://old-releases.ubuntu.com/ubuntu . Then save and close.&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get update &lt;br /&gt;
&lt;br /&gt;
 sudo apt-get remove -y gnuradio gnuradio-doc libgnuradio libgnuradio-core libgnuradio-omnithread libgruel python-gnuradio-core libusrp usrp-doc python-wxgtk2.6&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get -y install git-core autoconf libtool python-dev swig libfftw3-dev libcppunit-dev libusb-dev libboost1.37-dev guile-1.8-dev sdcc-nf libsdl1.2-dev libgsl0-dev&lt;br /&gt;
&lt;br /&gt;
 wget http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz&lt;br /&gt;
 tar xzf gnuradio-3.3.0.tar.gz&lt;br /&gt;
 cd gnuradio-3.3.0&lt;br /&gt;
 ./configure --prefix=/usr --sysconfdir=/etc&lt;br /&gt;
 make -j2&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 sudo ln -s gnuradio-companion /usr/bin/grc &lt;br /&gt;
 sudo ln -s libgruel.so /usr/lib/libgruel.so.0&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_latest_version_of_gnuradio_with_CRC_MMBtools_live_CD&amp;diff=820</id>
		<title>How to install latest version of gnuradio with CRC MMBtools live CD</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_latest_version_of_gnuradio_with_CRC_MMBtools_live_CD&amp;diff=820"/>
		<updated>2011-10-29T01:33:27Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you have installed Ubuntu and CRC mmbtools CD (beta 9 or older), you cannot use the WBX daughterboard because you need the latest version of gnuradio.&lt;br /&gt;
&lt;br /&gt;
In this case you can follow these steps to remove the old gnuradio and compile/install the new one. (taken from CRC Workshop organised at EBU)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get remove -y gnuradio gnuradio-doc libgnuradio libgnuradio-core libgnuradio-omnithread libgruel python-gnuradio-core libusrp usrp-doc python-wxgtk2.6&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get -y install git-core autoconf libtool python-dev swig libfftw3-dev libcppunit-dev libusb-dev libboost1.37-dev guile-1.8-dev sdcc-nf libsdl1.2-dev libgsl0-dev&lt;br /&gt;
&lt;br /&gt;
 git clone http://gnuradio.org/git/gnuradio.git&lt;br /&gt;
 cd gnuradio&lt;br /&gt;
 git checkout v3.3.0&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
 ./configure --prefix=/usr --sysconfdir=/etc&lt;br /&gt;
 make -j2&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 sudo ln -s gnuradio-companion /usr/bin/grc &lt;br /&gt;
 sudo ln -s libgruel.so /usr/lib/libgruel.so.0&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=813</id>
		<title>How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=813"/>
		<updated>2011-10-13T21:58:51Z</updated>

		<summary type="html">&lt;p&gt;Ubr: /* Step 3: Crc-DabMux and Libfec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it&amp;#039;s &amp;quot;tar xvzf package.tar.gz&amp;quot;, and for tar.bz2 it&amp;#039;s &amp;quot;tar xvjf package.tar.bz2&amp;quot;.&lt;br /&gt;
* I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.&lt;br /&gt;
* There might be some of it which can be done in an easier way, but I&amp;#039;m not that experienced with Linux, and this is what worked for me.&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Installation of Gnuradio 3.3.0====&lt;br /&gt;
This is needed for USRP1 with WBX.&lt;br /&gt;
# First &amp;quot;sudo apt-get build-dep gnuradio&amp;quot; (takes quite some time).&lt;br /&gt;
# 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 10.04 plus the additional line for 11.04). Do NOT continue with the next step (Installing GNU Radio) on that page. Instead -&lt;br /&gt;
# Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (by default it goes to a &amp;quot;Downloads&amp;quot; folder in your homedir, this is fine).&lt;br /&gt;
# 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&amp;#039;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 &amp;quot;usrp2::usrp2&amp;quot; into just &amp;quot;usrp2&amp;quot;. That&amp;#039;s all, then save and close.&lt;br /&gt;
# Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It&amp;#039;s &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot;, &amp;quot;make check&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to &amp;quot;Configuring USRP support&amp;quot; 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&amp;#039;t need to do that.&lt;br /&gt;
# At the end of the &amp;quot;Configuring USRP support&amp;quot; section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The &amp;quot;./usrp_benchmark_usb.py&amp;quot; test fails, but it doesn&amp;#039;t matter in our case. The &amp;quot;./test_usrp_standard_tx&amp;quot; should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).&lt;br /&gt;
&lt;br /&gt;
====Step 2: Crc-DabMod and CRC-Dwap.py====&lt;br /&gt;
# 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&amp;#039;s &amp;quot;./configure --disable-debug&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .&lt;br /&gt;
# 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&amp;#039;s name becomes exactly the same as the old one). Then set it&amp;#039;s permissions: &amp;quot;sudo chmod a+x crc-dwap.py&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 3: Crc-DabMux and Libfec====&lt;br /&gt;
# First some necessary software: &amp;quot;sudo apt-get install devscripts&amp;quot;. 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 &amp;quot;OK&amp;quot; and then &amp;quot;No configuration&amp;quot; (do not just close the terminal window).&lt;br /&gt;
# And &amp;quot;sudo apt-get install debhelper&amp;quot; (you might already have this).&lt;br /&gt;
# Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.&lt;br /&gt;
# 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 &amp;quot;sudo dpkg -i ../libfec3-dev_3.0.1-*.deb&amp;quot; (thanks to Chaim Zax for this addition).&lt;br /&gt;
# Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It&amp;#039;s just the usual way, &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 4: Buffer software====&lt;br /&gt;
On the mmbTools live cd, the &amp;quot;bfr&amp;quot; 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:&lt;br /&gt;
# &amp;quot;sudo apt-get install mbuffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 5: CRC-DabPlus====&lt;br /&gt;
Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don&amp;#039;t have or want CRC-DabPlus, you can skip this step.&lt;br /&gt;
Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don&amp;#039;t have to do it again now.&lt;br /&gt;
* Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).&lt;br /&gt;
* 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 &amp;quot;sudo gedit /etc/rc.local&amp;quot;) and insert the following lines before the existing &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
* Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.&lt;br /&gt;
* Install CRC-DabPlus as described in the README.html.&lt;br /&gt;
&lt;br /&gt;
====Step 6: AudioScience ASI504x sound cards====&lt;br /&gt;
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 &amp;quot;out of the box&amp;quot;. However the GUI sound control panel does not work correctly with these cards, so if you need to change it&amp;#039;s configuration, you must use the non-GUI alsamixer (type &amp;quot;alsamixer&amp;quot; in a terminal window).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now you&amp;#039;re ready to set up your DAB multiplex.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=DAB%2B_script_and_infrastructure_used_for_Kanal_Plus_ensemble_in_Denmark&amp;diff=811</id>
		<title>DAB+ script and infrastructure used for Kanal Plus ensemble in Denmark</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=DAB%2B_script_and_infrastructure_used_for_Kanal_Plus_ensemble_in_Denmark&amp;diff=811"/>
		<updated>2011-10-06T13:23:58Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here&amp;#039;s the script by Ulrik Brinck of Kanal Plus for [http://www.wohnort.org/DAB/denmark.html#Local local ensemble in Denmark]&lt;br /&gt;
&lt;br /&gt;
The ensemble consists of 4 DAB+ programmes with DLS.&lt;br /&gt;
&lt;br /&gt;
The hardware setup is made of:&lt;br /&gt;
*Intel Core i7-2600 4x3.40Ghz PC running Ubuntu Desktop 11.04, 32 bit version&lt;br /&gt;
*2 AudioScience ASI5042 soundcards&lt;br /&gt;
*Ettus USRP1 with WBX daughterboard&lt;br /&gt;
*Power amplifier from Res-Ingenium, Italy&lt;br /&gt;
*Cavity filter from Telmec, Italy&lt;br /&gt;
*Antenna from vhfteknik.se, Sweden&lt;br /&gt;
&lt;br /&gt;
[[Media:Danish DAB+ grass roots trial (Kanal Plus).pdf|Pictures from the setup]] with PC, amplifier, antenna (pics by Niels Dreijer)&lt;br /&gt;
&lt;br /&gt;
===Script===&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 DABPLUS=crc-dabplus&lt;br /&gt;
 &lt;br /&gt;
 killall CRC-DabMux&lt;br /&gt;
 killall CRC-DabMod&lt;br /&gt;
 killall CRC-Dwap.py&lt;br /&gt;
 killall $DABPLUS&lt;br /&gt;
 killall mbuffer&lt;br /&gt;
 &lt;br /&gt;
 sleep 3&lt;br /&gt;
 &lt;br /&gt;
 rm -f fifoer/fifo*&lt;br /&gt;
 &lt;br /&gt;
 for id in 0 1 2 3 4 5 6 7 8; do&lt;br /&gt;
     [ -e fifo$id ] || mkfifo fifoer/fifo$id&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 CRC-DabMux -c 0xE1 -i 0x9101 -L &amp;quot;NivaaDAB&amp;quot; -l &amp;quot;NivaaDAB&amp;quot; \&lt;br /&gt;
   -F &amp;quot;diverse/testcd.dab&amp;quot; -b 64 -S -i 0x9101 -y 0 -L &amp;quot;Forsoegskanal&amp;quot; -l &amp;quot;Forsoeg&amp;quot; -C \&lt;br /&gt;
   -F fifoer/fifo1 -k -b 144 -S -i 0x9102 -y 27 -L &amp;quot;Retro-Radio&amp;quot; -l &amp;quot;Retro&amp;quot; -C \&lt;br /&gt;
   -F fifoer/fifo2 -k -b 144 -S -i 0x9103 -y 10 -L &amp;quot;Kanal Plus 90&amp;quot; -l &amp;quot;Plus 90&amp;quot; -C \&lt;br /&gt;
   -F fifoer/fifo3 -k -b 88 -S -i 0x9104 -y 9 -L &amp;quot;US Radio&amp;quot; -l &amp;quot;US Radio&amp;quot; -C \&lt;br /&gt;
   -O fifo:///dev/stdout | \&lt;br /&gt;
 crc-dabmod -g2 -r3200000 -c128000000 | \&lt;br /&gt;
 mbuffer -m 32m -P 25 | \&lt;br /&gt;
 crc-dwap.py -r3200000 -f204640000 -g-14 -u &amp;amp;&lt;br /&gt;
 &lt;br /&gt;
 sleep 3&lt;br /&gt;
 &lt;br /&gt;
 $DABPLUS -g -i card://hw:3,0,0 -b 144 -d tcpserver://:49102 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo1 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,0 -b 144 -d tcpserver://:49103 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo2 &amp;amp;&lt;br /&gt;
 $DABPLUS -g -i card://hw:2,0,3 -b 88 -d tcpserver://:49104 -p 28 -t dls | mbuffer -m 100k -P 100 &amp;gt; fifoer/fifo3 &amp;amp;&lt;br /&gt;
 &lt;br /&gt;
 wait&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=790</id>
		<title>How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=790"/>
		<updated>2011-07-21T14:43:15Z</updated>

		<summary type="html">&lt;p&gt;Ubr: /* Step 3: Crc-DabMux and Libfec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it&amp;#039;s &amp;quot;tar xvzf package.tar.gz&amp;quot;, and for tar.bz2 it&amp;#039;s &amp;quot;tar xvjf package.tar.bz2&amp;quot;.&lt;br /&gt;
* I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.&lt;br /&gt;
* There might be some of it which can be done in an easier way, but I&amp;#039;m not that experienced with Linux, and this is what worked for me.&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Installation of Gnuradio 3.3.0====&lt;br /&gt;
This is needed for USRP1 with WBX.&lt;br /&gt;
# First &amp;quot;sudo apt-get build-dep gnuradio&amp;quot; (takes quite some time).&lt;br /&gt;
# 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 10.04 plus the additional line for 11.04). Do NOT continue with the next step (Installing GNU Radio) on that page. Instead -&lt;br /&gt;
# Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (by default it goes to a &amp;quot;Downloads&amp;quot; folder in your homedir, this is fine).&lt;br /&gt;
# 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&amp;#039;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 &amp;quot;usrp2::usrp2&amp;quot; into just &amp;quot;usrp2&amp;quot;. That&amp;#039;s all, then save and close.&lt;br /&gt;
# Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It&amp;#039;s &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot;, &amp;quot;make check&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to &amp;quot;Configuring USRP support&amp;quot; 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&amp;#039;t need to do that.&lt;br /&gt;
# At the end of the &amp;quot;Configuring USRP support&amp;quot; section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The &amp;quot;./usrp_benchmark_usb.py&amp;quot; test fails, but it doesn&amp;#039;t matter in our case. The &amp;quot;./test_usrp_standard_tx&amp;quot; should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).&lt;br /&gt;
&lt;br /&gt;
====Step 2: Crc-DabMod and CRC-Dwap.py====&lt;br /&gt;
# 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&amp;#039;s &amp;quot;./configure --disable-debug&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .&lt;br /&gt;
# 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&amp;#039;s name becomes exactly the same as the old one). Then set it&amp;#039;s permissions: &amp;quot;sudo chmod a+x crc-dwap.py&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 3: Crc-DabMux and Libfec====&lt;br /&gt;
# First some necessary software: &amp;quot;sudo apt-get install devscripts&amp;quot;. 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 &amp;quot;OK&amp;quot; and then &amp;quot;No configuration&amp;quot; (do not just close the terminal window).&lt;br /&gt;
# And &amp;quot;sudo apt-get install debhelper&amp;quot; (you might already have this).&lt;br /&gt;
# Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.&lt;br /&gt;
# 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.&lt;br /&gt;
# Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It&amp;#039;s just the usual way, &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 4: Buffer software====&lt;br /&gt;
On the mmbTools live cd, the &amp;quot;bfr&amp;quot; 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:&lt;br /&gt;
# &amp;quot;sudo apt-get install mbuffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 5: CRC-DabPlus====&lt;br /&gt;
Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don&amp;#039;t have or want CRC-DabPlus, you can skip this step.&lt;br /&gt;
Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don&amp;#039;t have to do it again now.&lt;br /&gt;
* Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).&lt;br /&gt;
* 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 &amp;quot;sudo gedit /etc/rc.local&amp;quot;) and insert the following lines before the existing &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
* Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.&lt;br /&gt;
* Install CRC-DabPlus as described in the README.html.&lt;br /&gt;
&lt;br /&gt;
====Step 6: AudioScience ASI504x sound cards====&lt;br /&gt;
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 &amp;quot;out of the box&amp;quot;. However the GUI sound control panel does not work correctly with these cards, so if you need to change it&amp;#039;s configuration, you must use the non-GUI alsamixer (type &amp;quot;alsamixer&amp;quot; in a terminal window).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now you&amp;#039;re ready to set up your DAB multiplex.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=CRC-dabplus&amp;diff=789</id>
		<title>CRC-dabplus</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=CRC-dabplus&amp;diff=789"/>
		<updated>2011-07-11T22:39:38Z</updated>

		<summary type="html">&lt;p&gt;Ubr: /* Licence key */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CRC-dabplus , HE-AAC DAB+ encoder from CRC.&lt;br /&gt;
&lt;br /&gt;
It is not a free/open source product partly because HE-AAC is subject to royalty payment.&lt;br /&gt;
&lt;br /&gt;
CRC is selling a licence for it. Please visit [http://mmbtools.crc.ca/content/view/40/66/ CRC page on CRC-dabplus] for more information&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
Usage:&lt;br /&gt;
   crc-dabplus [OPTION...]&lt;br /&gt;
&lt;br /&gt;
Help Options:&lt;br /&gt;
   -h, --help                           Show help options&lt;br /&gt;
   --help-all                           Show all help options&lt;br /&gt;
   --help-gst                           Show GStreamer Options&lt;br /&gt;
&lt;br /&gt;
Application Options:&lt;br /&gt;
   -b, --bitrate={ 8, 16, ..., 80 }     Output bitrate. Must be 8 multiple.&lt;br /&gt;
   -c, --channels={ 1, 2 }              Nb of input channels.&lt;br /&gt;
   -d, --data=FILENAME                  Set data filename.&lt;br /&gt;
   -g, --fs-bug                         Turn on FS bug mitigation.&lt;br /&gt;
   -i, --input=FILENAME                 Input filename. Try -i help for more info.&lt;br /&gt;
   -m, --message                        Turn on AAC frame messages.&lt;br /&gt;
   -o, --output=FILENAME                Output filename. Try -o help for more info.&lt;br /&gt;
   -p, --pad=BYTES                      Set PAD size in bytes.&lt;br /&gt;
   -r, --rate={ 32000, 48000 }          Sample rate input.&lt;br /&gt;
   -t, --type=TYPE                      Set data type (dls|pad|packet|dg).&lt;br /&gt;
   -u, --up                             Speed up for testing purpose.&lt;br /&gt;
   -v, --verbose=LEVEL                  Set verbosity level.&lt;br /&gt;
   -V, --version                        Print version and exit.&lt;br /&gt;
   -w, --down                           Speed down for testing purpose.&lt;br /&gt;
   -x, --extra=OPTIONS                  Extra options in the form name1[,property1=value[,property2...]][:name2...].&lt;br /&gt;
   -E, --Encode                         Set encoding mode. (default)&lt;br /&gt;
   -D, --Decode                         Set decoding mode.&lt;br /&gt;
   --mi=[ 0, ... ]                      Set AAC frame messages interval in milliseconds.&lt;br /&gt;
   --ma=[ 0, ... ]                      Set AAC frame messages attack time in milliseconds.&lt;br /&gt;
   --pi=GST_PIPELINE                    Probe in GStreamer pipeline inserted before the encoder.&lt;br /&gt;
   --po=GST_PIPELINE                    Probe out GStreamer pipeline inserted after the decoder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Licence key===&lt;br /&gt;
&lt;br /&gt;
Licence key is a a HASP usb key.&lt;br /&gt;
Packages are delivered with the package sold by CRC.&lt;br /&gt;
&lt;br /&gt;
However, since Ubuntu 10.04 some tweaks must be done to have it working because of change in USB stack in Linux.&lt;br /&gt;
&lt;br /&gt;
tweaks to simulate /proc/usb:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /etc/init.d/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
In Ubuntu 11.04 the last line is a bit different:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
You can add these lines into your /etc/rc.local before the existing &amp;quot;exit 0&amp;quot; to have them performed automatically on startup. Otherwise you will have to perform them after every reboot.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=788</id>
		<title>How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=788"/>
		<updated>2011-07-11T22:22:57Z</updated>

		<summary type="html">&lt;p&gt;Ubr: /* Step 1: Installation of Gnuradio 3.3.0 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it&amp;#039;s &amp;quot;tar xvzf package.tar.gz&amp;quot;, and for tar.bz2 it&amp;#039;s &amp;quot;tar xvjf package.tar.bz2&amp;quot;.&lt;br /&gt;
* I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.&lt;br /&gt;
* There might be some of it which can be done in an easier way, but I&amp;#039;m not that experienced with Linux, and this is what worked for me.&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Installation of Gnuradio 3.3.0====&lt;br /&gt;
This is needed for USRP1 with WBX.&lt;br /&gt;
# First &amp;quot;sudo apt-get build-dep gnuradio&amp;quot; (takes quite some time).&lt;br /&gt;
# 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 10.04 plus the additional line for 11.04). Do NOT continue with the next step (Installing GNU Radio) on that page. Instead -&lt;br /&gt;
# Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (by default it goes to a &amp;quot;Downloads&amp;quot; folder in your homedir, this is fine).&lt;br /&gt;
# 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&amp;#039;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 &amp;quot;usrp2::usrp2&amp;quot; into just &amp;quot;usrp2&amp;quot;. That&amp;#039;s all, then save and close.&lt;br /&gt;
# Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It&amp;#039;s &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot;, &amp;quot;make check&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to &amp;quot;Configuring USRP support&amp;quot; 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&amp;#039;t need to do that.&lt;br /&gt;
# At the end of the &amp;quot;Configuring USRP support&amp;quot; section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The &amp;quot;./usrp_benchmark_usb.py&amp;quot; test fails, but it doesn&amp;#039;t matter in our case. The &amp;quot;./test_usrp_standard_tx&amp;quot; should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).&lt;br /&gt;
&lt;br /&gt;
====Step 2: Crc-DabMod and CRC-Dwap.py====&lt;br /&gt;
# 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&amp;#039;s &amp;quot;./configure --disable-debug&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .&lt;br /&gt;
# 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&amp;#039;s name becomes exactly the same as the old one). Then set it&amp;#039;s permissions: &amp;quot;sudo chmod a+x crc-dwap.py&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 3: Crc-DabMux and Libfec====&lt;br /&gt;
# First some necessary software: &amp;quot;sudo apt-get install devscripts&amp;quot;. 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 &amp;quot;OK&amp;quot; and then &amp;quot;No configuration&amp;quot; (do not just close the terminal window).&lt;br /&gt;
# And &amp;quot;sudo apt-get install debhelper&amp;quot; (you might already have this).&lt;br /&gt;
# Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.&lt;br /&gt;
# 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.&lt;br /&gt;
# Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It&amp;#039;s just the usual way, &amp;quot;./compile&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 4: Buffer software====&lt;br /&gt;
On the mmbTools live cd, the &amp;quot;bfr&amp;quot; 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:&lt;br /&gt;
# &amp;quot;sudo apt-get install mbuffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 5: CRC-DabPlus====&lt;br /&gt;
Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don&amp;#039;t have or want CRC-DabPlus, you can skip this step.&lt;br /&gt;
Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don&amp;#039;t have to do it again now.&lt;br /&gt;
* Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).&lt;br /&gt;
* 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 &amp;quot;sudo gedit /etc/rc.local&amp;quot;) and insert the following lines before the existing &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
* Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.&lt;br /&gt;
* Install CRC-DabPlus as described in the README.html.&lt;br /&gt;
&lt;br /&gt;
====Step 6: AudioScience ASI504x sound cards====&lt;br /&gt;
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 &amp;quot;out of the box&amp;quot;. However the GUI sound control panel does not work correctly with these cards, so if you need to change it&amp;#039;s configuration, you must use the non-GUI alsamixer (type &amp;quot;alsamixer&amp;quot; in a terminal window).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now you&amp;#039;re ready to set up your DAB multiplex.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
	<entry>
		<id>https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=787</id>
		<title>How to install CRC DAB+ transmission chain from scratch in Ubuntu 11.04</title>
		<link rel="alternate" type="text/html" href="https://wiki.opendigitalradio.org/index.php?title=How_to_install_CRC_DAB%2B_transmission_chain_from_scratch_in_Ubuntu_11.04&amp;diff=787"/>
		<updated>2011-07-11T22:19:54Z</updated>

		<summary type="html">&lt;p&gt;Ubr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Howto by Ulrik Brinck on CRC DAB+ installation on Ubuntu 11.04&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&lt;br /&gt;
Please note:&lt;br /&gt;
* 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.&lt;br /&gt;
* 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.&lt;br /&gt;
* You will need to know how to unpack a tarball (.tar.gz og .tar.bz2 file). For tar.gz it&amp;#039;s &amp;quot;tar xvzf package.tar.gz&amp;quot;, and for tar.bz2 it&amp;#039;s &amp;quot;tar xvjf package.tar.bz2&amp;quot;.&lt;br /&gt;
* I installed on a brand new Ubuntu 11.04 installation after installing all the OS updates offered by the Update Manager.&lt;br /&gt;
* There might be some of it which can be done in an easier way, but I&amp;#039;m not that experienced with Linux, and this is what worked for me.&lt;br /&gt;
&lt;br /&gt;
====Step 0: Update your system====&lt;br /&gt;
Begin with &amp;quot;sudo apt-get update&amp;quot; to make sure that you can install all that you need.&lt;br /&gt;
&lt;br /&gt;
====Step 1: Installation of Gnuradio 3.3.0====&lt;br /&gt;
This is needed for USRP1 with WBX.&lt;br /&gt;
# First &amp;quot;sudo apt-get build-dep gnuradio&amp;quot; (takes quite some time).&lt;br /&gt;
# 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 10.04 plus the additional line for 11.04). Do NOT continue with the next step (Installing GNU Radio) on that page. Instead -&lt;br /&gt;
# Download and unpack this file: http://ftp.gnu.org/gnu/gnuradio/gnuradio-3.3.0.tar.gz (be default it goes to a &amp;quot;Downloads&amp;quot; folder in your homedir, this is fine).&lt;br /&gt;
# 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&amp;#039;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 &amp;quot;usrp2::usrp2&amp;quot; into just &amp;quot;usrp2&amp;quot;. That&amp;#039;s all, then save and close.&lt;br /&gt;
# Now you can compile it as described in the file ~/Downloads/gnuradio-3.3.0/INSTALL . It&amp;#039;s &amp;quot;./configure&amp;quot;, &amp;quot;make&amp;quot;, &amp;quot;make check&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then back to this page: http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall and scroll down to &amp;quot;Configuring USRP support&amp;quot; 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&amp;#039;t need to do that.&lt;br /&gt;
# At the end of the &amp;quot;Configuring USRP support&amp;quot; section of that page, there are some test you can perform to test that the USRP is available to Ubuntu. The &amp;quot;./usrp_benchmark_usb.py&amp;quot; test fails, but it doesn&amp;#039;t matter in our case. The &amp;quot;./test_usrp_standard_tx&amp;quot; should however go well and a.o. show that your daughterboard is WBX (if that is actually what it is).&lt;br /&gt;
&lt;br /&gt;
====Step 2: Crc-DabMod and CRC-Dwap.py====&lt;br /&gt;
# 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&amp;#039;s &amp;quot;./configure --disable-debug&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
# Then go here http://mmbtools.crc.ca/content/view/37/63/ and download CRC-Dwap.py for Gnuradio 3.3 .&lt;br /&gt;
# 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&amp;#039;s name becomes exactly the same as the old one). Then set it&amp;#039;s permissions: &amp;quot;sudo chmod a+x crc-dwap.py&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 3: Crc-DabMux and Libfec====&lt;br /&gt;
# First some necessary software: &amp;quot;sudo apt-get install devscripts&amp;quot;. 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 &amp;quot;OK&amp;quot; and then &amp;quot;No configuration&amp;quot; (do not just close the terminal window).&lt;br /&gt;
# And &amp;quot;sudo apt-get install debhelper&amp;quot; (you might already have this).&lt;br /&gt;
# Go to http://mmbtools.crc.ca/content/view/39/65/ and download and unpack CRC-DabMux and Libfec 3.0.1-2.&lt;br /&gt;
# 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.&lt;br /&gt;
# Compile CRC-DabMux as described in ~/Downloads/crc-dabmux-0.3.0.4/INSTALL. It&amp;#039;s just the usual way, &amp;quot;./compile&amp;quot;, &amp;quot;make&amp;quot; and &amp;quot;sudo make install&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 4: Buffer software====&lt;br /&gt;
On the mmbTools live cd, the &amp;quot;bfr&amp;quot; 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:&lt;br /&gt;
# &amp;quot;sudo apt-get install mbuffer&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
====Step 5: CRC-DabPlus====&lt;br /&gt;
Note: CRC-DabPlus is not free, because of HE-AAC royalty, but can be bought from CRC. If you don&amp;#039;t have or want CRC-DabPlus, you can skip this step.&lt;br /&gt;
Note: Together with CRC-DabPlus came HASP (for the software protection dongle) and Libfec. You already installed Libfec in step 3, so you don&amp;#039;t have to do it again now.&lt;br /&gt;
* Install HASP as described in the README-html which came with CRC-DabPlus (sudo dpkg -i *.deb).&lt;br /&gt;
* 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 &amp;quot;sudo gedit /etc/rc.local&amp;quot;) and insert the following lines before the existing &amp;quot;exit 0&amp;quot;:&lt;br /&gt;
 sudo mount --bind /dev/bus /proc/bus&lt;br /&gt;
 sudo ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices&lt;br /&gt;
 sudo /usr/sbin/aksusbd restart&lt;br /&gt;
&lt;br /&gt;
* Insert the dongle in an empty USB slot and reboot the computer. License for CRC-DabPlus is now ready.&lt;br /&gt;
* Install CRC-DabPlus as described in the README.html.&lt;br /&gt;
&lt;br /&gt;
====Step 6: AudioScience ASI504x sound cards====&lt;br /&gt;
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 &amp;quot;out of the box&amp;quot;. However the GUI sound control panel does not work correctly with these cards, so if you need to change it&amp;#039;s configuration, you must use the non-GUI alsamixer (type &amp;quot;alsamixer&amp;quot; in a terminal window).&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it. Now you&amp;#039;re ready to set up your DAB multiplex.&lt;/div&gt;</summary>
		<author><name>Ubr</name></author>
	</entry>
</feed>